blob

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: MIT, MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
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 // 4GB

	// BlockBlobMaxBlocks indicates the maximum number of blocks allowed in a block blob.
	BlockBlobMaxBlocks = 50000

	// PageBlobPageBytes indicates the number of bytes in a page (512).
	PageBlobPageBytes = 512

	// BlobDefaultDownloadBlockSize is default block size
	BlobDefaultDownloadBlockSize = int64(4 * 1024 * 1024) // 4MB
)

nolint

View Source
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"
)

nolint

View Source
const (
	// ETagNone represents an empty entity tag.
	ETagNone = ""

	// ETagAny matches any entity tag.
	ETagAny = "*"
)
View Source
const CountToEnd = 0
View Source
const LeaseBreakNaturally = -1

LeaseBreakNaturally tells ContainerClient's or BlobClient's BreakLease method to break the lease using service semantics.

View Source
const ReadOnClosedBodyMessage = "read on closed response body"
View Source
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.

View Source
const (
	SnapshotTimeFormat = "2006-01-02T15:04:05.0000000Z07:00"
)

Variables

View Source
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.
View Source
var SASVersion = "2019-12-12"

Functions

func DoBatchTransfer

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 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 NewRetryReader

func NewRetryReader(ctx context.Context, initialResponse *http.Response,
	info HTTPGetterInfo, o RetryReaderOptions, getter HTTPGetter) io.ReadCloser

NewRetryReader creates a retry reader.

Types

type AccessPolicy

type AccessPolicy struct {
	// the date-time the policy expires
	Expiry *time.Time `xml:"Expiry"`

	// the permissions for the acl policy
	Permission *string `xml:"Permission"`

	// the date-time the policy is active
	Start *time.Time `xml:"Start"`
}

AccessPolicy - An Access policy

func (AccessPolicy) MarshalXML

func (a AccessPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaller interface for type AccessPolicy.

func (*AccessPolicy) UnmarshalXML

func (a *AccessPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaller interface for type AccessPolicy.

type AccessPolicyPermission

type AccessPolicyPermission struct {
	Read, Add, Create, Write, Delete, List bool
}

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 AccessTier

type AccessTier string

AccessTier enum

const (
	AccessTierArchive AccessTier = "Archive"
	AccessTierCool    AccessTier = "Cool"
	AccessTierHot     AccessTier = "Hot"
	AccessTierP10     AccessTier = "P10"
	AccessTierP15     AccessTier = "P15"
	AccessTierP20     AccessTier = "P20"
	AccessTierP30     AccessTier = "P30"
	AccessTierP4      AccessTier = "P4"
	AccessTierP40     AccessTier = "P40"
	AccessTierP50     AccessTier = "P50"
	AccessTierP6      AccessTier = "P6"
	AccessTierP60     AccessTier = "P60"
	AccessTierP70     AccessTier = "P70"
	AccessTierP80     AccessTier = "P80"
)

func PossibleAccessTierValues

func PossibleAccessTierValues() []AccessTier

PossibleAccessTierValues returns the possible values for the AccessTier const type.

func (AccessTier) ToPtr

func (c AccessTier) ToPtr() *AccessTier

ToPtr returns a *AccessTier pointing to the current value.

type AccountKind

type AccountKind string

AccountKind enum

const (
	AccountKindStorage          AccountKind = "Storage"
	AccountKindBlobStorage      AccountKind = "BlobStorage"
	AccountKindStorageV2        AccountKind = "StorageV2"
	AccountKindFileStorage      AccountKind = "FileStorage"
	AccountKindBlockBlobStorage AccountKind = "BlockBlobStorage"
)

func PossibleAccountKindValues

func PossibleAccountKindValues() []AccountKind

PossibleAccountKindValues returns the possible values for the AccountKind const type.

func (AccountKind) ToPtr

func (c AccountKind) ToPtr() *AccountKind

ToPtr returns a *AccountKind pointing to the current value.

type AccountSASPermissions

type AccountSASPermissions struct {
	Read, Write, Delete, DeletePreviousVersion, List, Add, Create, Update, Process, Tag, FilterByTags bool
}

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
}

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
}

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 (s *AccountSASServices) Parse(str 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

func (AccountSASSignatureValues) Sign

Sign uses an account's shared key credential to sign this signature values to produce the proper SAS query parameters.

type AppendBlobAppendBlockFromURLOptions

type AppendBlobAppendBlockFromURLOptions struct {
	// Specify the md5 calculated for the range of bytes that must be read from the copy source.
	SourceContentMD5 []byte
	// Specify the crc64 calculated for the range of bytes that must be read from the copy source.
	SourceContentCRC64 []byte
	// Specify the transactional md5 for the body, to be validated by the service.
	TransactionalContentMD5 []byte

	AppendPositionAccessConditions *AppendPositionAccessConditions

	CpkInfo *CpkInfo

	CpkScopeInfo *CpkScopeInfo

	SourceModifiedAccessConditions *SourceModifiedAccessConditions

	BlobAccessConditions *BlobAccessConditions
	// Optional, you can specify whether a particular range of the blob is read
	Offset *int64

	Count *int64
}

AppendBlobAppendBlockFromURLOptions provides set of configurations for AppendBlockFromURL operation

type AppendBlobAppendBlockFromURLResponse

type AppendBlobAppendBlockFromURLResponse struct {
	// contains filtered or unexported fields
}

AppendBlobAppendBlockFromURLResponse contains the response from method AppendBlobClient.AppendBlockFromURL.

type AppendBlobAppendBlockOptions

type AppendBlobAppendBlockOptions struct {
	// Specify the transactional crc64 for the body, to be validated by the service.
	TransactionalContentCRC64 []byte
	// Specify the transactional md5 for the body, to be validated by the service.
	TransactionalContentMD5 []byte

	AppendPositionAccessConditions *AppendPositionAccessConditions

	CpkInfo *CpkInfo

	CpkScopeInfo *CpkScopeInfo

	BlobAccessConditions *BlobAccessConditions
}

AppendBlobAppendBlockOptions provides set of configurations for AppendBlock operation

type AppendBlobAppendBlockResponse

type AppendBlobAppendBlockResponse struct {
	// contains filtered or unexported fields
}

AppendBlobAppendBlockResponse contains the response from method AppendBlobClient.AppendBlock.

type AppendBlobClient

type AppendBlobClient struct {
	BlobClient
	// contains filtered or unexported fields
}

AppendBlobClient represents a client to an Azure Storage append blob;

func NewAppendBlobClient

func NewAppendBlobClient(blobURL string, cred azcore.TokenCredential, options *ClientOptions) (*AppendBlobClient, error)

NewAppendBlobClient creates an AppendBlobClient with the specified URL, Azure AD credential, and options.

func NewAppendBlobClientWithNoCredential

func NewAppendBlobClientWithNoCredential(blobURL string, options *ClientOptions) (*AppendBlobClient, error)

NewAppendBlobClientWithNoCredential creates an AppendBlobClient with the specified URL and options.

func NewAppendBlobClientWithSharedKey

func NewAppendBlobClientWithSharedKey(blobURL string, cred *SharedKeyCredential, options *ClientOptions) (*AppendBlobClient, error)

NewAppendBlobClientWithSharedKey creates an AppendBlobClient with the specified URL, shared key, and options.

func (*AppendBlobClient) AppendBlock

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 (*AppendBlobClient) AppendBlockFromURL

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 (*AppendBlobClient) Create

Create creates a 0-size 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 (*AppendBlobClient) SealAppendBlob

SealAppendBlob - The purpose of Append Blob Seal is to allow users and applications to seal append blobs, marking them as read only. https://docs.microsoft.com/en-us/rest/api/storageservices/append-blob-seal

func (*AppendBlobClient) WithSnapshot

func (ab *AppendBlobClient) WithSnapshot(snapshot string) (*AppendBlobClient, error)

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 (*AppendBlobClient) WithVersionID

func (ab *AppendBlobClient) WithVersionID(versionID string) (*AppendBlobClient, error)

WithVersionID creates a new AppendBlobURL object identical to the source but with the specified version id. Pass "" to remove the versionID returning a URL to the base blob.

type AppendBlobCreateOptions

type AppendBlobCreateOptions struct {
	// Specifies the date time when the blobs immutability policy is set to expire.
	ImmutabilityPolicyExpiry *time.Time
	// Specifies the immutability policy mode to set on the blob.
	ImmutabilityPolicyMode *BlobImmutabilityPolicyMode
	// Specified if a legal hold should be set on the blob.
	LegalHold *bool

	BlobAccessConditions *BlobAccessConditions

	HTTPHeaders *BlobHTTPHeaders

	CpkInfo *CpkInfo

	CpkScopeInfo *CpkScopeInfo
	// Optional. Used to set blob tags in various blob operations.
	TagsMap map[string]string
	// Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the
	// operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs
	// are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source
	// blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers.
	// See Naming and Referencing Containers, Blobs, and Metadata for more information.
	Metadata map[string]string
}

AppendBlobCreateOptions provides set of configurations for Create Append Blob operation

type AppendBlobCreateResponse

type AppendBlobCreateResponse struct {
	// contains filtered or unexported fields
}

AppendBlobCreateResponse contains the response from method AppendBlobClient.Create.

type AppendBlobSealOptions

type AppendBlobSealOptions struct {
	BlobAccessConditions           *BlobAccessConditions
	AppendPositionAccessConditions *AppendPositionAccessConditions
}

AppendBlobSealOptions provides set of configurations for SealAppendBlob operation

type AppendBlobSealResponse

type AppendBlobSealResponse struct {
	// contains filtered or unexported fields
}

AppendBlobSealResponse contains the response from method AppendBlobClient.Seal.

type AppendPositionAccessConditions

type AppendPositionAccessConditions struct {
	// Optional conditional header, used only for the Append Block operation. A number indicating the byte offset to compare.
	// Append Block will succeed only if the append position is equal to this number. If
	// it is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition Failed).
	AppendPosition *int64
	// Optional conditional header. The max length in bytes permitted for the append blob. If the Append Block operation would
	// cause the blob to exceed that limit or if the blob size is already greater than
	// the value specified in this header, the request will fail with MaxBlobSizeConditionNotMet error (HTTP status code 412 -
	// Precondition Failed).
	MaxSize *int64
}

AppendPositionAccessConditions contains a group of parameters for the appendBlobClient.AppendBlock method.

type ArchiveStatus

type ArchiveStatus string

ArchiveStatus enum

const (
	ArchiveStatusRehydratePendingToCool ArchiveStatus = "rehydrate-pending-to-cool"
	ArchiveStatusRehydratePendingToHot  ArchiveStatus = "rehydrate-pending-to-hot"
)

func PossibleArchiveStatusValues

func PossibleArchiveStatusValues() []ArchiveStatus

PossibleArchiveStatusValues returns the possible values for the ArchiveStatus const type.

func (ArchiveStatus) ToPtr

func (c ArchiveStatus) ToPtr() *ArchiveStatus

ToPtr returns a *ArchiveStatus pointing to the current value.

type ArrowConfiguration

type ArrowConfiguration struct {
	// REQUIRED
	Schema []*ArrowField `xml:"Schema>Field"`
}

ArrowConfiguration - Groups the settings used for formatting the response if the response should be Arrow formatted.

func (ArrowConfiguration) MarshalXML

func (a ArrowConfiguration) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaller interface for type ArrowConfiguration.

type ArrowField

type ArrowField struct {
	// REQUIRED
	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

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 contains the response from method BlobClient.AbortCopyFromURL

type BlobAbortCopyOptions

type BlobAbortCopyOptions struct {
	LeaseAccessConditions *LeaseAccessConditions
}

BlobAbortCopyOptions provides set of configurations for AbortCopyFromURL operation

type BlobAccessConditions

type BlobAccessConditions struct {
	LeaseAccessConditions    *LeaseAccessConditions
	ModifiedAccessConditions *ModifiedAccessConditions
}

BlobAccessConditions identifies blob-specific access conditions which you optionally set.

type BlobAcquireLeaseOptions

type BlobAcquireLeaseOptions struct {
	// Specifies the Duration of the lease, in seconds, or negative one (-1) for a lease that never expires. A non-infinite lease
	// can be between 15 and 60 seconds. A lease Duration cannot be changed using renew or change.
	Duration *int32

	ModifiedAccessConditions *ModifiedAccessConditions
}

BlobAcquireLeaseOptions provides set of configurations for AcquireLeaseBlob operation

type BlobAcquireLeaseResponse

type BlobAcquireLeaseResponse struct {
	// contains filtered or unexported fields
}

BlobAcquireLeaseResponse contains the response from method BlobLeaseClient.AcquireLease.

type BlobBreakLeaseOptions

type BlobBreakLeaseOptions struct {
	// For a break operation, proposed Duration the lease should continue before it is broken, in seconds, between 0 and 60. This
	// break period is only used if it is shorter than the time remaining on the lease. If longer, the time remaining on the lease
	// is used. A new lease will not be available before the break period has expired, but the lease may be held for longer than
	// the break period. If this header does not appear with a break operation, a fixed-Duration lease breaks after the remaining
	// lease period elapses, and an infinite lease breaks immediately.
	BreakPeriod              *int32
	ModifiedAccessConditions *ModifiedAccessConditions
}

BlobBreakLeaseOptions provides set of configurations for BreakLeaseBlob operation

type BlobBreakLeaseResponse

type BlobBreakLeaseResponse struct {
	// contains filtered or unexported fields
}

BlobBreakLeaseResponse contains the response from method BlobLeaseClient.BreakLease.

type BlobChangeLeaseOptions

type BlobChangeLeaseOptions struct {
	ProposedLeaseID          *string
	ModifiedAccessConditions *ModifiedAccessConditions
}

BlobChangeLeaseOptions provides set of configurations for ChangeLeaseBlob operation

type BlobChangeLeaseResponse

type BlobChangeLeaseResponse struct {
	// contains filtered or unexported fields
}

BlobChangeLeaseResponse contains the response from method BlobLeaseClient.ChangeLease

type BlobClient

type BlobClient struct {
	// contains filtered or unexported fields
}

BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob, append blob, or page blob.

func NewBlobClient

func NewBlobClient(blobURL string, cred azcore.TokenCredential, options *ClientOptions) (*BlobClient, error)

NewBlobClient creates a BlobClient object using the specified URL, Azure AD credential, and options.

func NewBlobClientFromConnectionString

func NewBlobClientFromConnectionString(connectionString, containerName, blobName string, options *ClientOptions) (*BlobClient, error)

NewBlobClientFromConnectionString creates BlobClient from a connection String nolint

func NewBlobClientWithNoCredential

func NewBlobClientWithNoCredential(blobURL string, options *ClientOptions) (*BlobClient, error)

NewBlobClientWithNoCredential creates a BlobClient object using the specified URL and options.

func NewBlobClientWithSharedKey

func NewBlobClientWithSharedKey(blobURL string, cred *SharedKeyCredential, options *ClientOptions) (*BlobClient, error)

NewBlobClientWithSharedKey creates a BlobClient object using the specified URL, shared key, and options.

func (*BlobClient) AbortCopyFromURL

func (b *BlobClient) AbortCopyFromURL(ctx context.Context, copyID string, options *BlobAbortCopyOptions) (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 (*BlobClient) CreateSnapshot

CreateSnapshot creates a read-only snapshot of a blob. For more information, see https://docs.microsoft.com/rest/api/storageservices/snapshot-blob.

func (*BlobClient) Delete

Delete marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collection. Note that deleting a blob also deletes all its snapshots. For more information, see https://docs.microsoft.com/rest/api/storageservices/delete-blob.

func (*BlobClient) Download

Download reads a range of bytes from a blob. The response also includes the blob's properties and metadata. For more information, see https://docs.microsoft.com/rest/api/storageservices/get-blob.

func (*BlobClient) DownloadToBuffer

func (b *BlobClient) DownloadToBuffer(ctx context.Context, offset int64, count int64, _bytes []byte, o DownloadOptions) error

DownloadToBuffer downloads an Azure blob to a buffer with parallel. Offset and count are optional, pass 0 for both to download the entire blob.

func (*BlobClient) DownloadToFile

func (b *BlobClient) DownloadToFile(ctx context.Context, offset int64, count int64, file *os.File, o DownloadOptions) error

DownloadToFile 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 (*BlobClient) DownloadToWriterAt

func (b *BlobClient) DownloadToWriterAt(ctx context.Context, offset int64, count int64, writer io.WriterAt, o DownloadOptions) error

DownloadToWriterAt downloads an Azure blob to a WriterAt with parallel. Offset and count are optional, pass 0 for both to download the entire blob.

func (*BlobClient) GetProperties

GetProperties returns the blob's properties. For more information, see https://docs.microsoft.com/rest/api/storageservices/get-blob-properties.

func (*BlobClient) GetSASToken

func (b *BlobClient) GetSASToken(permissions BlobSASPermissions, start time.Time, expiry time.Time) (SASQueryParameters, error)

GetSASToken is a convenience method for generating a SAS token for the currently pointed at blob. It can only be used if the credential supplied during creation was a SharedKeyCredential.

func (*BlobClient) GetTags

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 (*BlobClient) NewBlobLeaseClient

func (b *BlobClient) NewBlobLeaseClient(leaseID *string) (*BlobLeaseClient, error)

NewBlobLeaseClient is constructor for BlobLeaseClient

func (*BlobClient) SetHTTPHeaders

func (b *BlobClient) SetHTTPHeaders(ctx context.Context, blobHttpHeaders BlobHTTPHeaders, options *BlobSetHTTPHeadersOptions) (BlobSetHTTPHeadersResponse, error)

SetHTTPHeaders changes a blob's HTTP headers. For more information, see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties.

func (*BlobClient) SetMetadata

func (b *BlobClient) SetMetadata(ctx context.Context, metadata map[string]string, options *BlobSetMetadataOptions) (BlobSetMetadataResponse, error)

SetMetadata changes a blob's metadata. https://docs.microsoft.com/rest/api/storageservices/set-blob-metadata.

func (*BlobClient) SetTags

SetTags operation enables users to set tags on a blob or specific blob version, but not snapshot. Each call to this operation replaces all existing tags attached to the blob. To remove all tags from the blob, call this operation with no tags set. https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tags

func (*BlobClient) SetTier

SetTier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's ETag. For detailed information about block blob level tiering see https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers.

func (*BlobClient) StartCopyFromURL

func (b *BlobClient) StartCopyFromURL(ctx context.Context, copySource string, options *BlobStartCopyOptions) (BlobStartCopyFromURLResponse, error)

StartCopyFromURL copies the data at the source URL to a blob. For more information, see https://docs.microsoft.com/rest/api/storageservices/copy-blob.

func (*BlobClient) URL

func (b *BlobClient) URL() string

URL returns the URL endpoint used by the BlobClient object.

func (*BlobClient) Undelete

Undelete restores the contents and metadata of a soft-deleted blob and any associated soft-deleted snapshots. For more information, see https://docs.microsoft.com/rest/api/storageservices/undelete-blob.

func (*BlobClient) WithSnapshot

func (b *BlobClient) WithSnapshot(snapshot string) (*BlobClient, error)

WithSnapshot creates a new BlobClient object identical to the source but with the specified snapshot timestamp. Pass "" to remove the snapshot returning a URL to the base blob.

func (*BlobClient) WithVersionID

func (b *BlobClient) WithVersionID(versionID string) (*BlobClient, error)

WithVersionID creates a new AppendBlobURL object identical to the source but with the specified version id. Pass "" to remove the versionID returning a URL to the base blob.

type BlobCreateSnapshotOptions

type BlobCreateSnapshotOptions struct {
	Metadata                 map[string]string
	LeaseAccessConditions    *LeaseAccessConditions
	CpkInfo                  *CpkInfo
	CpkScopeInfo             *CpkScopeInfo
	ModifiedAccessConditions *ModifiedAccessConditions
}

BlobCreateSnapshotOptions provides set of configurations for CreateSnapshot of blob operation

type BlobCreateSnapshotResponse

type BlobCreateSnapshotResponse struct {
	// contains filtered or unexported fields
}

BlobCreateSnapshotResponse contains the response from method BlobClient.CreateSnapshot

type BlobDeleteOptions

type BlobDeleteOptions struct {
	// Required if the blob has associated snapshots. Specify one of the following two options: include: Delete the base blob
	// and all of its snapshots. only: Delete only the blob's snapshots and not the blob itself
	DeleteSnapshots      *DeleteSnapshotsOptionType
	BlobAccessConditions *BlobAccessConditions
}

BlobDeleteOptions provides set of configurations for Delete blob operation

type BlobDeleteResponse

type BlobDeleteResponse struct {
	// contains filtered or unexported fields
}

BlobDeleteResponse contains the response from method BlobClient.Delete.

type BlobDeleteType

type BlobDeleteType string

BlobDeleteType enum

const (
	BlobDeleteTypeNone      BlobDeleteType = "None"
	BlobDeleteTypePermanent BlobDeleteType = "Permanent"
)

func PossibleBlobDeleteTypeValues

func PossibleBlobDeleteTypeValues() []BlobDeleteType

PossibleBlobDeleteTypeValues returns the possible values for the BlobDeleteType const type.

func (BlobDeleteType) ToPtr

func (c BlobDeleteType) ToPtr() *BlobDeleteType

ToPtr returns a *BlobDeleteType pointing to the current value.

type BlobDownloadOptions

type BlobDownloadOptions struct {
	// When set to true and specified together with the Range, the service returns the MD5 hash for the range, as long as the
	// range is less than or equal to 4 MB in size.
	RangeGetContentMD5 *bool

	// Optional, you can specify whether a particular range of the blob is read
	Offset *int64
	Count  *int64

	BlobAccessConditions *BlobAccessConditions
	CpkInfo              *CpkInfo
	CpkScopeInfo         *CpkScopeInfo
}

BlobDownloadOptions provides set of configurations for Download blob operation

type BlobDownloadResponse

type BlobDownloadResponse struct {
	ObjectReplicationRules []ObjectReplicationPolicy
	// contains filtered or unexported fields
}

BlobDownloadResponse wraps AutoRest generated BlobDownloadResponse and helps to provide info for retry.

func (*BlobDownloadResponse) Body

Body constructs new RetryReader stream for reading data. If a connection fails while reading, it will make additional requests to reestablish a connection and continue reading. Specifying a RetryReaderOption's with MaxRetryRequests set to 0 (the default), returns the original response body and no retries will be performed. Pass in nil for options to accept the default options.

func (BlobDownloadResponse) GetHTTPHeaders

func (r BlobDownloadResponse) GetHTTPHeaders() BlobHTTPHeaders

GetHTTPHeaders returns the user-modifiable properties for this blob.

type BlobExpiryOptions

type BlobExpiryOptions string

BlobExpiryOptions enum

const (
	BlobExpiryOptionsAbsolute           BlobExpiryOptions = "Absolute"
	BlobExpiryOptionsNeverExpire        BlobExpiryOptions = "NeverExpire"
	BlobExpiryOptionsRelativeToCreation BlobExpiryOptions = "RelativeToCreation"
	BlobExpiryOptionsRelativeToNow      BlobExpiryOptions = "RelativeToNow"
)

func PossibleBlobExpiryOptionsValues

func PossibleBlobExpiryOptionsValues() []BlobExpiryOptions

PossibleBlobExpiryOptionsValues returns the possible values for the BlobExpiryOptions const type.

func (BlobExpiryOptions) ToPtr

ToPtr returns a *BlobExpiryOptions pointing to the current value.

type BlobFlatListSegment

type BlobFlatListSegment struct {
	// REQUIRED
	BlobItems []*BlobItemInternal `xml:"Blob"`
}

BlobFlatListSegment struct

func (BlobFlatListSegment) MarshalXML

func (b BlobFlatListSegment) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaller interface for type BlobFlatListSegment.

type BlobGeoReplicationStatus

type BlobGeoReplicationStatus string

BlobGeoReplicationStatus - The status of the secondary location

const (
	BlobGeoReplicationStatusLive        BlobGeoReplicationStatus = "live"
	BlobGeoReplicationStatusBootstrap   BlobGeoReplicationStatus = "bootstrap"
	BlobGeoReplicationStatusUnavailable BlobGeoReplicationStatus = "unavailable"
)

func PossibleBlobGeoReplicationStatusValues

func PossibleBlobGeoReplicationStatusValues() []BlobGeoReplicationStatus

PossibleBlobGeoReplicationStatusValues returns the possible values for the BlobGeoReplicationStatus const type.

func (BlobGeoReplicationStatus) ToPtr

ToPtr returns a *BlobGeoReplicationStatus pointing to the current value.

type BlobGetPropertiesOptions

type BlobGetPropertiesOptions struct {
	BlobAccessConditions *BlobAccessConditions
	CpkInfo              *CpkInfo
}

BlobGetPropertiesOptions provides set of configurations for GetProperties blob operation

type BlobGetPropertiesResponse

type BlobGetPropertiesResponse struct {

	// deserialized attributes
	ObjectReplicationRules []ObjectReplicationPolicy
	// contains filtered or unexported fields
}

BlobGetPropertiesResponse reformat the GetPropertiesResponse object for easy consumption

func (BlobGetPropertiesResponse) GetHTTPHeaders

func (bgpr BlobGetPropertiesResponse) GetHTTPHeaders() BlobHTTPHeaders

GetHTTPHeaders returns the user-modifiable properties for this blob.

type BlobGetTagsOptions

type BlobGetTagsOptions struct {
	// The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve.
	Snapshot *string
	// The version id parameter is an opaque DateTime value that, when present, specifies the version of the blob to operate on.
	// It's for service version 2019-10-10 and newer.
	VersionID *string

	BlobAccessConditions *BlobAccessConditions
}

BlobGetTagsOptions provides set of configurations for GetTags operation

type BlobGetTagsResponse

type BlobGetTagsResponse struct {
	// contains filtered or unexported fields
}

BlobGetTagsResponse contains the response from method BlobClient.GetTags

type BlobHTTPHeaders

type BlobHTTPHeaders struct {
	// Optional. Sets the blob's cache control. If specified, this property is stored with the blob and returned with a read request.
	BlobCacheControl *string
	// Optional. Sets the blob's Content-Disposition header.
	BlobContentDisposition *string
	// Optional. Sets the blob's content encoding. If specified, this property is stored with the blob and returned with a read
	// request.
	BlobContentEncoding *string
	// Optional. Set the blob's content language. If specified, this property is stored with the blob and returned with a read
	// request.
	BlobContentLanguage *string
	// Optional. An MD5 hash of the blob content. Note that this hash is not validated, as the hashes for the individual blocks
	// were validated when each was uploaded.
	BlobContentMD5 []byte
	// Optional. Sets the blob's content type. If specified, this property is stored with the blob and returned with a read request.
	BlobContentType *string
}

BlobHTTPHeaders contains a group of parameters for the blobClient.SetHTTPHeaders method.

type BlobHierarchyListSegment

type BlobHierarchyListSegment struct {
	// REQUIRED
	BlobItems    []*BlobItemInternal `xml:"Blob"`
	BlobPrefixes []*BlobPrefix       `xml:"BlobPrefix"`
}

BlobHierarchyListSegment struct

func (BlobHierarchyListSegment) MarshalXML

func (b BlobHierarchyListSegment) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaller interface for type BlobHierarchyListSegment.

type BlobImmutabilityPolicyMode

type BlobImmutabilityPolicyMode string

BlobImmutabilityPolicyMode enum

const (
	BlobImmutabilityPolicyModeMutable  BlobImmutabilityPolicyMode = "Mutable"
	BlobImmutabilityPolicyModeUnlocked BlobImmutabilityPolicyMode = "Unlocked"
	BlobImmutabilityPolicyModeLocked   BlobImmutabilityPolicyMode = "Locked"
)

func PossibleBlobImmutabilityPolicyModeValues

func PossibleBlobImmutabilityPolicyModeValues() []BlobImmutabilityPolicyMode

PossibleBlobImmutabilityPolicyModeValues returns the possible values for the BlobImmutabilityPolicyMode const type.

func (BlobImmutabilityPolicyMode) ToPtr

ToPtr returns a *BlobImmutabilityPolicyMode pointing to the current value.

type BlobItemInternal

type BlobItemInternal struct {
	// REQUIRED
	Deleted *bool `xml:"Deleted"`

	// REQUIRED
	Name *string `xml:"Name"`

	// REQUIRED; Properties of a blob
	Properties *BlobPropertiesInternal `xml:"Properties"`

	// REQUIRED
	Snapshot *string `xml:"Snapshot"`

	// Blob tags
	BlobTags         *BlobTags `xml:"Tags"`
	HasVersionsOnly  *bool     `xml:"HasVersionsOnly"`
	IsCurrentVersion *bool     `xml:"IsCurrentVersion"`

	// Dictionary of
	Metadata map[string]*string `xml:"Metadata"`

	// Dictionary of
	OrMetadata map[string]*string `xml:"OrMetadata"`
	VersionID  *string            `xml:"VersionId"`
}

BlobItemInternal - An Azure Storage blob

func (*BlobItemInternal) UnmarshalXML

func (b *BlobItemInternal) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaller interface for type BlobItemInternal.

type BlobLeaseClient

type BlobLeaseClient struct {
	BlobClient
	// contains filtered or unexported fields
}

BlobLeaseClient represents lease client on blob

func (*BlobLeaseClient) AcquireLease

AcquireLease acquires a lease on the blob for write and delete operations. The lease Duration must be between 15 and 60 seconds, or infinite (-1). For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-blob.

func (*BlobLeaseClient) BreakLease

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 (*BlobLeaseClient) ChangeLease

ChangeLease changes the blob's lease ID. For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-blob.

func (*BlobLeaseClient) ReleaseLease

ReleaseLease releases the blob's previously-acquired lease. For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-blob.

func (*BlobLeaseClient) RenewLease

RenewLease renews the blob's previously-acquired lease. For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-blob.

type BlobPrefix

type BlobPrefix struct {
	// REQUIRED
	Name *string `xml:"Name"`
}

BlobPrefix struct

type BlobPropertiesInternal

type BlobPropertiesInternal struct {
	// REQUIRED
	Etag *string `xml:"Etag"`

	// REQUIRED
	LastModified         *time.Time     `xml:"Last-Modified"`
	AccessTier           *AccessTier    `xml:"AccessTier"`
	AccessTierChangeTime *time.Time     `xml:"AccessTierChangeTime"`
	AccessTierInferred   *bool          `xml:"AccessTierInferred"`
	ArchiveStatus        *ArchiveStatus `xml:"ArchiveStatus"`
	BlobSequenceNumber   *int64         `xml:"x-ms-blob-sequence-number"`
	BlobType             *BlobType      `xml:"BlobType"`
	CacheControl         *string        `xml:"Cache-Control"`
	ContentDisposition   *string        `xml:"Content-Disposition"`
	ContentEncoding      *string        `xml:"Content-Encoding"`
	ContentLanguage      *string        `xml:"Content-Language"`

	// Size in bytes
	ContentLength             *int64          `xml:"Content-Length"`
	ContentMD5                []byte          `xml:"Content-MD5"`
	ContentType               *string         `xml:"Content-Type"`
	CopyCompletionTime        *time.Time      `xml:"CopyCompletionTime"`
	CopyID                    *string         `xml:"CopyId"`
	CopyProgress              *string         `xml:"CopyProgress"`
	CopySource                *string         `xml:"CopySource"`
	CopyStatus                *CopyStatusType `xml:"CopyStatus"`
	CopyStatusDescription     *string         `xml:"CopyStatusDescription"`
	CreationTime              *time.Time      `xml:"Creation-Time"`
	CustomerProvidedKeySHA256 *string         `xml:"CustomerProvidedKeySha256"`
	DeletedTime               *time.Time      `xml:"DeletedTime"`
	DestinationSnapshot       *string         `xml:"DestinationSnapshot"`

	// The name of the encryption scope under which the blob is encrypted.
	EncryptionScope             *string                     `xml:"EncryptionScope"`
	ExpiresOn                   *time.Time                  `xml:"Expiry-Time"`
	ImmutabilityPolicyExpiresOn *time.Time                  `xml:"ImmutabilityPolicyUntilDate"`
	ImmutabilityPolicyMode      *BlobImmutabilityPolicyMode `xml:"ImmutabilityPolicyMode"`
	IncrementalCopy             *bool                       `xml:"IncrementalCopy"`
	IsSealed                    *bool                       `xml:"Sealed"`
	LastAccessedOn              *time.Time                  `xml:"LastAccessTime"`
	LeaseDuration               *LeaseDurationType          `xml:"LeaseDuration"`
	LeaseState                  *LeaseStateType             `xml:"LeaseState"`
	LeaseStatus                 *LeaseStatusType            `xml:"LeaseStatus"`
	LegalHold                   *bool                       `xml:"LegalHold"`

	// If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are High
	// and Standard.
	RehydratePriority      *RehydratePriority `xml:"RehydratePriority"`
	RemainingRetentionDays *int32             `xml:"RemainingRetentionDays"`
	ServerEncrypted        *bool              `xml:"ServerEncrypted"`
	TagCount               *int32             `xml:"TagCount"`
}

BlobPropertiesInternal - Properties of a blob

func (BlobPropertiesInternal) MarshalXML

func (b BlobPropertiesInternal) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaller interface for type BlobPropertiesInternal.

func (*BlobPropertiesInternal) UnmarshalXML

func (b *BlobPropertiesInternal) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaller interface for type BlobPropertiesInternal.

type BlobReleaseLeaseResponse

type BlobReleaseLeaseResponse struct {
	// contains filtered or unexported fields
}

BlobReleaseLeaseResponse contains the response from method BlobClient.ReleaseLease.

type BlobRenewLeaseOptions

type BlobRenewLeaseOptions struct {
	ModifiedAccessConditions *ModifiedAccessConditions
}

BlobRenewLeaseOptions provides set of configurations for RenewLeaseBlob operation

type BlobRenewLeaseResponse

type BlobRenewLeaseResponse struct {
	// contains filtered or unexported fields
}

BlobRenewLeaseResponse contains the response from method BlobClient.RenewLease.

type BlobSASPermissions

type BlobSASPermissions struct {
	Read, Add, Create, Write, Delete, DeletePreviousVersion, Tag, List, Move, Execute, Ownership, Permissions bool
}

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
	PreauthorizedAgentObjectId string
	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

func (BlobSASSignatureValues) NewSASQueryParameters

func (v BlobSASSignatureValues) NewSASQueryParameters(sharedKeyCredential *SharedKeyCredential) (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 BlobSetHTTPHeadersOptions

type BlobSetHTTPHeadersOptions struct {
	LeaseAccessConditions    *LeaseAccessConditions
	ModifiedAccessConditions *ModifiedAccessConditions
}

BlobSetHTTPHeadersOptions provides set of configurations for SetHTTPHeaders on blob operation

type BlobSetHTTPHeadersResponse

type BlobSetHTTPHeadersResponse struct {
	// contains filtered or unexported fields
}

BlobSetHTTPHeadersResponse contains the response from method BlobClient.SetHTTPHeaders.

type BlobSetMetadataOptions

type BlobSetMetadataOptions struct {
	LeaseAccessConditions    *LeaseAccessConditions
	CpkInfo                  *CpkInfo
	CpkScopeInfo             *CpkScopeInfo
	ModifiedAccessConditions *ModifiedAccessConditions
}

BlobSetMetadataOptions provides set of configurations for Set Metadata on blob operation

type BlobSetMetadataResponse

type BlobSetMetadataResponse struct {
	// contains filtered or unexported fields
}

BlobSetMetadataResponse contains the response from method BlobClient.SetMetadata.

type BlobSetTagsOptions

type BlobSetTagsOptions struct {
	// The version id parameter is an opaque DateTime value that, when present,
	// specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer.
	VersionID *string
	// Optional header, Specifies the transactional crc64 for the body, to be validated by the service.
	TransactionalContentCRC64 []byte
	// Optional header, Specifies the transactional md5 for the body, to be validated by the service.
	TransactionalContentMD5 []byte

	TagsMap map[string]string

	ModifiedAccessConditions *ModifiedAccessConditions
	LeaseAccessConditions    *LeaseAccessConditions
}

BlobSetTagsOptions provides set of configurations for SetTags operation

type BlobSetTagsResponse

type BlobSetTagsResponse struct {
	// contains filtered or unexported fields
}

BlobSetTagsResponse contains the response from method BlobClient.SetTags

type BlobSetTierOptions

type BlobSetTierOptions struct {
	// Optional: Indicates the priority with which to rehydrate an archived blob.
	RehydratePriority *RehydratePriority

	LeaseAccessConditions    *LeaseAccessConditions
	ModifiedAccessConditions *ModifiedAccessConditions
}

BlobSetTierOptions provides set of configurations for SetTier on blob operation

type BlobSetTierResponse

type BlobSetTierResponse struct {
	// contains filtered or unexported fields
}

BlobSetTierResponse contains the response from method BlobClient.SetTier.

type BlobStartCopyFromURLResponse

type BlobStartCopyFromURLResponse struct {
	// contains filtered or unexported fields
}

BlobStartCopyFromURLResponse contains the response from method BlobClient.StartCopyFromURL.

type BlobStartCopyOptions

type BlobStartCopyOptions struct {
	// Specifies the date time when the blobs immutability policy is set to expire.
	ImmutabilityPolicyExpiry *time.Time
	// Specifies the immutability policy mode to set on the blob.
	ImmutabilityPolicyMode *BlobImmutabilityPolicyMode
	// Specified if a legal hold should be set on the blob.
	LegalHold *bool
	// Optional. Used to set blob tags in various blob operations.
	TagsMap map[string]string
	// Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the
	// operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs
	// are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source
	// blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers.
	// See Naming and Referencing Containers, Blobs, and Metadata for more information.
	Metadata map[string]string
	// Optional: Indicates the priority with which to rehydrate an archived blob.
	RehydratePriority *RehydratePriority
	// Overrides the sealed state of the destination blob. Service version 2019-12-12 and newer.
	SealBlob *bool
	// Optional. Indicates the tier to be set on the blob.
	Tier *AccessTier

	SourceModifiedAccessConditions *SourceModifiedAccessConditions

	ModifiedAccessConditions *ModifiedAccessConditions

	LeaseAccessConditions *LeaseAccessConditions
}

BlobStartCopyOptions provides set of configurations for StartCopyFromURL blob operation

type BlobTag

type BlobTag struct {
	// REQUIRED
	Key *string `xml:"Key"`

	// REQUIRED
	Value *string `xml:"Value"`
}

BlobTag struct

type BlobTags

type BlobTags struct {
	// REQUIRED
	BlobTagSet []*BlobTag `xml:"TagSet>Tag"`
}

BlobTags - Blob tags

func (BlobTags) MarshalXML

func (b BlobTags) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaller interface for type BlobTags.

type BlobType

type BlobType string

BlobType enum

const (
	BlobTypeBlockBlob  BlobType = "BlockBlob"
	BlobTypePageBlob   BlobType = "PageBlob"
	BlobTypeAppendBlob BlobType = "AppendBlob"
)

func PossibleBlobTypeValues

func PossibleBlobTypeValues() []BlobType

PossibleBlobTypeValues returns the possible values for the BlobType const type.

func (BlobType) ToPtr

func (c BlobType) ToPtr() *BlobType

ToPtr returns a *BlobType pointing to the current value.

type BlobURLParts

type BlobURLParts struct {
	Scheme              string // Ex: "https://"
	Host                string // Ex: "account.blob.core.windows.net", "10.132.141.33", "10.132.141.33:80"
	IPEndpointStyleInfo IPEndpointStyleInfo
	ContainerName       string // "" if no container
	BlobName            string // "" if no blob
	Snapshot            string // "" if not a snapshot
	SAS                 SASQueryParameters
	UnparsedParams      string
	VersionID           string // "" if not versioning enabled
}

BlobURLParts object represents the components that make up an Azure Storage Container/Blob URL. You parse an existing URL into its parts by calling NewBlobURLParts(). You construct a URL from parts by calling URL(). NOTE: Changing any SAS-related field requires computing a new SAS signature.

func NewBlobURLParts

func NewBlobURLParts(u string) (BlobURLParts, error)

NewBlobURLParts parses a URL initializing BlobURLParts' fields including any SAS-related & snapshot query parameters. Any other query parameters remain in the UnparsedParams field. This method overwrites all fields in the BlobURLParts object.

func (BlobURLParts) URL

func (up BlobURLParts) URL() string

URL returns a URL object whose fields are initialized from the BlobURLParts fields. The URL's RawQuery field contains the SAS, snapshot, and unparsed query parameters.

type BlobUndeleteOptions

type BlobUndeleteOptions struct {
}

BlobUndeleteOptions provides set of configurations for Blob Undelete operation

type BlobUndeleteResponse

type BlobUndeleteResponse struct {
	// contains filtered or unexported fields
}

BlobUndeleteResponse contains the response from method BlobClient.Undelete.

type Block

type Block struct {
	// REQUIRED; The base64 encoded block ID.
	Name *string `xml:"Name"`

	// REQUIRED; The block size in bytes.
	Size *int64 `xml:"Size"`
}

Block - Represents a single block in a block blob. It describes the block's ID and size.

type BlockBlobClient

type BlockBlobClient struct {
	BlobClient
	// contains filtered or unexported fields
}

BlockBlobClient defines a set of operations applicable to block blobs.

func NewBlockBlobClient

func NewBlockBlobClient(blobURL string, cred azcore.TokenCredential, options *ClientOptions) (*BlockBlobClient, error)

NewBlockBlobClient creates a BlockBlobClient object using the specified URL, Azure AD credential, and options.

func NewBlockBlobClientWithNoCredential

func NewBlockBlobClientWithNoCredential(blobURL string, options *ClientOptions) (*BlockBlobClient, error)

NewBlockBlobClientWithNoCredential creates a BlockBlobClient object using the specified URL and options.

func NewBlockBlobClientWithSharedKey

func NewBlockBlobClientWithSharedKey(blobURL string, cred *SharedKeyCredential, options *ClientOptions) (*BlockBlobClient, error)

NewBlockBlobClientWithSharedKey creates a BlockBlobClient object using the specified URL, shared key, and options.

func (*BlockBlobClient) CommitBlockList

func (bb *BlockBlobClient) CommitBlockList(ctx context.Context, base64BlockIDs []string, options *BlockBlobCommitBlockListOptions) (BlockBlobCommitBlockListResponse, error)

CommitBlockList writes a blob by specifying the list of block IDs that make up the blob. In order to be written as part of a blob, a block must have been successfully written to the server in a prior PutBlock operation. You can call PutBlockList to update a blob by uploading only those blocks that have changed, then committing the new and existing blocks together. Any blocks not specified in the block list and permanently deleted. For more information, see https://docs.microsoft.com/rest/api/storageservices/put-block-list.

func (*BlockBlobClient) CopyFromURL

CopyFromURL synchronously copies the data at the source URL to a block blob, with sizes up to 256 MB. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url.

func (*BlockBlobClient) GetBlockList

GetBlockList returns the list of blocks that have been uploaded as part of a block blob using the specified block list filter. For more information, see https://docs.microsoft.com/rest/api/storageservices/get-block-list.

func (*BlockBlobClient) StageBlock

StageBlock uploads the specified block to the block blob's "staging area" to be later committed by a call to CommitBlockList. Note that the http client closes the body stream after the request is sent to the service. For more information, see https://docs.microsoft.com/rest/api/storageservices/put-block.

func (*BlockBlobClient) StageBlockFromURL

func (bb *BlockBlobClient) StageBlockFromURL(ctx context.Context, base64BlockID string, sourceURL string,
	contentLength int64, options *BlockBlobStageBlockFromURLOptions) (BlockBlobStageBlockFromURLResponse, error)

StageBlockFromURL copies the specified block from a source URL to the block blob's "staging area" to be later committed by a call to CommitBlockList. If count is CountToEnd (0), then data is read from specified offset to the end. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url.

func (*BlockBlobClient) Upload

Upload creates a new block blob or overwrites an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported with Upload; the content of the existing blob is overwritten with the new content. To perform a partial update of a block blob, use StageBlock and CommitBlockList. This method panics if the stream is not at position 0. Note that the http client closes the body stream after the request is sent to the service. For more information, see https://docs.microsoft.com/rest/api/storageservices/put-blob.

func (*BlockBlobClient) UploadBuffer

func (bb *BlockBlobClient) UploadBuffer(ctx context.Context, b []byte, o UploadOption) (*http.Response, error)

UploadBuffer uploads a buffer in blocks to a block blob.

func (*BlockBlobClient) UploadFile

func (bb *BlockBlobClient) UploadFile(ctx context.Context, file *os.File, o UploadOption) (*http.Response, error)

UploadFile uploads a file in blocks to a block blob.

func (*BlockBlobClient) UploadStream

UploadStream copies the file held in io.Reader to the Blob at blockBlobClient. A Context deadline or cancellation will cause this to error.

func (*BlockBlobClient) WithSnapshot

func (bb *BlockBlobClient) WithSnapshot(snapshot string) (*BlockBlobClient, error)

WithSnapshot creates a new BlockBlobClient object identical to the source but with the specified snapshot timestamp. Pass "" to remove the snapshot returning a URL to the base blob.

func (*BlockBlobClient) WithVersionID

func (bb *BlockBlobClient) WithVersionID(versionID string) (*BlockBlobClient, error)

WithVersionID creates a new AppendBlobURL object identical to the source but with the specified version id. Pass "" to remove the versionID returning a URL to the base blob.

type BlockBlobCommitBlockListOptions

type BlockBlobCommitBlockListOptions struct {
	BlobTagsMap               map[string]string
	Metadata                  map[string]string
	RequestID                 *string
	Tier                      *AccessTier
	Timeout                   *int32
	TransactionalContentCRC64 []byte
	TransactionalContentMD5   []byte
	BlobHTTPHeaders           *BlobHTTPHeaders
	CpkInfo                   *CpkInfo
	CpkScopeInfo              *CpkScopeInfo
	BlobAccessConditions      *BlobAccessConditions
}

BlockBlobCommitBlockListOptions provides set of configurations for CommitBlockList operation

type BlockBlobCommitBlockListResponse

type BlockBlobCommitBlockListResponse struct {
	// contains filtered or unexported fields
}

BlockBlobCommitBlockListResponse contains the response from method BlockBlobClient.CommitBlockList.

type BlockBlobCopyFromURLOptions

type BlockBlobCopyFromURLOptions struct {
	// Optional. Used to set blob tags in various blob operations.
	BlobTagsMap map[string]string
	// Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source.
	CopySourceAuthorization *string
	// Specifies the date time when the blobs immutability policy is set to expire.
	ImmutabilityPolicyExpiry *time.Time
	// Specifies the immutability policy mode to set on the blob.
	ImmutabilityPolicyMode *BlobImmutabilityPolicyMode
	// Specified if a legal hold should be set on the blob.
	LegalHold *bool
	// Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the
	// operation will copy the metadata from the source blob or file to the destination
	// blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata
	// is not copied from the source blob or file. Note that beginning with
	// version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers,
	// Blobs, and Metadata for more information.
	Metadata map[string]string
	// Specify the md5 calculated for the range of bytes that must be read from the copy source.
	SourceContentMD5 []byte
	// Optional. Indicates the tier to be set on the blob.
	Tier *AccessTier

	SourceModifiedAccessConditions *SourceModifiedAccessConditions

	BlobAccessConditions *BlobAccessConditions
}

BlockBlobCopyFromURLOptions provides set of configurations for CopyBlockBlobFromURL operation

type BlockBlobCopyFromURLResponse

type BlockBlobCopyFromURLResponse struct {
	// contains filtered or unexported fields
}

BlockBlobCopyFromURLResponse contains the response from method BlockBlobClient.CopyFromURL.

type BlockBlobGetBlockListOptions

type BlockBlobGetBlockListOptions struct {
	Snapshot             *string
	BlobAccessConditions *BlobAccessConditions
}

BlockBlobGetBlockListOptions provides set of configurations for GetBlockList operation

type BlockBlobGetBlockListResponse

type BlockBlobGetBlockListResponse struct {
	// contains filtered or unexported fields
}

BlockBlobGetBlockListResponse contains the response from method BlockBlobClient.GetBlockList.

type BlockBlobStageBlockFromURLOptions

type BlockBlobStageBlockFromURLOptions struct {
	// Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source.
	CopySourceAuthorization *string

	LeaseAccessConditions *LeaseAccessConditions

	SourceModifiedAccessConditions *SourceModifiedAccessConditions
	// Specify the md5 calculated for the range of bytes that must be read from the copy source.
	SourceContentMD5 []byte
	// Specify the crc64 calculated for the range of bytes that must be read from the copy source.
	SourceContentCRC64 []byte

	Offset *int64

	Count *int64

	CpkInfo *CpkInfo

	CpkScopeInfo *CpkScopeInfo
}

BlockBlobStageBlockFromURLOptions provides set of configurations for StageBlockFromURL operation

type BlockBlobStageBlockFromURLResponse

type BlockBlobStageBlockFromURLResponse struct {
	// contains filtered or unexported fields
}

BlockBlobStageBlockFromURLResponse contains the response from method BlockBlobClient.StageBlockFromURL.

type BlockBlobStageBlockOptions

type BlockBlobStageBlockOptions struct {
	CpkInfo *CpkInfo

	CpkScopeInfo *CpkScopeInfo

	LeaseAccessConditions *LeaseAccessConditions
	// Specify the transactional crc64 for the body, to be validated by the service.
	TransactionalContentCRC64 []byte
	// Specify the transactional md5 for the body, to be validated by the service.
	TransactionalContentMD5 []byte
}

BlockBlobStageBlockOptions provides set of configurations for StageBlock operation

type BlockBlobStageBlockResponse

type BlockBlobStageBlockResponse struct {
	// contains filtered or unexported fields
}

BlockBlobStageBlockResponse contains the response from method BlockBlobClient.StageBlock.

type BlockBlobUploadOptions

type BlockBlobUploadOptions struct {
	// Optional. Used to set blob tags in various blob operations.
	TagsMap map[string]string

	// Optional. Specifies a user-defined name-value pair associated with the blob.
	Metadata map[string]string

	// Optional. Indicates the tier to be set on the blob.
	Tier *AccessTier

	// Specify the transactional md5 for the body, to be validated by the service.
	TransactionalContentMD5 []byte

	HTTPHeaders          *BlobHTTPHeaders
	CpkInfo              *CpkInfo
	CpkScopeInfo         *CpkScopeInfo
	BlobAccessConditions *BlobAccessConditions
}

BlockBlobUploadOptions provides set of configurations for UploadBlockBlob operation

type BlockBlobUploadResponse

type BlockBlobUploadResponse struct {
	// contains filtered or unexported fields
}

BlockBlobUploadResponse contains the response from method BlockBlobClient.Upload.

type BlockList

type BlockList struct {
	CommittedBlocks   []*Block `xml:"CommittedBlocks>Block"`
	UncommittedBlocks []*Block `xml:"UncommittedBlocks>Block"`
}

BlockList struct

func (BlockList) MarshalXML

func (b BlockList) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaller interface for type BlockList.

type BlockListType

type BlockListType string

BlockListType enum

const (
	BlockListTypeCommitted   BlockListType = "committed"
	BlockListTypeUncommitted BlockListType = "uncommitted"
	BlockListTypeAll         BlockListType = "all"
)

func PossibleBlockListTypeValues

func PossibleBlockListTypeValues() []BlockListType

PossibleBlockListTypeValues returns the possible values for the BlockListType const type.

func (BlockListType) ToPtr

func (c BlockListType) ToPtr() *BlockListType

ToPtr returns a *BlockListType pointing to the current value.

type BlockLookupList

type BlockLookupList struct {
	Committed   []*string `xml:"Committed"`
	Latest      []*string `xml:"Latest"`
	Uncommitted []*string `xml:"Uncommitted"`
}

BlockLookupList struct

func (BlockLookupList) MarshalXML

func (b BlockLookupList) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaller interface for type BlockLookupList.

type ClearRange

type ClearRange struct {
	// REQUIRED
	End *int64 `xml:"End"`

	// REQUIRED
	Start *int64 `xml:"Start"`
}

ClearRange enum

type ClientOptions

type ClientOptions struct {
	// Logging configures the built-in logging policy.
	Logging policy.LogOptions

	// Retry configures the built-in retry policy.
	Retry policy.RetryOptions

	// Telemetry configures the built-in telemetry policy.
	Telemetry policy.TelemetryOptions

	// Transport sets the transport for HTTP requests.
	Transport policy.Transporter

	// PerCallPolicies contains custom policies to inject into the pipeline.
	// Each policy is executed once per request.
	PerCallPolicies []policy.Policy

	// PerRetryPolicies contains custom policies to inject into the pipeline.
	// Each policy is executed once per request, and for each retry of that request.
	PerRetryPolicies []policy.Policy
}

ClientOptions adds additional client options while constructing connection

type ContainerAccessConditions

type ContainerAccessConditions struct {
	ModifiedAccessConditions *ModifiedAccessConditions
	LeaseAccessConditions    *LeaseAccessConditions
}

ContainerAccessConditions identifies container-specific access conditions which you optionally set.

type ContainerAcquireLeaseOptions

type ContainerAcquireLeaseOptions struct {
	Duration                 *int32
	ModifiedAccessConditions *ModifiedAccessConditions
}

ContainerAcquireLeaseOptions provides set of configurations for AcquireLeaseContainer operation

type ContainerAcquireLeaseResponse

type ContainerAcquireLeaseResponse struct {
	// contains filtered or unexported fields
}

ContainerAcquireLeaseResponse contains the response from method ContainerLeaseClient.AcquireLease.

type ContainerBreakLeaseOptions

type ContainerBreakLeaseOptions struct {
	BreakPeriod              *int32
	ModifiedAccessConditions *ModifiedAccessConditions
}

ContainerBreakLeaseOptions provides set of configurations for BreakLeaseContainer operation

type ContainerBreakLeaseResponse

type ContainerBreakLeaseResponse struct {
	// contains filtered or unexported fields
}

ContainerBreakLeaseResponse contains the response from method ContainerLeaseClient.BreakLease.

type ContainerChangeLeaseOptions

type ContainerChangeLeaseOptions struct {
	ProposedLeaseID          *string
	ModifiedAccessConditions *ModifiedAccessConditions
}

ContainerChangeLeaseOptions provides set of configurations for ChangeLeaseContainer operation

type ContainerChangeLeaseResponse

type ContainerChangeLeaseResponse struct {
	// contains filtered or unexported fields
}

ContainerChangeLeaseResponse contains the response from method ContainerLeaseClient.ChangeLease.

type ContainerClient

type ContainerClient struct {
	// contains filtered or unexported fields
}

ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs.

func NewContainerClient

func NewContainerClient(containerURL string, cred azcore.TokenCredential, options *ClientOptions) (*ContainerClient, error)

NewContainerClient creates a ContainerClient object using the specified URL, Azure AD credential, and options.

func NewContainerClientFromConnectionString

func NewContainerClientFromConnectionString(connectionString string, containerName string, options *ClientOptions) (*ContainerClient, error)

NewContainerClientFromConnectionString creates a ContainerClient object using connection string of an account

func NewContainerClientWithNoCredential

func NewContainerClientWithNoCredential(containerURL string, options *ClientOptions) (*ContainerClient, error)

NewContainerClientWithNoCredential creates a ContainerClient object using the specified URL and options.

func NewContainerClientWithSharedKey

func NewContainerClientWithSharedKey(containerURL string, cred *SharedKeyCredential, options *ClientOptions) (*ContainerClient, error)

NewContainerClientWithSharedKey creates a ContainerClient object using the specified URL, shared key, and options.

func (*ContainerClient) Create

Create creates a new container within a storage account. If a container with the same name already exists, the operation fails. For more information, see https://docs.microsoft.com/rest/api/storageservices/create-container.

func (*ContainerClient) Delete

Delete marks the specified container for deletion. The container and any blobs contained within it are later deleted during garbage collection. For more information, see https://docs.microsoft.com/rest/api/storageservices/delete-container.

func (*ContainerClient) GetAccessPolicy

GetAccessPolicy returns the container's access policy. The access policy indicates whether container's blobs may be accessed publicly. For more information, see https://docs.microsoft.com/rest/api/storageservices/get-container-acl.

func (*ContainerClient) GetProperties

GetProperties returns the container's properties. For more information, see https://docs.microsoft.com/rest/api/storageservices/get-container-metadata.

func (*ContainerClient) GetSASURL

func (c *ContainerClient) GetSASURL(permissions ContainerSASPermissions, start time.Time, expiry time.Time) (string, error)

GetSASURL is a convenience method for generating a SAS token for the currently pointed at container. It can only be used if the credential supplied during creation was a SharedKeyCredential.

func (*ContainerClient) ListBlobsFlat

ListBlobsFlat returns a pager for blobs starting from the specified Marker. Use an empty Marker to start enumeration from the beginning. Blob names are returned in lexicographic order. For more information, see https://docs.microsoft.com/rest/api/storageservices/list-blobs.

func (*ContainerClient) ListBlobsHierarchy

ListBlobsHierarchy returns a channel of blobs starting from the specified Marker. Use an empty Marker to start enumeration from the beginning. Blob names are returned in lexicographic order. After getting a segment, process it, and then call ListBlobsHierarchicalSegment again (passing the the previously-returned Marker) to get the next segment. For more information, see https://docs.microsoft.com/rest/api/storageservices/list-blobs. AutoPagerTimeout specifies the amount of time with no read operations before the channel times out and closes. Specify no time and it will be ignored. AutoPagerBufferSize specifies the channel's buffer size. Both the blob item channel and error channel should be watched. Only one error will be released via this channel (or a nil error, to register a clean exit.)

func (*ContainerClient) NewAppendBlobClient

func (c *ContainerClient) NewAppendBlobClient(blobName string) (*AppendBlobClient, error)

NewAppendBlobClient creates a new AppendBlobURL object by concatenating blobName to the end of ContainerClient's URL. The new AppendBlobURL uses the same request policy pipeline as the ContainerClient. To change the pipeline, create the AppendBlobURL and then call its WithPipeline method passing in the desired pipeline object. Or, call this package's NewAppendBlobClient instead of calling this object's NewAppendBlobClient method.

func (*ContainerClient) NewBlobClient

func (c *ContainerClient) NewBlobClient(blobName string) (*BlobClient, error)

NewBlobClient creates a new BlobClient object by concatenating blobName to the end of ContainerClient's URL. The new BlobClient uses the same request policy pipeline as the ContainerClient. To change the pipeline, create the BlobClient and then call its WithPipeline method passing in the desired pipeline object. Or, call this package's NewBlobClient instead of calling this object's NewBlobClient method.

func (*ContainerClient) NewBlockBlobClient

func (c *ContainerClient) NewBlockBlobClient(blobName string) (*BlockBlobClient, error)

NewBlockBlobClient creates a new BlockBlobClient object by concatenating blobName to the end of ContainerClient's URL. The new BlockBlobClient uses the same request policy pipeline as the ContainerClient. To change the pipeline, create the BlockBlobClient and then call its WithPipeline method passing in the desired pipeline object. Or, call this package's NewBlockBlobClient instead of calling this object's NewBlockBlobClient method.

func (*ContainerClient) NewContainerLeaseClient

func (c *ContainerClient) NewContainerLeaseClient(leaseID *string) (*ContainerLeaseClient, error)

NewContainerLeaseClient is constructor of ContainerLeaseClient

func (*ContainerClient) NewPageBlobClient

func (c *ContainerClient) NewPageBlobClient(blobName string) (*PageBlobClient, error)

NewPageBlobClient creates a new PageBlobURL object by concatenating blobName to the end of ContainerClient's URL. The new PageBlobURL uses the same request policy pipeline as the ContainerClient. To change the pipeline, create the PageBlobURL and then call its WithPipeline method passing in the desired pipeline object. Or, call this package's NewPageBlobClient instead of calling this object's NewPageBlobClient method.

func (*ContainerClient) SetAccessPolicy

SetAccessPolicy sets the container's permissions. The access policy indicates whether blobs in a container may be accessed publicly. For more information, see https://docs.microsoft.com/rest/api/storageservices/set-container-acl.

func (*ContainerClient) SetMetadata

SetMetadata sets the container's metadata. For more information, see https://docs.microsoft.com/rest/api/storageservices/set-container-metadata.

func (*ContainerClient) URL

func (c *ContainerClient) URL() string

URL returns the URL endpoint used by the ContainerClient object.

type ContainerCpkScopeInfo

type ContainerCpkScopeInfo struct {
	// Optional. Version 2019-07-07 and later. Specifies the default encryption scope to set on the container and use for all
	// future writes.
	DefaultEncryptionScope *string
	// Optional. Version 2019-07-07 and newer. If true, prevents any request from specifying a different encryption scope than
	// the scope set on the container.
	PreventEncryptionScopeOverride *bool
}

ContainerCpkScopeInfo contains a group of parameters for the containerClient.Create method.

type ContainerCreateOptions

type ContainerCreateOptions struct {
	// Specifies whether data in the container may be accessed publicly and the level of access
	Access *PublicAccessType

	// Optional. Specifies a user-defined name-value pair associated with the blob.
	Metadata map[string]string

	// Optional. Specifies the encryption scope settings to set on the container.
	CpkScope *ContainerCpkScopeInfo
}

ContainerCreateOptions provides set of configurations for CreateContainer operation

type ContainerCreateResponse

type ContainerCreateResponse struct {
	// contains filtered or unexported fields
}

ContainerCreateResponse is wrapper around containerClientCreateResponse

type ContainerDeleteOptions

type ContainerDeleteOptions struct {
	LeaseAccessConditions    *LeaseAccessConditions
	ModifiedAccessConditions *ModifiedAccessConditions
}

ContainerDeleteOptions provides set of configurations for DeleteContainer operation

type ContainerDeleteResponse

type ContainerDeleteResponse struct {
	// contains filtered or unexported fields
}

ContainerDeleteResponse contains the response from method ContainerClient.Delete.

type ContainerGetAccessPolicyOptions

type ContainerGetAccessPolicyOptions struct {
	LeaseAccessConditions *LeaseAccessConditions
}

ContainerGetAccessPolicyOptions provides set of configurations for GetAccessPolicy operation

type ContainerGetAccessPolicyResponse

type ContainerGetAccessPolicyResponse struct {
	// contains filtered or unexported fields
}

ContainerGetAccessPolicyResponse contains the response from method ContainerClient.GetAccessPolicy.

type ContainerGetPropertiesOptions

type ContainerGetPropertiesOptions struct {
	LeaseAccessConditions *LeaseAccessConditions
}

ContainerGetPropertiesOptions provides set of configurations for GetPropertiesContainer operation

type ContainerGetPropertiesResponse

type ContainerGetPropertiesResponse struct {
	// contains filtered or unexported fields
}

ContainerGetPropertiesResponse contains the response from method ContainerClient.GetProperties

type ContainerItem

type ContainerItem struct {
	// REQUIRED
	Name *string `xml:"Name"`

	// REQUIRED; Properties of a container
	Properties *ContainerProperties `xml:"Properties"`
	Deleted    *bool                `xml:"Deleted"`

	// Dictionary of
	Metadata map[string]*string `xml:"Metadata"`
	Version  *string            `xml:"Version"`
}

ContainerItem - An Azure Storage container

func (*ContainerItem) UnmarshalXML

func (c *ContainerItem) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaller interface for type ContainerItem.

type ContainerLeaseClient

type ContainerLeaseClient struct {
	ContainerClient
	// contains filtered or unexported fields
}

ContainerLeaseClient represents lease client of container

func (*ContainerLeaseClient) AcquireLease

AcquireLease acquires a lease on the container for delete operations. The lease Duration must be between 15 to 60 seconds, or infinite (-1). For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-container.

func (*ContainerLeaseClient) BreakLease

BreakLease breaks the container's previously-acquired lease (if it exists). For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-container.

func (*ContainerLeaseClient) ChangeLease

ChangeLease changes the container's lease ID. For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-container.

func (*ContainerLeaseClient) ReleaseLease

ReleaseLease releases the container's previously-acquired lease. For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-container.

func (*ContainerLeaseClient) RenewLease

RenewLease renews the container's previously-acquired lease. For more information, see https://docs.microsoft.com/rest/api/storageservices/lease-container.

type ContainerListBlobFlatPager

type ContainerListBlobFlatPager struct {
	// contains filtered or unexported fields
}

ContainerListBlobFlatPager provides operations for iterating over paged responses

func (ContainerListBlobFlatPager) Err

func (p ContainerListBlobFlatPager) Err() error

Err returns the last error encountered while paging.

func (ContainerListBlobFlatPager) NextPage

func (p ContainerListBlobFlatPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (ContainerListBlobFlatPager) PageResponse

func (p ContainerListBlobFlatPager) PageResponse() containerClientListBlobFlatSegmentResponse

PageResponse returns the current containerClientListBlobFlatSegmentResponse page.

type ContainerListBlobHierarchyPager

type ContainerListBlobHierarchyPager struct {
	// contains filtered or unexported fields
}

ContainerListBlobHierarchyPager provides operations for iterating over paged responses.

func (*ContainerListBlobHierarchyPager) Err

func (p *ContainerListBlobHierarchyPager) Err() error

Err returns the last error encountered while paging.

func (*ContainerListBlobHierarchyPager) NextPage

func (p *ContainerListBlobHierarchyPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ContainerListBlobHierarchyPager) PageResponse

func (p *ContainerListBlobHierarchyPager) PageResponse() containerClientListBlobHierarchySegmentResponse

PageResponse returns the current containerClientListBlobHierarchySegmentResponse page.

type ContainerListBlobsFlatOptions

type ContainerListBlobsFlatOptions struct {
	// Include this parameter to specify one or more datasets to include in the response.
	Include []ListBlobsIncludeItem
	// A string value that identifies the portion of the list of containers to be returned with the next listing operation. The
	// operation returns the NextMarker value within the response body if the listing
	// operation did not return all containers remaining to be listed with the current page. The NextMarker value can be used
	// as the value for the marker parameter in a subsequent call to request the next
	// page of list items. The marker value is opaque to the client.
	Marker *string
	// Specifies the maximum number of containers to return. If the request does not specify maxresults, or specifies a value
	// greater than 5000, the server will return up to 5000 items. Note that if the
	// listing operation crosses a partition boundary, then the service will return a continuation token for retrieving the remainder
	// of the results. For this reason, it is possible that the service will
	// return fewer results than specified by maxresults, or than the default of 5000.
	MaxResults *int32
	// Filters the results to return only containers whose name begins with the specified prefix.
	Prefix *string
}

ContainerListBlobsFlatOptions provides set of configurations for SetAccessPolicy operation

type ContainerListBlobsHierarchyOptions

type ContainerListBlobsHierarchyOptions struct {
	// Include this parameter to specify one or more datasets to include in the response.
	Include []ListBlobsIncludeItem
	// A string value that identifies the portion of the list of containers to be returned with the next listing operation. The
	// operation returns the NextMarker value within the response body if the listing
	// operation did not return all containers remaining to be listed with the current page. The NextMarker value can be used
	// as the value for the marker parameter in a subsequent call to request the next
	// page of list items. The marker value is opaque to the client.
	Marker *string
	// Specifies the maximum number of containers to return. If the request does not specify maxresults, or specifies a value
	// greater than 5000, the server will return up to 5000 items. Note that if the
	// listing operation crosses a partition boundary, then the service will return a continuation token for retrieving the remainder
	// of the results. For this reason, it is possible that the service will
	// return fewer results than specified by maxresults, or than the default of 5000.
	MaxResults *int32
	// Filters the results to return only containers whose name begins with the specified prefix.
	Prefix *string
}

ContainerListBlobsHierarchyOptions provides set of configurations for ContainerClient.ListBlobsHierarchy

type ContainerProperties

type ContainerProperties struct {
	// REQUIRED
	Etag *string `xml:"Etag"`

	// REQUIRED
	LastModified           *time.Time `xml:"Last-Modified"`
	DefaultEncryptionScope *string    `xml:"DefaultEncryptionScope"`
	DeletedTime            *time.Time `xml:"DeletedTime"`
	HasImmutabilityPolicy  *bool      `xml:"HasImmutabilityPolicy"`
	HasLegalHold           *bool      `xml:"HasLegalHold"`

	// Indicates if version level worm is enabled on this container.
	IsImmutableStorageWithVersioningEnabled *bool              `xml:"ImmutableStorageWithVersioningEnabled"`
	LeaseDuration                           *LeaseDurationType `xml:"LeaseDuration"`
	LeaseState                              *LeaseStateType    `xml:"LeaseState"`
	LeaseStatus                             *LeaseStatusType   `xml:"LeaseStatus"`
	PreventEncryptionScopeOverride          *bool              `xml:"DenyEncryptionScopeOverride"`
	PublicAccess                            *PublicAccessType  `xml:"PublicAccess"`
	RemainingRetentionDays                  *int32             `xml:"RemainingRetentionDays"`
}

ContainerProperties - Properties of a container

func (ContainerProperties) MarshalXML

func (c ContainerProperties) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaller interface for type ContainerProperties.

func (*ContainerProperties) UnmarshalXML

func (c *ContainerProperties) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaller interface for type ContainerProperties.

type ContainerReleaseLeaseOptions

type ContainerReleaseLeaseOptions struct {
	ModifiedAccessConditions *ModifiedAccessConditions
}

ContainerReleaseLeaseOptions provides set of configurations for ReleaseLeaseContainer operation

type ContainerReleaseLeaseResponse

type ContainerReleaseLeaseResponse struct {
	// contains filtered or unexported fields
}

ContainerReleaseLeaseResponse contains the response from method ContainerLeaseClient.ReleaseLease.

type ContainerRenewLeaseOptions

type ContainerRenewLeaseOptions struct {
	ModifiedAccessConditions *ModifiedAccessConditions
}

ContainerRenewLeaseOptions provides set of configurations for RenewLeaseContainer operation

type ContainerRenewLeaseResponse

type ContainerRenewLeaseResponse struct {
	// contains filtered or unexported fields
}

ContainerRenewLeaseResponse contains the response from method ContainerLeaseClient.RenewLease.

type ContainerSASPermissions

type ContainerSASPermissions struct {
	Read, Add, Create, Write, Delete, DeletePreviousVersion, List, Tag bool
	Execute, ModifyOwnership, ModifyPermissions                        bool // Hierarchical Namespace only
}

ContainerSASPermissions type simplifies creating the permissions string for an Azure Storage container SAS. Initialize an instance of this type and then call its String method to set BlobSASSignatureValues's Permissions field. All permissions descriptions can be found here: https://docs.microsoft.com/en-us/rest/api/storageservices/create-service-sas#permissions-for-a-directory-container-or-blob

func (*ContainerSASPermissions) Parse

func (p *ContainerSASPermissions) Parse(s string) error

Parse initializes the ContainerSASPermissions's fields from a string.

func (ContainerSASPermissions) String

func (p ContainerSASPermissions) String() string

String produces the SAS permissions string for an Azure Storage container. Call this method to set BlobSASSignatureValues's Permissions field.

type ContainerSetAccessPolicyOptions

type ContainerSetAccessPolicyOptions struct {
	AccessConditions *ContainerAccessConditions
	// Specifies whether data in the container may be accessed publicly and the level of access
	Access *PublicAccessType
	// the acls for the container
	ContainerACL []*SignedIdentifier
	// Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage
	// analytics logging is enabled.
	RequestID *string
	// The timeout parameter is expressed in seconds. For more information, see Setting Timeouts for Blob Service Operations.
	// [https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations]
	Timeout *int32
}

ContainerSetAccessPolicyOptions provides set of configurations for ContainerClient.SetAccessPolicy operation

type ContainerSetAccessPolicyResponse

type ContainerSetAccessPolicyResponse struct {
	// contains filtered or unexported fields
}

ContainerSetAccessPolicyResponse contains the response from method ContainerClient.SetAccessPolicy

type ContainerSetMetadataOptions

type ContainerSetMetadataOptions struct {
	Metadata                 map[string]string
	LeaseAccessConditions    *LeaseAccessConditions
	ModifiedAccessConditions *ModifiedAccessConditions
}

ContainerSetMetadataOptions provides set of configurations for SetMetadataContainer operation

type ContainerSetMetadataResponse

type ContainerSetMetadataResponse struct {
	// contains filtered or unexported fields
}

ContainerSetMetadataResponse contains the response from method containerClient.SetMetadata

type CopyStatusType

type CopyStatusType string

CopyStatusType enum

const (
	CopyStatusTypePending CopyStatusType = "pending"
	CopyStatusTypeSuccess CopyStatusType = "success"
	CopyStatusTypeAborted CopyStatusType = "aborted"
	CopyStatusTypeFailed  CopyStatusType = "failed"
)

func PossibleCopyStatusTypeValues

func PossibleCopyStatusTypeValues() []CopyStatusType

PossibleCopyStatusTypeValues returns the possible values for the CopyStatusType const type.

func (CopyStatusType) ToPtr

func (c CopyStatusType) ToPtr() *CopyStatusType

ToPtr returns a *CopyStatusType pointing to the current value.

type CorsRule

type CorsRule struct {
	// REQUIRED; the request headers that the origin domain may specify on the CORS request.
	AllowedHeaders *string `xml:"AllowedHeaders"`

	// REQUIRED; The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated)
	AllowedMethods *string `xml:"AllowedMethods"`

	// REQUIRED; The origin domains that are permitted to make a request against the storage service via CORS. The origin domain
	// is the domain from which the request originates. Note that the origin must be an exact
	// case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character '*'
	// to allow all origin domains to make requests via CORS.
	AllowedOrigins *string `xml:"AllowedOrigins"`

	// REQUIRED; The response headers that may be sent in the response to the CORS request and exposed by the browser to the request
	// issuer
	ExposedHeaders *string `xml:"ExposedHeaders"`

	// REQUIRED; The maximum amount time that a browser should cache the preflight OPTIONS request.
	MaxAgeInSeconds *int32 `xml:"MaxAgeInSeconds"`
}

CorsRule - CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain

type CpkInfo

type CpkInfo struct {
	// The algorithm used to produce the encryption key hash. Currently, the only accepted value is "AES256". Must be provided
	// if the x-ms-encryption-key header is provided.
	EncryptionAlgorithm *EncryptionAlgorithmType
	// Optional. Specifies the encryption key to use to encrypt the data provided in the request. If not specified, encryption
	// is performed with the root account encryption key. For more information, see
	// Encryption at Rest for Azure Storage Services.
	EncryptionKey *string
	// The SHA-256 hash of the provided encryption key. Must be provided if the x-ms-encryption-key header is provided.
	EncryptionKeySHA256 *string
}

CpkInfo contains a group of parameters for the blobClient.Download method.

type CpkScopeInfo

type CpkScopeInfo struct {
	// Optional. Version 2019-07-07 and later. Specifies the name of the encryption scope to use to encrypt the data provided
	// in the request. If not specified, encryption is performed with the default
	// account encryption scope. For more information, see Encryption at Rest for Azure Storage Services.
	EncryptionScope *string
}

CpkScopeInfo contains a group of parameters for the blobClient.SetMetadata method.

type DeleteSnapshotsOptionType

type DeleteSnapshotsOptionType string

DeleteSnapshotsOptionType enum

const (
	DeleteSnapshotsOptionTypeInclude DeleteSnapshotsOptionType = "include"
	DeleteSnapshotsOptionTypeOnly    DeleteSnapshotsOptionType = "only"
)

func PossibleDeleteSnapshotsOptionTypeValues

func PossibleDeleteSnapshotsOptionTypeValues() []DeleteSnapshotsOptionType

PossibleDeleteSnapshotsOptionTypeValues returns the possible values for the DeleteSnapshotsOptionType const type.

func (DeleteSnapshotsOptionType) ToPtr

ToPtr returns a *DeleteSnapshotsOptionType pointing to the current value.

type DelimitedTextConfiguration

type DelimitedTextConfiguration struct {
	// The string used to separate columns.
	ColumnSeparator *string `xml:"ColumnSeparator"`

	// The string used as an escape character.
	EscapeChar *string `xml:"EscapeChar"`

	// The string used to quote a specific field.
	FieldQuote *string `xml:"FieldQuote"`

	// Represents whether the data has headers.
	HeadersPresent *bool `xml:"HasHeaders"`

	// The string used to separate records.
	RecordSeparator *string `xml:"RecordSeparator"`
}

DelimitedTextConfiguration - Groups the settings used for interpreting the blob data if the blob is delimited text formatted.

type DownloadOptions

type DownloadOptions struct {
	// BlockSize specifies the block size to use for each parallel download; the default size is BlobDefaultDownloadBlockSize.
	BlockSize int64

	// Progress is a function that is invoked periodically as bytes are received.
	Progress func(bytesTransferred int64)

	// BlobAccessConditions indicates the access conditions used when making HTTP GET requests against the blob.
	BlobAccessConditions *BlobAccessConditions

	// ClientProvidedKeyOptions indicates the client provided key by name and/or by value to encrypt/decrypt data.
	CpkInfo      *CpkInfo
	CpkScopeInfo *CpkScopeInfo

	// Parallelism indicates the maximum number of blocks to download in parallel (0=default)
	Parallelism uint16

	// RetryReaderOptionsPerBlock is used when downloading each block.
	RetryReaderOptionsPerBlock RetryReaderOptions
}

DownloadOptions identifies options used by the DownloadToBuffer and DownloadToFile functions.

type EncryptionAlgorithmType

type EncryptionAlgorithmType string

EncryptionAlgorithmType enum

const (
	EncryptionAlgorithmTypeNone   EncryptionAlgorithmType = "None"
	EncryptionAlgorithmTypeAES256 EncryptionAlgorithmType = "AES256"
)

func PossibleEncryptionAlgorithmTypeValues

func PossibleEncryptionAlgorithmTypeValues() []EncryptionAlgorithmType

PossibleEncryptionAlgorithmTypeValues returns the possible values for the EncryptionAlgorithmType const type.

func (EncryptionAlgorithmType) ToPtr

ToPtr returns a *EncryptionAlgorithmType pointing to the current value.

type FailedReadNotifier

type FailedReadNotifier func(failureCount int, lastError error, offset int64, count int64, willRetry bool)

FailedReadNotifier is a function type that represents the notification function called when a read fails

type FilterBlobItem

type FilterBlobItem struct {
	// REQUIRED
	ContainerName *string `xml:"ContainerName"`

	// REQUIRED
	Name *string `xml:"Name"`

	// Blob tags
	Tags *BlobTags `xml:"Tags"`
}

FilterBlobItem - Blob info from a Filter Blobs API call

type FilterBlobSegment

type FilterBlobSegment struct {
	// REQUIRED
	Blobs []*FilterBlobItem `xml:"Blobs>Blob"`

	// REQUIRED
	ServiceEndpoint *string `xml:"ServiceEndpoint,attr"`

	// REQUIRED
	Where      *string `xml:"Where"`
	NextMarker *string `xml:"NextMarker"`
}

FilterBlobSegment - The result of a Filter Blobs API call

func (FilterBlobSegment) MarshalXML

func (f FilterBlobSegment) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaller interface for type FilterBlobSegment.

type GeoReplication

type GeoReplication struct {
	// REQUIRED; A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available
	// for read operations at the secondary. Primary writes after this point in time may or may
	// not be available for reads.
	LastSyncTime *time.Time `xml:"LastSyncTime"`

	// REQUIRED; The status of the secondary location
	Status *BlobGeoReplicationStatus `xml:"Status"`
}

GeoReplication - Geo-Replication information for the Secondary Storage Service

func (GeoReplication) MarshalXML

func (g GeoReplication) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaller interface for type GeoReplication.

func (*GeoReplication) UnmarshalXML

func (g *GeoReplication) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaller interface for type GeoReplication.

type HTTPGetter

type HTTPGetter func(ctx context.Context, i HTTPGetterInfo) (*http.Response, error)

HTTPGetter is a function type that refers to a method that performs an HTTP GET operation.

type HTTPGetterInfo

type HTTPGetterInfo struct {
	// Offset specifies the start offset that should be used when
	// creating the HTTP GET request's Range header
	Offset int64

	// Count specifies the count of bytes that should be used to calculate
	// the end offset when creating the HTTP GET request's Range header
	Count int64

	// ETag specifies the resource's etag that should be used when creating
	// the HTTP GET request's If-Match header
	ETag string
}

HTTPGetterInfo is passed to an HTTPGetter function passing it parameters that should be used to make an HTTP GET request.

type HttpRange

type HttpRange struct {
	Offset int64
	Count  int64
}

HttpRange defines a range of bytes within an HTTP resource, starting at offset and ending at offset+count. A zero-value HttpRange indicates the entire resource. An HttpRange which has an offset but na zero value count indicates from the offset to the resource's end.

func NewHttpRange

func NewHttpRange(offset, count int64) *HttpRange

type IPEndpointStyleInfo

type IPEndpointStyleInfo struct {
	AccountName string // "" if not using IP endpoint style
}

IPEndpointStyleInfo is used for IP endpoint style URL when working with Azure storage emulator. Ex: "https://10.132.141.33/accountname/containername"

type IPRange

type IPRange struct {
	Start net.IP // Not specified if length = 0
	End   net.IP // Not specified if length = 0
}

IPRange represents a SAS IP range's start IP and (optionally) end IP.

func (*IPRange) String

func (ipr *IPRange) String() string

String returns a string representation of an IPRange.

type InternalError

type InternalError struct {
	// contains filtered or unexported fields
}

InternalError is an internal error type that all errors get wrapped in.

func (*InternalError) As

func (e *InternalError) As(target interface{}) bool

As casts target interface into InternalError

func (*InternalError) Error

func (e *InternalError) Error() string

Error checks if InternalError can be cast as StorageError

func (*InternalError) Is

func (e *InternalError) Is(err error) bool

Is casts err into InternalError

type JSONTextConfiguration

type JSONTextConfiguration struct {
	// The string used to separate records.
	RecordSeparator *string `xml:"RecordSeparator"`
}

JSONTextConfiguration - json text configuration

type KeyInfo

type KeyInfo struct {
	// REQUIRED; The date-time the key expires in ISO 8601 UTC time
	Expiry *string `xml:"Expiry"`

	// REQUIRED; The date-time the key is active in ISO 8601 UTC time
	Start *string `xml:"Start"`
}

KeyInfo - Key information

type LeaseAccessConditions

type LeaseAccessConditions struct {
	// If specified, the operation only succeeds if the resource's lease is active and matches this ID.
	LeaseID *string
}

LeaseAccessConditions contains a group of parameters for the containerClient.GetProperties method.

type LeaseDurationType

type LeaseDurationType string

LeaseDurationType enum

const (
	LeaseDurationTypeInfinite LeaseDurationType = "infinite"
	LeaseDurationTypeFixed    LeaseDurationType = "fixed"
)

func PossibleLeaseDurationTypeValues

func PossibleLeaseDurationTypeValues() []LeaseDurationType

PossibleLeaseDurationTypeValues returns the possible values for the LeaseDurationType const type.

func (LeaseDurationType) ToPtr

ToPtr returns a *LeaseDurationType pointing to the current value.

type LeaseStateType

type LeaseStateType string

LeaseStateType enum

const (
	LeaseStateTypeAvailable LeaseStateType = "available"
	LeaseStateTypeLeased    LeaseStateType = "leased"
	LeaseStateTypeExpired   LeaseStateType = "expired"
	LeaseStateTypeBreaking  LeaseStateType = "breaking"
	LeaseStateTypeBroken    LeaseStateType = "broken"
)

func PossibleLeaseStateTypeValues

func PossibleLeaseStateTypeValues() []LeaseStateType

PossibleLeaseStateTypeValues returns the possible values for the LeaseStateType const type.

func (LeaseStateType) ToPtr

func (c LeaseStateType) ToPtr() *LeaseStateType

ToPtr returns a *LeaseStateType pointing to the current value.

type LeaseStatusType

type LeaseStatusType string

LeaseStatusType enum

const (
	LeaseStatusTypeLocked   LeaseStatusType = "locked"
	LeaseStatusTypeUnlocked LeaseStatusType = "unlocked"
)

func PossibleLeaseStatusTypeValues

func PossibleLeaseStatusTypeValues() []LeaseStatusType

PossibleLeaseStatusTypeValues returns the possible values for the LeaseStatusType const type.

func (LeaseStatusType) ToPtr

func (c LeaseStatusType) ToPtr() *LeaseStatusType

ToPtr returns a *LeaseStatusType pointing to the current value.

type ListBlobsFlatSegmentResponse

type ListBlobsFlatSegmentResponse struct {
	// REQUIRED
	ContainerName *string `xml:"ContainerName,attr"`

	// REQUIRED
	Segment *BlobFlatListSegment `xml:"Blobs"`

	// REQUIRED
	ServiceEndpoint *string `xml:"ServiceEndpoint,attr"`
	Marker          *string `xml:"Marker"`
	MaxResults      *int32  `xml:"MaxResults"`
	NextMarker      *string `xml:"NextMarker"`
	Prefix          *string `xml:"Prefix"`
}

ListBlobsFlatSegmentResponse - An enumeration of blobs

type ListBlobsHierarchySegmentResponse

type ListBlobsHierarchySegmentResponse struct {
	// REQUIRED
	ContainerName *string `xml:"ContainerName,attr"`

	// REQUIRED
	Segment *BlobHierarchyListSegment `xml:"Blobs"`

	// REQUIRED
	ServiceEndpoint *string `xml:"ServiceEndpoint,attr"`
	Delimiter       *string `xml:"Delimiter"`
	Marker          *string `xml:"Marker"`
	MaxResults      *int32  `xml:"MaxResults"`
	NextMarker      *string `xml:"NextMarker"`
	Prefix          *string `xml:"Prefix"`
}

ListBlobsHierarchySegmentResponse - An enumeration of blobs

type ListBlobsIncludeItem

type ListBlobsIncludeItem string

ListBlobsIncludeItem enum

const (
	ListBlobsIncludeItemCopy                ListBlobsIncludeItem = "copy"
	ListBlobsIncludeItemDeleted             ListBlobsIncludeItem = "deleted"
	ListBlobsIncludeItemMetadata            ListBlobsIncludeItem = "metadata"
	ListBlobsIncludeItemSnapshots           ListBlobsIncludeItem = "snapshots"
	ListBlobsIncludeItemUncommittedblobs    ListBlobsIncludeItem = "uncommittedblobs"
	ListBlobsIncludeItemVersions            ListBlobsIncludeItem = "versions"
	ListBlobsIncludeItemTags                ListBlobsIncludeItem = "tags"
	ListBlobsIncludeItemImmutabilitypolicy  ListBlobsIncludeItem = "immutabilitypolicy"
	ListBlobsIncludeItemLegalhold           ListBlobsIncludeItem = "legalhold"
	ListBlobsIncludeItemDeletedwithversions ListBlobsIncludeItem = "deletedwithversions"
)

func PossibleListBlobsIncludeItemValues

func PossibleListBlobsIncludeItemValues() []ListBlobsIncludeItem

PossibleListBlobsIncludeItemValues returns the possible values for the ListBlobsIncludeItem const type.

func (ListBlobsIncludeItem) ToPtr

ToPtr returns a *ListBlobsIncludeItem pointing to the current value.

type ListContainersDetail

type ListContainersDetail struct {
	// Tells the service whether to return metadata for each container.
	Metadata bool

	// Tells the service whether to return soft-deleted containers.
	Deleted bool
}

ListContainersDetail indicates what additional information the service should return with each container.

type ListContainersIncludeType

type ListContainersIncludeType string

ListContainersIncludeType enum

const (
	ListContainersIncludeTypeMetadata ListContainersIncludeType = "metadata"
	ListContainersIncludeTypeDeleted  ListContainersIncludeType = "deleted"
	ListContainersIncludeTypeSystem   ListContainersIncludeType = "system"
)

func PossibleListContainersIncludeTypeValues

func PossibleListContainersIncludeTypeValues() []ListContainersIncludeType

PossibleListContainersIncludeTypeValues returns the possible values for the ListContainersIncludeType const type.

func (ListContainersIncludeType) ToPtr

ToPtr returns a *ListContainersIncludeType pointing to the current value.

type ListContainersOptions

type ListContainersOptions struct {
	Include ListContainersDetail

	// A string value that identifies the portion of the list of containers to be returned with the next listing operation. The
	// operation returns the NextMarker value within the response body if the listing operation did not return all containers
	// remaining to be listed with the current page. The NextMarker value can be used as the value for the marker parameter in
	// a subsequent call to request the next page of list items. The marker value is opaque to the client.
	Marker *string

	// Specifies the maximum number of containers to return. If the request does not specify max results, or specifies a value
	// greater than 5000, the server will return up to 5000 items. Note that if the listing operation crosses a partition boundary,
	// then the service will return a continuation token for retrieving the remainder of the results. For this reason, it is possible
	// that the service will return fewer results than specified by max results, or than the default of 5000.
	MaxResults *int32

	// Filters the results to return only containers whose name begins with the specified prefix.
	Prefix *string
}

ListContainersOptions provides set of configurations for ListContainers operation

type ListContainersSegmentResponse

type ListContainersSegmentResponse struct {
	// REQUIRED
	ContainerItems []*ContainerItem `xml:"Containers>Container"`

	// REQUIRED
	ServiceEndpoint *string `xml:"ServiceEndpoint,attr"`
	Marker          *string `xml:"Marker"`
	MaxResults      *int32  `xml:"MaxResults"`
	NextMarker      *string `xml:"NextMarker"`
	Prefix          *string `xml:"Prefix"`
}

ListContainersSegmentResponse - An enumeration of containers

func (ListContainersSegmentResponse) MarshalXML

MarshalXML implements the xml.Marshaller interface for type ListContainersSegmentResponse.

type Logging

type Logging struct {
	// REQUIRED; Indicates whether all delete requests should be logged.
	Delete *bool `xml:"Delete"`

	// REQUIRED; Indicates whether all read requests should be logged.
	Read *bool `xml:"Read"`

	// REQUIRED; the retention policy which determines how long the associated data should persist
	RetentionPolicy *RetentionPolicy `xml:"RetentionPolicy"`

	// REQUIRED; The version of Storage Analytics to configure.
	Version *string `xml:"Version"`

	// REQUIRED; Indicates whether all write requests should be logged.
	Write *bool `xml:"Write"`
}

Logging - Azure Analytics Logging settings.

type Metrics

type Metrics struct {
	// REQUIRED; Indicates whether metrics are enabled for the Blob service.
	Enabled *bool `xml:"Enabled"`

	// Indicates whether metrics should generate summary statistics for called API operations.
	IncludeAPIs *bool `xml:"IncludeAPIs"`

	// the retention policy which determines how long the associated data should persist
	RetentionPolicy *RetentionPolicy `xml:"RetentionPolicy"`

	// The version of Storage Analytics to configure.
	Version *string `xml:"Version"`
}

Metrics - a summary of request statistics grouped by API in hour or minute aggregates for blobs

type ModifiedAccessConditions

type ModifiedAccessConditions struct {
	// Specify an ETag value to operate only on blobs with a matching value.
	IfMatch *string
	// Specify this header value to operate only on a blob if it has been modified since the specified date/time.
	IfModifiedSince *time.Time
	// Specify an ETag value to operate only on blobs without a matching value.
	IfNoneMatch *string
	// Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
	IfTags *string
	// Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
	IfUnmodifiedSince *time.Time
}

ModifiedAccessConditions contains a group of parameters for the containerClient.Delete method.

type ObjectReplicationPolicy

type ObjectReplicationPolicy struct {
	PolicyId *string
	Rules    *[]ObjectReplicationRules
}

ObjectReplicationPolicy are deserialized attributes

type ObjectReplicationRules

type ObjectReplicationRules struct {
	RuleId string
	Status string
}

ObjectReplicationRules struct

type PageBlobClearPagesOptions

type PageBlobClearPagesOptions struct {
	CpkInfo                        *CpkInfo
	CpkScopeInfo                   *CpkScopeInfo
	SequenceNumberAccessConditions *SequenceNumberAccessConditions
	BlobAccessConditions           *BlobAccessConditions
}

PageBlobClearPagesOptions provides set of configurations for PageBlobClient.ClearPages operation

type PageBlobClearPagesResponse

type PageBlobClearPagesResponse struct {
	// contains filtered or unexported fields
}

PageBlobClearPagesResponse contains the response from method PageBlobClient.ClearPages

type PageBlobClient

type PageBlobClient struct {
	BlobClient
	// contains filtered or unexported fields
}

PageBlobClient represents a client to an Azure Storage page blob;

func NewPageBlobClient

func NewPageBlobClient(blobURL string, cred azcore.TokenCredential, options *ClientOptions) (*PageBlobClient, error)

NewPageBlobClient creates a ServiceClient object using the specified URL, Azure AD credential, and options. Example of serviceURL: https://<your_storage_account>.blob.core.windows.net

func NewPageBlobClientWithNoCredential

func NewPageBlobClientWithNoCredential(blobURL string, options *ClientOptions) (*PageBlobClient, error)

NewPageBlobClientWithNoCredential creates a ServiceClient object using the specified URL and options. Example of serviceURL: https://<your_storage_account>.blob.core.windows.net?<SAS token>

func NewPageBlobClientWithSharedKey

func NewPageBlobClientWithSharedKey(blobURL string, cred *SharedKeyCredential, options *ClientOptions) (*PageBlobClient, error)

NewPageBlobClientWithSharedKey creates a ServiceClient object using the specified URL, shared key, and options. Example of serviceURL: https://<your_storage_account>.blob.core.windows.net

func (*PageBlobClient) ClearPages

ClearPages frees the specified pages from the page blob. For more information, see https://docs.microsoft.com/rest/api/storageservices/put-page.

func (*PageBlobClient) Create

Create creates a page blob of the specified length. Call PutPage to upload data to a page blob. For more information, see https://docs.microsoft.com/rest/api/storageservices/put-blob.

func (*PageBlobClient) GetPageRanges

GetPageRanges returns the list of valid page ranges for a page blob or snapshot of a page blob. For more information, see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges.

func (*PageBlobClient) GetPageRangesDiff

GetPageRangesDiff gets the collection of page ranges that differ between a specified snapshot and this page blob. For more information, see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges.

func (*PageBlobClient) Resize

Resize resizes the page blob to the specified size (which must be a multiple of 512). For more information, see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties.

func (*PageBlobClient) StartCopyIncremental

func (pb *PageBlobClient) StartCopyIncremental(ctx context.Context, copySource string, prevSnapshot string, options *PageBlobCopyIncrementalOptions) (PageBlobCopyIncrementalResponse, error)

StartCopyIncremental begins an operation to start an incremental copy from one page blob's snapshot to this page blob. The snapshot is copied such that only the differential changes between the previously copied snapshot are transferred to the destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. For more information, see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots.

func (*PageBlobClient) UpdateSequenceNumber

UpdateSequenceNumber sets the page blob's sequence number.

func (*PageBlobClient) UploadPages

UploadPages writes 1 or more pages to the page blob. The start offset and the stream size must be a multiple of 512 bytes. This method panics if the stream is not at position 0. Note that the http client closes the body stream after the request is sent to the service. For more information, see https://docs.microsoft.com/rest/api/storageservices/put-page.

func (*PageBlobClient) UploadPagesFromURL

func (pb *PageBlobClient) UploadPagesFromURL(ctx context.Context, source string, sourceOffset, destOffset, count int64,
	options *PageBlobUploadPagesFromURLOptions) (PageBlobUploadPagesFromURLResponse, error)

UploadPagesFromURL copies 1 or more pages from a source URL to the page blob. The sourceOffset specifies the start offset of source data to copy from. The destOffset specifies the start offset of data in page blob will be written to. The count must be a multiple of 512 bytes. For more information, see https://docs.microsoft.com/rest/api/storageservices/put-page-from-url.

func (*PageBlobClient) WithSnapshot

func (pb *PageBlobClient) WithSnapshot(snapshot string) (*PageBlobClient, error)

WithSnapshot creates a new PageBlobURL object identical to the source but with the specified snapshot timestamp. Pass "" to remove the snapshot returning a URL to the base blob.

func (*PageBlobClient) WithVersionID

func (pb *PageBlobClient) WithVersionID(versionID string) (*PageBlobClient, error)

WithVersionID creates a new PageBlobURL object identical to the source but with the specified snapshot timestamp. Pass "" to remove the version returning a URL to the base blob.

type PageBlobCopyIncrementalOptions

type PageBlobCopyIncrementalOptions struct {
	ModifiedAccessConditions *ModifiedAccessConditions
}

PageBlobCopyIncrementalOptions provides set of configurations for PageBlobClient.StartCopyIncremental operation

type PageBlobCopyIncrementalResponse

type PageBlobCopyIncrementalResponse struct {
	// contains filtered or unexported fields
}

PageBlobCopyIncrementalResponse contains the response from method PageBlobClient.StartCopyIncremental

type PageBlobCreateOptions

type PageBlobCreateOptions struct {
	// Set for page blobs only. The sequence number is a user-controlled value that you can use to track requests. The value of
	// the sequence number must be between 0 and 2^63 - 1.
	BlobSequenceNumber *int64
	// Optional. Used to set blob tags in various blob operations.
	BlobTagsMap map[string]string
	// Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the
	// operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs
	// are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source
	// blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers.
	// See Naming and Referencing Containers, Blobs, and Metadata for more information.
	Metadata map[string]string
	// Optional. Indicates the tier to be set on the page blob.
	Tier *PremiumPageBlobAccessTier

	HTTPHeaders *BlobHTTPHeaders

	CpkInfo *CpkInfo

	CpkScopeInfo *CpkScopeInfo

	BlobAccessConditions *BlobAccessConditions
	// Specifies the date time when the blobs immutability policy is set to expire.
	ImmutabilityPolicyExpiry *time.Time
	// Specifies the immutability policy mode to set on the blob.
	ImmutabilityPolicyMode *BlobImmutabilityPolicyMode
	// Specified if a legal hold should be set on the blob.
	LegalHold *bool
}

PageBlobCreateOptions provides set of configurations for CreatePageBlob operation

type PageBlobCreateResponse

type PageBlobCreateResponse struct {
	// contains filtered or unexported fields
}

PageBlobCreateResponse contains the response from method PageBlobClient.Create.

type PageBlobGetPageRangesDiffOptions

type PageBlobGetPageRangesDiffOptions struct {
	// A string value that identifies the portion of the list of containers to be returned with the next listing operation. The
	// operation returns the NextMarker value within the response body if the listing
	// operation did not return all containers remaining to be listed with the current page. The NextMarker value can be used
	// as the value for the marker parameter in a subsequent call to request the next
	// page of list items. The marker value is opaque to the client.
	Marker *string
	// Specifies the maximum number of containers to return. If the request does not specify maxresults, or specifies a value
	// greater than 5000, the server will return up to 5000 items. Note that if the
	// listing operation crosses a partition boundary, then the service will return a continuation token for retrieving the remainder
	// of the results. For this reason, it is possible that the service will
	// return fewer results than specified by maxresults, or than the default of 5000.
	MaxResults *int32
	// Optional. This header is only supported in service versions 2019-04-19 and after and specifies the URL of a previous snapshot
	// of the target blob. The response will only contain pages that were changed
	// between the target blob and its previous snapshot.
	PrevSnapshotURL *string
	// Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that specifies that the response
	// will contain only pages that were changed between target blob and previous
	// snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot
	// specified by prevsnapshot is the older of the two. Note that incremental
	// snapshots are currently supported only for blobs created on or after January 1, 2016.
	PrevSnapshot *string
	// Optional, you can specify whether a particular range of the blob is read
	PageRange *HttpRange

	// The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more
	// information on working with blob snapshots, see Creating a Snapshot of a Blob.
	// [https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob]
	Snapshot *string

	BlobAccessConditions *BlobAccessConditions
}

PageBlobGetPageRangesDiffOptions provides set of configurations for PageBlobClient.GetPageRangesDiff operation

type PageBlobGetPageRangesDiffPager

type PageBlobGetPageRangesDiffPager struct {
	// contains filtered or unexported fields
}

PageBlobGetPageRangesDiffPager provides operations for iterating over paged responses

func (PageBlobGetPageRangesDiffPager) Err

func (p PageBlobGetPageRangesDiffPager) Err() error

Err returns the last error encountered while paging.

func (PageBlobGetPageRangesDiffPager) NextPage

func (p PageBlobGetPageRangesDiffPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (PageBlobGetPageRangesDiffPager) PageResponse

func (p PageBlobGetPageRangesDiffPager) PageResponse() pageBlobClientGetPageRangesDiffResponse

PageResponse returns the current pageBlobClientGetPageRangesDiffResponse page.

type PageBlobGetPageRangesOptions

type PageBlobGetPageRangesOptions struct {
	Marker *string
	// Specifies the maximum number of containers to return. If the request does not specify maxresults, or specifies a value
	// greater than 5000, the server will return up to 5000 items. Note that if the
	// listing operation crosses a partition boundary, then the service will return a continuation token for retrieving the remainder
	// of the results. For this reason, it is possible that the service will
	// return fewer results than specified by maxresults, or than the default of 5000.
	MaxResults *int32
	// Optional. This header is only supported in service versions 2019-04-19 and after and specifies the URL of a previous snapshot
	// of the target blob. The response will only contain pages that were changed
	// between the target blob and its previous snapshot.
	PrevSnapshotURL *string
	// Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a DateTime value that specifies that the response
	// will contain only pages that were changed between target blob and previous
	// snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as long as the snapshot
	// specified by prevsnapshot is the older of the two. Note that incremental
	// snapshots are currently supported only for blobs created on or after January 1, 2016.
	PrevSnapshot *string
	// Optional, you can specify whether a particular range of the blob is read
	PageRange *HttpRange
	// The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more
	// information on working with blob snapshots, see Creating a Snapshot of a Blob.
	// [https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob]
	Snapshot *string

	BlobAccessConditions *BlobAccessConditions
}

PageBlobGetPageRangesOptions provides set of configurations for GetPageRanges operation

type PageBlobGetPageRangesPager

type PageBlobGetPageRangesPager struct {
	// contains filtered or unexported fields
}

PageBlobGetPageRangesPager provides operations for iterating over paged responses

func (PageBlobGetPageRangesPager) Err

func (p PageBlobGetPageRangesPager) Err() error

Err returns the last error encountered while paging.

func (PageBlobGetPageRangesPager) NextPage

func (p PageBlobGetPageRangesPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (PageBlobGetPageRangesPager) PageResponse

func (p PageBlobGetPageRangesPager) PageResponse() pageBlobClientGetPageRangesResponse

PageResponse returns the current pageBlobClientGetPageRangesResponse page.

type PageBlobResizeOptions

type PageBlobResizeOptions struct {
	CpkInfo              *CpkInfo
	CpkScopeInfo         *CpkScopeInfo
	BlobAccessConditions *BlobAccessConditions
}

PageBlobResizeOptions provides set of configurations for PageBlobClient.Resize operation

type PageBlobResizeResponse

type PageBlobResizeResponse struct {
	// contains filtered or unexported fields
}

PageBlobResizeResponse contains the response from method PageBlobClient.Resize

type PageBlobUpdateSequenceNumberOptions

type PageBlobUpdateSequenceNumberOptions struct {
	ActionType *SequenceNumberActionType

	BlobSequenceNumber *int64

	BlobAccessConditions *BlobAccessConditions
}

PageBlobUpdateSequenceNumberOptions provides set of configurations for PageBlobClient.UpdateSequenceNumber operation

type PageBlobUpdateSequenceNumberResponse

type PageBlobUpdateSequenceNumberResponse struct {
	// contains filtered or unexported fields
}

PageBlobUpdateSequenceNumberResponse contains the response from method PageBlobClient.UpdateSequenceNumber

type PageBlobUploadPagesFromURLOptions

type PageBlobUploadPagesFromURLOptions struct {
	// Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source.
	CopySourceAuthorization *string
	// Specify the md5 calculated for the range of bytes that must be read from the copy source.
	SourceContentMD5 []byte
	// Specify the crc64 calculated for the range of bytes that must be read from the copy source.
	SourceContentCRC64 []byte

	CpkInfo *CpkInfo

	CpkScopeInfo *CpkScopeInfo

	SequenceNumberAccessConditions *SequenceNumberAccessConditions

	SourceModifiedAccessConditions *SourceModifiedAccessConditions

	BlobAccessConditions *BlobAccessConditions
}

PageBlobUploadPagesFromURLOptions provides set of configurations for UploadPagesFromURL operation

type PageBlobUploadPagesFromURLResponse

type PageBlobUploadPagesFromURLResponse struct {
	// contains filtered or unexported fields
}

PageBlobUploadPagesFromURLResponse contains the response from method PageBlobClient.UploadPagesFromURL

type PageBlobUploadPagesOptions

type PageBlobUploadPagesOptions struct {
	// Specify the transactional crc64 for the body, to be validated by the service.
	PageRange                 *HttpRange
	TransactionalContentCRC64 []byte
	// Specify the transactional md5 for the body, to be validated by the service.
	TransactionalContentMD5 []byte

	CpkInfo                        *CpkInfo
	CpkScopeInfo                   *CpkScopeInfo
	SequenceNumberAccessConditions *SequenceNumberAccessConditions
	BlobAccessConditions           *BlobAccessConditions
}

PageBlobUploadPagesOptions provides set of configurations for UploadPages operation

type PageBlobUploadPagesResponse

type PageBlobUploadPagesResponse struct {
	// contains filtered or unexported fields
}

PageBlobUploadPagesResponse contains the response from method PageBlobClient.UploadPages.

type PageList

type PageList struct {
	ClearRange []*ClearRange `xml:"ClearRange"`
	NextMarker *string       `xml:"NextMarker"`
	PageRange  []*PageRange  `xml:"PageRange"`
}

PageList - the list of pages

func (PageList) MarshalXML

func (p PageList) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaller interface for type PageList.

type PageRange

type PageRange struct {
	// REQUIRED
	End *int64 `xml:"End"`

	// REQUIRED
	Start *int64 `xml:"Start"`
}

PageRange struct

func (*PageRange) Raw

func (pr *PageRange) Raw() (start, end int64)

Raw converts PageRange into primitive start, end integers of type int64

type PremiumPageBlobAccessTier

type PremiumPageBlobAccessTier string

PremiumPageBlobAccessTier enum

const (
	PremiumPageBlobAccessTierP10 PremiumPageBlobAccessTier = "P10"
	PremiumPageBlobAccessTierP15 PremiumPageBlobAccessTier = "P15"
	PremiumPageBlobAccessTierP20 PremiumPageBlobAccessTier = "P20"
	PremiumPageBlobAccessTierP30 PremiumPageBlobAccessTier = "P30"
	PremiumPageBlobAccessTierP4  PremiumPageBlobAccessTier = "P4"
	PremiumPageBlobAccessTierP40 PremiumPageBlobAccessTier = "P40"
	PremiumPageBlobAccessTierP50 PremiumPageBlobAccessTier = "P50"
	PremiumPageBlobAccessTierP6  PremiumPageBlobAccessTier = "P6"
	PremiumPageBlobAccessTierP60 PremiumPageBlobAccessTier = "P60"
	PremiumPageBlobAccessTierP70 PremiumPageBlobAccessTier = "P70"
	PremiumPageBlobAccessTierP80 PremiumPageBlobAccessTier = "P80"
)

func PossiblePremiumPageBlobAccessTierValues

func PossiblePremiumPageBlobAccessTierValues() []PremiumPageBlobAccessTier

PossiblePremiumPageBlobAccessTierValues returns the possible values for the PremiumPageBlobAccessTier const type.

func (PremiumPageBlobAccessTier) ToPtr

ToPtr returns a *PremiumPageBlobAccessTier pointing to the current value.

type PublicAccessType

type PublicAccessType string

PublicAccessType enum

const (
	PublicAccessTypeBlob      PublicAccessType = "blob"
	PublicAccessTypeContainer PublicAccessType = "container"
)

func PossiblePublicAccessTypeValues

func PossiblePublicAccessTypeValues() []PublicAccessType

PossiblePublicAccessTypeValues returns the possible values for the PublicAccessType const type.

func (PublicAccessType) ToPtr

ToPtr returns a *PublicAccessType pointing to the current value.

type QueryFormat

type QueryFormat struct {
	// REQUIRED; The quick query format type.
	Type *QueryFormatType `xml:"Type"`

	// Groups the settings used for formatting the response if the response should be Arrow formatted.
	ArrowConfiguration *ArrowConfiguration `xml:"ArrowConfiguration"`

	// Groups the settings used for interpreting the blob data if the blob is delimited text formatted.
	DelimitedTextConfiguration *DelimitedTextConfiguration `xml:"DelimitedTextConfiguration"`

	// json text configuration
	JSONTextConfiguration *JSONTextConfiguration `xml:"JsonTextConfiguration"`

	// Anything
	ParquetTextConfiguration interface{} `xml:"ParquetTextConfiguration"`
}

QueryFormat struct

type QueryFormatType

type QueryFormatType string

QueryFormatType - The quick query format type.

const (
	QueryFormatTypeDelimited QueryFormatType = "delimited"
	QueryFormatTypeJSON      QueryFormatType = "json"
	QueryFormatTypeArrow     QueryFormatType = "arrow"
	QueryFormatTypeParquet   QueryFormatType = "parquet"
)

func PossibleQueryFormatTypeValues

func PossibleQueryFormatTypeValues() []QueryFormatType

PossibleQueryFormatTypeValues returns the possible values for the QueryFormatType const type.

func (QueryFormatType) ToPtr

func (c QueryFormatType) ToPtr() *QueryFormatType

ToPtr returns a *QueryFormatType pointing to the current value.

type QueryRequest

type QueryRequest struct {
	// REQUIRED; The query expression in SQL. The maximum size of the query expression is 256KiB.
	Expression *string `xml:"Expression"`

	// REQUIRED; Required. The type of the provided query expression.
	QueryType           *string             `xml:"QueryType"`
	InputSerialization  *QuerySerialization `xml:"InputSerialization"`
	OutputSerialization *QuerySerialization `xml:"OutputSerialization"`
}

QueryRequest - Groups the set of query request settings.

func (QueryRequest) MarshalXML

func (q QueryRequest) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaller interface for type QueryRequest.

type QuerySerialization

type QuerySerialization struct {
	// REQUIRED
	Format *QueryFormat `xml:"Format"`
}

QuerySerialization struct

type RehydratePriority

type RehydratePriority string

RehydratePriority - If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are High and Standard.

const (
	RehydratePriorityHigh     RehydratePriority = "High"
	RehydratePriorityStandard RehydratePriority = "Standard"
)

func PossibleRehydratePriorityValues

func PossibleRehydratePriorityValues() []RehydratePriority

PossibleRehydratePriorityValues returns the possible values for the RehydratePriority const type.

func (RehydratePriority) ToPtr

ToPtr returns a *RehydratePriority pointing to the current value.

type ReleaseLeaseBlobOptions

type ReleaseLeaseBlobOptions struct {
	ModifiedAccessConditions *ModifiedAccessConditions
}

ReleaseLeaseBlobOptions provides set of configurations for ReleaseLeaseBlob operation

type ResponseError

type ResponseError interface {
	Error() string
	Unwrap() error
	RawResponse() *http.Response
	NonRetriable()
}

ResponseError is a wrapper of error passed from service

type RetentionPolicy

type RetentionPolicy struct {
	// REQUIRED; Indicates whether a retention policy is enabled for the storage service
	Enabled *bool `xml:"Enabled"`

	// Indicates whether permanent delete is allowed on this storage account.
	AllowPermanentDelete *bool `xml:"AllowPermanentDelete"`

	// Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older than this
	// value will be deleted
	Days *int32 `xml:"Days"`
}

RetentionPolicy - the retention policy which determines how long the associated data should persist

type RetryReaderOptions

type RetryReaderOptions struct {
	// MaxRetryRequests specifies the maximum number of HTTP GET requests that will be made
	// while reading from a RetryReader. A value of zero means that no additional HTTP
	// GET requests will be made.
	MaxRetryRequests int

	// NotifyFailedRead is called, if non-nil, after any failure to read. Expected usage is diagnostic logging.
	NotifyFailedRead FailedReadNotifier

	// TreatEarlyCloseAsError can be set to true to prevent retries after "read on closed response body". By default,
	// retryReader has the following special behaviour: closing the response body before it is all read is treated as a
	// retryable error. This is to allow callers to force a retry by closing the body from another goroutine (e.g. if the =
	// read is too slow, caller may want to force a retry in the hope that the retry will be quicker).  If
	// TreatEarlyCloseAsError is true, then retryReader's special behaviour is suppressed, and "read on closed body" is instead
	// treated as a fatal (non-retryable) error.
	// Note that setting TreatEarlyCloseAsError only guarantees that Closing will produce a fatal error if the Close happens
	// from the same "thread" (goroutine) as Read.  Concurrent Close calls from other goroutines may instead produce network errors
	// which will be retried.
	TreatEarlyCloseAsError bool

	CpkInfo      *CpkInfo
	CpkScopeInfo *CpkScopeInfo
	// contains filtered or unexported fields
}

RetryReaderOptions contains properties which can help to decide when to do retry.

type SASProtocol

type SASProtocol string

SASProtocol indicates the http/https.

const (
	// SASProtocolHTTPS can be specified for a SAS protocol
	SASProtocolHTTPS SASProtocol = "https"
)

type SASQueryParameters

type SASQueryParameters struct {
	// contains filtered or unexported fields
}

SASQueryParameters object represents the components that make up an Azure Storage SAS' query parameters. You parse a map of query parameters into its fields by calling NewSASQueryParameters(). You add the components to a query parameter map by calling AddToValues(). NOTE: Changing any field requires computing a new SAS signature using a XxxSASSignatureValues type. This type defines the components used by all Azure Storage resources (Containers, Blobs, Files, & Queues).

func (*SASQueryParameters) AgentObjectId

func (p *SASQueryParameters) AgentObjectId() string

AgentObjectId returns agentObjectId

func (*SASQueryParameters) CacheControl

func (p *SASQueryParameters) CacheControl() string

CacheControl returns cacheControl

func (*SASQueryParameters) ContentDisposition

func (p *SASQueryParameters) ContentDisposition() string

ContentDisposition returns contentDisposition

func (*SASQueryParameters) ContentEncoding

func (p *SASQueryParameters) ContentEncoding() string

ContentEncoding returns contentEncoding

func (*SASQueryParameters) ContentLanguage

func (p *SASQueryParameters) ContentLanguage() string

ContentLanguage returns contentLanguage

func (*SASQueryParameters) ContentType

func (p *SASQueryParameters) ContentType() string

ContentType returns sontentType

func (*SASQueryParameters) Encode

func (p *SASQueryParameters) Encode() string

Encode encodes the SAS query parameters into URL encoded form sorted by key.

func (*SASQueryParameters) ExpiryTime

func (p *SASQueryParameters) ExpiryTime() time.Time

ExpiryTime returns expiryTime

func (*SASQueryParameters) IPRange

func (p *SASQueryParameters) IPRange() IPRange

IPRange returns ipRange

func (*SASQueryParameters) Identifier

func (p *SASQueryParameters) Identifier() string

Identifier returns identifier

func (*SASQueryParameters) Permissions

func (p *SASQueryParameters) Permissions() string

Permissions returns permissions

func (*SASQueryParameters) PreauthorizedAgentObjectId

func (p *SASQueryParameters) PreauthorizedAgentObjectId() string

PreauthorizedAgentObjectId returns preauthorizedAgentObjectId

func (*SASQueryParameters) Protocol

func (p *SASQueryParameters) Protocol() SASProtocol

Protocol returns protocol

func (*SASQueryParameters) Resource

func (p *SASQueryParameters) Resource() string

Resource returns resource

func (*SASQueryParameters) ResourceTypes

func (p *SASQueryParameters) ResourceTypes() string

ResourceTypes returns resourceTypes

func (*SASQueryParameters) Services

func (p *SASQueryParameters) Services() string

Services returns services

func (*SASQueryParameters) Signature

func (p *SASQueryParameters) Signature() string

Signature returns signature

func (*SASQueryParameters) SignedCorrelationId

func (p *SASQueryParameters) SignedCorrelationId() string

SignedCorrelationId returns signedCorrelationId

func (*SASQueryParameters) SignedDirectoryDepth

func (p *SASQueryParameters) SignedDirectoryDepth() string

SignedDirectoryDepth returns signedDirectoryDepth

func (*SASQueryParameters) SignedExpiry

func (p *SASQueryParameters) SignedExpiry() time.Time

SignedExpiry returns signedExpiry

func (*SASQueryParameters) SignedService

func (p *SASQueryParameters) SignedService() string

SignedService returns signedService

func (*SASQueryParameters) SignedStart

func (p *SASQueryParameters) SignedStart() time.Time

SignedStart returns signedStart

func (*SASQueryParameters) SignedTid

func (p *SASQueryParameters) SignedTid() string

SignedTid returns aignedTid

func (*SASQueryParameters) SignedVersion

func (p *SASQueryParameters) SignedVersion() string

SignedVersion returns signedVersion

func (*SASQueryParameters) SnapshotTime

func (p *SASQueryParameters) SnapshotTime() time.Time

SnapshotTime returns snapshotTime

func (*SASQueryParameters) StartTime

func (p *SASQueryParameters) StartTime() time.Time

StartTime returns startTime

func (*SASQueryParameters) Version

func (p *SASQueryParameters) Version() string

Version returns version

type SKUName

type SKUName string

SKUName enum

const (
	SKUNameStandardLRS   SKUName = "Standard_LRS"
	SKUNameStandardGRS   SKUName = "Standard_GRS"
	SKUNameStandardRAGRS SKUName = "Standard_RAGRS"
	SKUNameStandardZRS   SKUName = "Standard_ZRS"
	SKUNamePremiumLRS    SKUName = "Premium_LRS"
)

func PossibleSKUNameValues

func PossibleSKUNameValues() []SKUName

PossibleSKUNameValues returns the possible values for the SKUName const type.

func (SKUName) ToPtr

func (c SKUName) ToPtr() *SKUName

ToPtr returns a *SKUName pointing to the current value.

type SequenceNumberAccessConditions

type SequenceNumberAccessConditions struct {
	// Specify this header value to operate only on a blob if it has the specified sequence number.
	IfSequenceNumberEqualTo *int64
	// Specify this header value to operate only on a blob if it has a sequence number less than the specified.
	IfSequenceNumberLessThan *int64
	// Specify this header value to operate only on a blob if it has a sequence number less than or equal to the specified.
	IfSequenceNumberLessThanOrEqualTo *int64
}

SequenceNumberAccessConditions contains a group of parameters for the pageBlobClient.UploadPages method.

type SequenceNumberActionType

type SequenceNumberActionType string

SequenceNumberActionType enum

const (
	SequenceNumberActionTypeMax       SequenceNumberActionType = "max"
	SequenceNumberActionTypeUpdate    SequenceNumberActionType = "update"
	SequenceNumberActionTypeIncrement SequenceNumberActionType = "increment"
)

func PossibleSequenceNumberActionTypeValues

func PossibleSequenceNumberActionTypeValues() []SequenceNumberActionType

PossibleSequenceNumberActionTypeValues returns the possible values for the SequenceNumberActionType const type.

func (SequenceNumberActionType) ToPtr

ToPtr returns a *SequenceNumberActionType pointing to the current value.

type ServiceClient

type ServiceClient struct {
	// contains filtered or unexported fields
}

ServiceClient represents a URL to the Azure Blob Storage service allowing you to manipulate blob containers.

func NewServiceClient

func NewServiceClient(serviceURL string, cred azcore.TokenCredential, options *ClientOptions) (*ServiceClient, error)

NewServiceClient creates a ServiceClient object using the specified URL, Azure AD credential, and options. Example of serviceURL: https://<your_storage_account>.blob.core.windows.net

func NewServiceClientFromConnectionString

func NewServiceClientFromConnectionString(connectionString string, options *ClientOptions) (*ServiceClient, error)

NewServiceClientFromConnectionString creates a service client from the given connection string. nolint

func NewServiceClientWithNoCredential

func NewServiceClientWithNoCredential(serviceURL string, options *ClientOptions) (*ServiceClient, error)

NewServiceClientWithNoCredential creates a ServiceClient object using the specified URL and options. Example of serviceURL: https://<your_storage_account>.blob.core.windows.net?<SAS token>

func NewServiceClientWithSharedKey

func NewServiceClientWithSharedKey(serviceURL string, cred *SharedKeyCredential, options *ClientOptions) (*ServiceClient, error)

NewServiceClientWithSharedKey creates a ServiceClient object using the specified URL, shared key, and options. Example of serviceURL: https://<your_storage_account>.blob.core.windows.net

func (*ServiceClient) CanGetAccountSASToken

func (s *ServiceClient) CanGetAccountSASToken() bool

CanGetAccountSASToken checks if shared key in ServiceClient is nil

func (*ServiceClient) CreateContainer

func (s *ServiceClient) CreateContainer(ctx context.Context, containerName string, options *ContainerCreateOptions) (ContainerCreateResponse, error)

CreateContainer is a lifecycle method to creates a new container under the specified account. If the container with the same name already exists, a ResourceExistsError will be raised. This method returns a client with which to interact with the newly created container.

func (*ServiceClient) DeleteContainer

func (s *ServiceClient) DeleteContainer(ctx context.Context, containerName string, options *ContainerDeleteOptions) (ContainerDeleteResponse, error)

DeleteContainer is a lifecycle method that marks the specified container for deletion. The container and any blobs contained within it are later deleted during garbage collection. If the container is not found, a ResourceNotFoundError will be raised.

func (*ServiceClient) FindBlobsByTags

FindBlobsByTags operation finds all blobs in the storage account whose tags match a given search expression. Filter blobs searches across all containers within a storage account but can be scoped within the expression to a single container. https://docs.microsoft.com/en-us/rest/api/storageservices/find-blobs-by-tags eg. "dog='germanshepherd' and penguin='emperorpenguin'" To specify a container, eg. "@container=’containerName’ and Name = ‘C’"

func (*ServiceClient) GetAccountInfo

GetAccountInfo provides account level information

func (*ServiceClient) GetProperties

GetProperties - gets the properties of a storage account's Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.

func (*ServiceClient) GetSASURL

func (s *ServiceClient) GetSASURL(resources AccountSASResourceTypes, permissions AccountSASPermissions, start time.Time, expiry time.Time) (string, error)

GetSASURL is a convenience method for generating a SAS token for the currently pointed at account. It can only be used if the credential supplied during creation was a SharedKeyCredential. This validity can be checked with CanGetAccountSASToken().

func (*ServiceClient) GetStatistics

GetStatistics Retrieves statistics related to replication for the Blob service. It is only available when read-access geo-redundant replication is enabled for the storage account. With geo-redundant replication, Azure Storage maintains your data durable in two locations. In both locations, Azure Storage constantly maintains multiple healthy replicas of your data. The location where you read, create, update, or delete data is the primary storage account location. The primary location exists in the region you choose at the time you create an account via the Azure Management Azure classic portal, for example, North Central US. The location to which your data is replicated is the secondary location. The secondary location is automatically determined based on the location of the primary; it is in a second data center that resides in the same region as the primary location. Read-only access is available from the secondary location, if read-access geo-redundant replication is enabled for your storage account.

func (*ServiceClient) ListContainers

ListContainers operation returns a pager of the containers under the specified account. Use an empty Marker to start enumeration from the beginning. Container names are returned in lexicographic order. For more information, see https://docs.microsoft.com/rest/api/storageservices/list-containers2.

func (*ServiceClient) NewContainerClient

func (s *ServiceClient) NewContainerClient(containerName string) (*ContainerClient, error)

NewContainerClient creates a new ContainerClient object by concatenating containerName to the end of ServiceClient's URL. The new ContainerClient uses the same request policy pipeline as the ServiceClient. To change the pipeline, create the ContainerClient and then call its WithPipeline method passing in the desired pipeline object. Or, call this package's NewContainerClient instead of calling this object's NewContainerClient method.

func (*ServiceClient) SetProperties

SetProperties Sets the properties of a storage account's Blob service, including Azure Storage Analytics. If an element (e.g. analytics_logging) is left as None, the existing settings on the service for that functionality are preserved.

func (ServiceClient) URL

func (s ServiceClient) URL() string

URL returns the URL endpoint used by the ServiceClient object.

type ServiceFilterBlobsOptions

type ServiceFilterBlobsOptions struct {
	// A string value that identifies the portion of the list of containers to be returned with the next listing operation. The operation returns the NextMarker
	// value within the response body if the listing operation did not return all containers remaining to be listed with the current page. The NextMarker value
	// can be used as the value for the marker parameter in a subsequent call to request the next page of list items. The marker value is opaque to the client.
	Marker *string
	// Specifies the maximum number of containers to return. If the request does not specify maxresults, or specifies a value greater than 5000, the server
	// will return up to 5000 items. Note that if the listing operation crosses a partition boundary, then the service will return a continuation token for
	// retrieving the remainder of the results. For this reason, it is possible that the service will return fewer results than specified by maxresults, or
	// than the default of 5000.
	MaxResults *int32
	// Filters the results to return only to return only blobs whose tags match the specified expression.
	Where *string
}

ServiceFilterBlobsOptions provides set of configurations for ServiceClient.FindBlobsByTags

type ServiceFilterBlobsResponse

type ServiceFilterBlobsResponse struct {
	// contains filtered or unexported fields
}

ServiceFilterBlobsResponse contains the response from ServiceClient.FindBlobsByTags

type ServiceGetAccountInfoOptions

type ServiceGetAccountInfoOptions struct {
}

ServiceGetAccountInfoOptions provides set of options for ServiceClient.GetAccountInfo

type ServiceGetAccountInfoResponse

type ServiceGetAccountInfoResponse struct {
	// contains filtered or unexported fields
}

ServiceGetAccountInfoResponse contains the response from ServiceClient.GetAccountInfo

type ServiceGetPropertiesOptions

type ServiceGetPropertiesOptions struct {
}

ServiceGetPropertiesOptions provides set of options for ServiceClient.GetProperties

type ServiceGetPropertiesResponse

type ServiceGetPropertiesResponse struct {
	// contains filtered or unexported fields
}

ServiceGetPropertiesResponse contains the response from ServiceClient.GetProperties

type ServiceGetStatisticsOptions

type ServiceGetStatisticsOptions struct {
}

ServiceGetStatisticsOptions provides set of options for ServiceClient.GetStatistics

type ServiceGetStatisticsResponse

type ServiceGetStatisticsResponse struct {
	// contains filtered or unexported fields
}

ServiceGetStatisticsResponse contains the response from ServiceClient.GetStatistics.

type ServiceListContainersSegmentPager

type ServiceListContainersSegmentPager struct {
	// contains filtered or unexported fields
}

ServiceListContainersSegmentPager provides operations for iterating over paged responses.

func (*ServiceListContainersSegmentPager) Err

func (p *ServiceListContainersSegmentPager) Err() error

Err returns the last error encountered while paging.

func (*ServiceListContainersSegmentPager) NextPage

func (p *ServiceListContainersSegmentPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ServiceListContainersSegmentPager) PageResponse

func (p *ServiceListContainersSegmentPager) PageResponse() serviceClientListContainersSegmentResponse

PageResponse returns the current serviceClientListContainersSegmentResponse page.

type ServiceSetPropertiesOptions

type ServiceSetPropertiesOptions struct {
	// The set of CORS rules.
	Cors []*CorsRule

	// The default version to use for requests to the Blob service if an incoming request's version is not specified. Possible
	// values include version 2008-10-27 and all more recent versions
	DefaultServiceVersion *string

	// the retention policy which determines how long the associated data should persist
	DeleteRetentionPolicy *RetentionPolicy

	// a summary of request statistics grouped by API in hour or minute aggregates for blobs
	HourMetrics *Metrics

	// Azure Analytics Logging settings.
	Logging *Logging

	// a summary of request statistics grouped by API in hour or minute aggregates for blobs
	MinuteMetrics *Metrics

	// The properties that enable an account to host a static website
	StaticWebsite *StaticWebsite
}

ServiceSetPropertiesOptions provides set of options for ServiceClient.SetProperties

type ServiceSetPropertiesResponse

type ServiceSetPropertiesResponse struct {
	// contains filtered or unexported fields
}

ServiceSetPropertiesResponse contains the response from ServiceClient.SetProperties

type SharedKeyCredential

type SharedKeyCredential struct {
	// contains filtered or unexported fields
}

SharedKeyCredential contains an account's name and its primary or secondary key. It is immutable making it shareable and goroutine-safe.

func NewSharedKeyCredential

func NewSharedKeyCredential(accountName string, accountKey string) (*SharedKeyCredential, error)

NewSharedKeyCredential creates an immutable SharedKeyCredential containing the storage account's name and either its primary or secondary key.

func (*SharedKeyCredential) AccountName

func (c *SharedKeyCredential) AccountName() string

AccountName returns the Storage account's name.

func (*SharedKeyCredential) ComputeHMACSHA256

func (c *SharedKeyCredential) ComputeHMACSHA256(message string) (string, error)

ComputeHMACSHA256 generates a hash signature for an HTTP request or for a SAS.

func (*SharedKeyCredential) SetAccountKey

func (c *SharedKeyCredential) SetAccountKey(accountKey string) error

SetAccountKey replaces the existing account key with the specified account key.

type SignedIdentifier

type SignedIdentifier struct {
	// REQUIRED; An Access policy
	AccessPolicy *AccessPolicy `xml:"AccessPolicy"`

	// REQUIRED; a unique id
	ID *string `xml:"Id"`
}

SignedIdentifier - signed identifier

type SourceModifiedAccessConditions

type SourceModifiedAccessConditions struct {
	// Specify an ETag value to operate only on blobs with a matching value.
	SourceIfMatch *string
	// Specify this header value to operate only on a blob if it has been modified since the specified date/time.
	SourceIfModifiedSince *time.Time
	// Specify an ETag value to operate only on blobs without a matching value.
	SourceIfNoneMatch *string
	// Specify a SQL where clause on blob tags to operate only on blobs with a matching value.
	SourceIfTags *string
	// Specify this header value to operate only on a blob if it has not been modified since the specified date/time.
	SourceIfUnmodifiedSince *time.Time
}

SourceModifiedAccessConditions contains a group of parameters for the blobClient.StartCopyFromURL method.

type StaticWebsite

type StaticWebsite struct {
	// REQUIRED; Indicates whether this account is hosting a static website
	Enabled *bool `xml:"Enabled"`

	// Absolute path of the default index page
	DefaultIndexDocumentPath *string `xml:"DefaultIndexDocumentPath"`

	// The absolute path of the custom 404 page
	ErrorDocument404Path *string `xml:"ErrorDocument404Path"`

	// The default name of the index page under each directory
	IndexDocument *string `xml:"IndexDocument"`
}

StaticWebsite - The properties that enable an account to host a static website

type StorageError

type StorageError struct {
	ErrorCode StorageErrorCode
	// contains filtered or unexported fields
}

StorageError is the internal struct that replaces the generated StorageError. TL;DR: This implements xml.Unmarshaler, and when the original StorageError is substituted, this unmarshaler kicks in. This handles the description and details. defunkifyStorageError handles the response, cause, and service code.

func (StorageError) Error

func (e StorageError) Error() string

Error implements the error interface's Error method to return a string representation of the error.

func (StorageError) Is

func (e StorageError) Is(err error) bool

Is checks if err can be cast as StorageError

func (StorageError) Response

func (e StorageError) Response() *http.Response

Response returns StorageError.response

func (*StorageError) StatusCode

func (e *StorageError) StatusCode() int

StatusCode returns service-error information. The caller may examine these values but should not modify any of them.

func (*StorageError) Temporary

func (e *StorageError) Temporary() bool

Temporary returns true if the error occurred due to a temporary condition (including an HTTP status of 500 or 503).

func (*StorageError) UnmarshalXML

func (e *StorageError) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)

UnmarshalXML performs custom unmarshalling of XML-formatted Azure storage request errors. nolint

type StorageErrorCode

type StorageErrorCode string

StorageErrorCode - Error codes returned by the service

const (
	StorageErrorCodeAccountAlreadyExists                              StorageErrorCode = "AccountAlreadyExists"
	StorageErrorCodeAccountBeingCreated                               StorageErrorCode = "AccountBeingCreated"
	StorageErrorCodeAccountIsDisabled                                 StorageErrorCode = "AccountIsDisabled"
	StorageErrorCodeAppendPositionConditionNotMet                     StorageErrorCode = "AppendPositionConditionNotMet"
	StorageErrorCodeAuthenticationFailed                              StorageErrorCode = "AuthenticationFailed"
	StorageErrorCodeAuthorizationFailure                              StorageErrorCode = "AuthorizationFailure"
	StorageErrorCodeAuthorizationPermissionMismatch                   StorageErrorCode = "AuthorizationPermissionMismatch"
	StorageErrorCodeAuthorizationProtocolMismatch                     StorageErrorCode = "AuthorizationProtocolMismatch"
	StorageErrorCodeAuthorizationResourceTypeMismatch                 StorageErrorCode = "AuthorizationResourceTypeMismatch"
	StorageErrorCodeAuthorizationServiceMismatch                      StorageErrorCode = "AuthorizationServiceMismatch"
	StorageErrorCodeAuthorizationSourceIPMismatch                     StorageErrorCode = "AuthorizationSourceIPMismatch"
	StorageErrorCodeBlobAlreadyExists                                 StorageErrorCode = "BlobAlreadyExists"
	StorageErrorCodeBlobArchived                                      StorageErrorCode = "BlobArchived"
	StorageErrorCodeBlobBeingRehydrated                               StorageErrorCode = "BlobBeingRehydrated"
	StorageErrorCodeBlobImmutableDueToPolicy                          StorageErrorCode = "BlobImmutableDueToPolicy"
	StorageErrorCodeBlobNotArchived                                   StorageErrorCode = "BlobNotArchived"
	StorageErrorCodeBlobNotFound                                      StorageErrorCode = "BlobNotFound"
	StorageErrorCodeBlobOverwritten                                   StorageErrorCode = "BlobOverwritten"
	StorageErrorCodeBlobTierInadequateForContentLength                StorageErrorCode = "BlobTierInadequateForContentLength"
	StorageErrorCodeBlobUsesCustomerSpecifiedEncryption               StorageErrorCode = "BlobUsesCustomerSpecifiedEncryption"
	StorageErrorCodeBlockCountExceedsLimit                            StorageErrorCode = "BlockCountExceedsLimit"
	StorageErrorCodeBlockListTooLong                                  StorageErrorCode = "BlockListTooLong"
	StorageErrorCodeCannotChangeToLowerTier                           StorageErrorCode = "CannotChangeToLowerTier"
	StorageErrorCodeCannotVerifyCopySource                            StorageErrorCode = "CannotVerifyCopySource"
	StorageErrorCodeConditionHeadersNotSupported                      StorageErrorCode = "ConditionHeadersNotSupported"
	StorageErrorCodeConditionNotMet                                   StorageErrorCode = "ConditionNotMet"
	StorageErrorCodeContainerAlreadyExists                            StorageErrorCode = "ContainerAlreadyExists"
	StorageErrorCodeContainerBeingDeleted                             StorageErrorCode = "ContainerBeingDeleted"
	StorageErrorCodeContainerDisabled                                 StorageErrorCode = "ContainerDisabled"
	StorageErrorCodeContainerNotFound                                 StorageErrorCode = "ContainerNotFound"
	StorageErrorCodeContentLengthLargerThanTierLimit                  StorageErrorCode = "ContentLengthLargerThanTierLimit"
	StorageErrorCodeCopyAcrossAccountsNotSupported                    StorageErrorCode = "CopyAcrossAccountsNotSupported"
	StorageErrorCodeCopyIDMismatch                                    StorageErrorCode = "CopyIdMismatch"
	StorageErrorCodeEmptyMetadataKey                                  StorageErrorCode = "EmptyMetadataKey"
	StorageErrorCodeFeatureVersionMismatch                            StorageErrorCode = "FeatureVersionMismatch"
	StorageErrorCodeIncrementalCopyBlobMismatch                       StorageErrorCode = "IncrementalCopyBlobMismatch"
	StorageErrorCodeIncrementalCopyOfEralierVersionSnapshotNotAllowed StorageErrorCode = "IncrementalCopyOfEralierVersionSnapshotNotAllowed"
	StorageErrorCodeIncrementalCopySourceMustBeSnapshot               StorageErrorCode = "IncrementalCopySourceMustBeSnapshot"
	StorageErrorCodeInfiniteLeaseDurationRequired                     StorageErrorCode = "InfiniteLeaseDurationRequired"
	StorageErrorCodeInsufficientAccountPermissions                    StorageErrorCode = "InsufficientAccountPermissions"
	StorageErrorCodeInternalError                                     StorageErrorCode = "InternalError"
	StorageErrorCodeInvalidAuthenticationInfo                         StorageErrorCode = "InvalidAuthenticationInfo"
	StorageErrorCodeInvalidBlobOrBlock                                StorageErrorCode = "InvalidBlobOrBlock"
	StorageErrorCodeInvalidBlobTier                                   StorageErrorCode = "InvalidBlobTier"
	StorageErrorCodeInvalidBlobType                                   StorageErrorCode = "InvalidBlobType"
	StorageErrorCodeInvalidBlockID                                    StorageErrorCode = "InvalidBlockId"
	StorageErrorCodeInvalidBlockList                                  StorageErrorCode = "InvalidBlockList"
	StorageErrorCodeInvalidHTTPVerb                                   StorageErrorCode = "InvalidHttpVerb"
	StorageErrorCodeInvalidHeaderValue                                StorageErrorCode = "InvalidHeaderValue"
	StorageErrorCodeInvalidInput                                      StorageErrorCode = "InvalidInput"
	StorageErrorCodeInvalidMD5                                        StorageErrorCode = "InvalidMd5"
	StorageErrorCodeInvalidMetadata                                   StorageErrorCode = "InvalidMetadata"
	StorageErrorCodeInvalidOperation                                  StorageErrorCode = "InvalidOperation"
	StorageErrorCodeInvalidPageRange                                  StorageErrorCode = "InvalidPageRange"
	StorageErrorCodeInvalidQueryParameterValue                        StorageErrorCode = "InvalidQueryParameterValue"
	StorageErrorCodeInvalidRange                                      StorageErrorCode = "InvalidRange"
	StorageErrorCodeInvalidResourceName                               StorageErrorCode = "InvalidResourceName"
	StorageErrorCodeInvalidSourceBlobType                             StorageErrorCode = "InvalidSourceBlobType"
	StorageErrorCodeInvalidSourceBlobURL                              StorageErrorCode = "InvalidSourceBlobUrl"
	StorageErrorCodeInvalidURI                                        StorageErrorCode = "InvalidUri"
	StorageErrorCodeInvalidVersionForPageBlobOperation                StorageErrorCode = "InvalidVersionForPageBlobOperation"
	StorageErrorCodeInvalidXMLDocument                                StorageErrorCode = "InvalidXmlDocument"
	StorageErrorCodeInvalidXMLNodeValue                               StorageErrorCode = "InvalidXmlNodeValue"
	StorageErrorCodeLeaseAlreadyBroken                                StorageErrorCode = "LeaseAlreadyBroken"
	StorageErrorCodeLeaseAlreadyPresent                               StorageErrorCode = "LeaseAlreadyPresent"
	StorageErrorCodeLeaseIDMismatchWithBlobOperation                  StorageErrorCode = "LeaseIdMismatchWithBlobOperation"
	StorageErrorCodeLeaseIDMismatchWithContainerOperation             StorageErrorCode = "LeaseIdMismatchWithContainerOperation"
	StorageErrorCodeLeaseIDMismatchWithLeaseOperation                 StorageErrorCode = "LeaseIdMismatchWithLeaseOperation"
	StorageErrorCodeLeaseIDMissing                                    StorageErrorCode = "LeaseIdMissing"
	StorageErrorCodeLeaseIsBreakingAndCannotBeAcquired                StorageErrorCode = "LeaseIsBreakingAndCannotBeAcquired"
	StorageErrorCodeLeaseIsBreakingAndCannotBeChanged                 StorageErrorCode = "LeaseIsBreakingAndCannotBeChanged"
	StorageErrorCodeLeaseIsBrokenAndCannotBeRenewed                   StorageErrorCode = "LeaseIsBrokenAndCannotBeRenewed"
	StorageErrorCodeLeaseLost                                         StorageErrorCode = "LeaseLost"
	StorageErrorCodeLeaseNotPresentWithBlobOperation                  StorageErrorCode = "LeaseNotPresentWithBlobOperation"
	StorageErrorCodeLeaseNotPresentWithContainerOperation             StorageErrorCode = "LeaseNotPresentWithContainerOperation"
	StorageErrorCodeLeaseNotPresentWithLeaseOperation                 StorageErrorCode = "LeaseNotPresentWithLeaseOperation"
	StorageErrorCodeMD5Mismatch                                       StorageErrorCode = "Md5Mismatch"
	StorageErrorCodeMaxBlobSizeConditionNotMet                        StorageErrorCode = "MaxBlobSizeConditionNotMet"
	StorageErrorCodeMetadataTooLarge                                  StorageErrorCode = "MetadataTooLarge"
	StorageErrorCodeMissingContentLengthHeader                        StorageErrorCode = "MissingContentLengthHeader"
	StorageErrorCodeMissingRequiredHeader                             StorageErrorCode = "MissingRequiredHeader"
	StorageErrorCodeMissingRequiredQueryParameter                     StorageErrorCode = "MissingRequiredQueryParameter"
	StorageErrorCodeMissingRequiredXMLNode                            StorageErrorCode = "MissingRequiredXmlNode"
	StorageErrorCodeMultipleConditionHeadersNotSupported              StorageErrorCode = "MultipleConditionHeadersNotSupported"
	StorageErrorCodeNoAuthenticationInformation                       StorageErrorCode = "NoAuthenticationInformation"
	StorageErrorCodeNoPendingCopyOperation                            StorageErrorCode = "NoPendingCopyOperation"
	StorageErrorCodeOperationNotAllowedOnIncrementalCopyBlob          StorageErrorCode = "OperationNotAllowedOnIncrementalCopyBlob"
	StorageErrorCodeOperationTimedOut                                 StorageErrorCode = "OperationTimedOut"
	StorageErrorCodeOutOfRangeInput                                   StorageErrorCode = "OutOfRangeInput"
	StorageErrorCodeOutOfRangeQueryParameterValue                     StorageErrorCode = "OutOfRangeQueryParameterValue"
	StorageErrorCodePendingCopyOperation                              StorageErrorCode = "PendingCopyOperation"
	StorageErrorCodePreviousSnapshotCannotBeNewer                     StorageErrorCode = "PreviousSnapshotCannotBeNewer"
	StorageErrorCodePreviousSnapshotNotFound                          StorageErrorCode = "PreviousSnapshotNotFound"
	StorageErrorCodePreviousSnapshotOperationNotSupported             StorageErrorCode = "PreviousSnapshotOperationNotSupported"
	StorageErrorCodeRequestBodyTooLarge                               StorageErrorCode = "RequestBodyTooLarge"
	StorageErrorCodeRequestURLFailedToParse                           StorageErrorCode = "RequestUrlFailedToParse"
	StorageErrorCodeResourceAlreadyExists                             StorageErrorCode = "ResourceAlreadyExists"
	StorageErrorCodeResourceNotFound                                  StorageErrorCode = "ResourceNotFound"
	StorageErrorCodeResourceTypeMismatch                              StorageErrorCode = "ResourceTypeMismatch"
	StorageErrorCodeSequenceNumberConditionNotMet                     StorageErrorCode = "SequenceNumberConditionNotMet"
	StorageErrorCodeSequenceNumberIncrementTooLarge                   StorageErrorCode = "SequenceNumberIncrementTooLarge"
	StorageErrorCodeServerBusy                                        StorageErrorCode = "ServerBusy"
	StorageErrorCodeSnapshotCountExceeded                             StorageErrorCode = "SnapshotCountExceeded"
	StorageErrorCodeSnapshotOperationRateExceeded                     StorageErrorCode = "SnapshotOperationRateExceeded"
	StorageErrorCodeSnapshotsPresent                                  StorageErrorCode = "SnapshotsPresent"
	StorageErrorCodeSourceConditionNotMet                             StorageErrorCode = "SourceConditionNotMet"
	StorageErrorCodeSystemInUse                                       StorageErrorCode = "SystemInUse"
	StorageErrorCodeTargetConditionNotMet                             StorageErrorCode = "TargetConditionNotMet"
	StorageErrorCodeUnauthorizedBlobOverwrite                         StorageErrorCode = "UnauthorizedBlobOverwrite"
	StorageErrorCodeUnsupportedHTTPVerb                               StorageErrorCode = "UnsupportedHttpVerb"
	StorageErrorCodeUnsupportedHeader                                 StorageErrorCode = "UnsupportedHeader"
	StorageErrorCodeUnsupportedQueryParameter                         StorageErrorCode = "UnsupportedQueryParameter"
	StorageErrorCodeUnsupportedXMLNode                                StorageErrorCode = "UnsupportedXmlNode"
)

func PossibleStorageErrorCodeValues

func PossibleStorageErrorCodeValues() []StorageErrorCode

PossibleStorageErrorCodeValues returns the possible values for the StorageErrorCode const type.

func (StorageErrorCode) ToPtr

ToPtr returns a *StorageErrorCode pointing to the current value.

type StorageServiceProperties

type StorageServiceProperties struct {
	// The set of CORS rules.
	Cors []*CorsRule `xml:"Cors>CorsRule"`

	// The default version to use for requests to the Blob service if an incoming request's version is not specified. Possible
	// values include version 2008-10-27 and all more recent versions
	DefaultServiceVersion *string `xml:"DefaultServiceVersion"`

	// the retention policy which determines how long the associated data should persist
	DeleteRetentionPolicy *RetentionPolicy `xml:"DeleteRetentionPolicy"`

	// a summary of request statistics grouped by API in hour or minute aggregates for blobs
	HourMetrics *Metrics `xml:"HourMetrics"`

	// Azure Analytics Logging settings.
	Logging *Logging `xml:"Logging"`

	// a summary of request statistics grouped by API in hour or minute aggregates for blobs
	MinuteMetrics *Metrics `xml:"MinuteMetrics"`

	// The properties that enable an account to host a static website
	StaticWebsite *StaticWebsite `xml:"StaticWebsite"`
}

StorageServiceProperties - Storage Service Properties.

func (StorageServiceProperties) MarshalXML

func (s StorageServiceProperties) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaller interface for type StorageServiceProperties.

type StorageServiceStats

type StorageServiceStats struct {
	// Geo-Replication information for the Secondary Storage Service
	GeoReplication *GeoReplication `xml:"GeoReplication"`
}

StorageServiceStats - Stats for the storage service.

type TransferManager

type TransferManager interface {
	// Get provides a buffer that will be used to read data into and write out to the stream.
	// It is guaranteed by this package to not read or write beyond the size of the slice.
	Get() []byte

	// Put may or may not put the buffer into underlying storage, depending on settings.
	// The buffer must not be touched after this has been called.
	Put(b []byte) // nolint

	// Run will use a goroutine pool entry to run a function. This blocks until a pool
	// goroutine becomes available.
	Run(func())

	// Close shuts down all internal goroutines. This must be called when the TransferManager
	// will no longer be used. Not closing it will cause a goroutine leak.
	Close()
}

TransferManager provides a buffer and thread pool manager for certain transfer options. It is undefined behavior if code outside this package call any of these methods.

func NewStaticBuffer

func NewStaticBuffer(size, max int) (TransferManager, error)

NewStaticBuffer creates a TransferManager that will use a channel as a circular buffer that can hold "max" buffers of "size". The goroutine pool is also sized at max. This can be shared between calls if you wish to control maximum memory and concurrency with multiple concurrent calls.

func NewSyncPool

func NewSyncPool(size, concurrency int) (TransferManager, error)

NewSyncPool creates a TransferManager that will use a sync.Pool that can hold a non-capped number of buffers constrained by concurrency. This can be shared between calls if you wish to share memory and concurrency.

type UploadOption

type UploadOption struct {
	// BlockSize specifies the block size to use; the default (and maximum size) is BlockBlobMaxStageBlockBytes.
	BlockSize int64

	// Progress is a function that is invoked periodically as bytes are sent to the BlockBlobClient.
	// Note that the progress reporting is not always increasing; it can go down when retrying a request.
	Progress func(bytesTransferred int64)

	// HTTPHeaders indicates the HTTP headers to be associated with the blob.
	HTTPHeaders *BlobHTTPHeaders

	// Metadata indicates the metadata to be associated with the blob when PutBlockList is called.
	Metadata map[string]string

	// BlobAccessConditions indicates the access conditions for the block blob.
	BlobAccessConditions *BlobAccessConditions

	// AccessTier indicates the tier of blob
	AccessTier *AccessTier

	// TagsMap
	TagsMap map[string]string

	// ClientProvidedKeyOptions indicates the client provided key by name and/or by value to encrypt/decrypt data.
	CpkInfo      *CpkInfo
	CpkScopeInfo *CpkScopeInfo

	// Parallelism indicates the maximum number of blocks to upload in parallel (0=default)
	Parallelism uint16
	// Optional header, Specifies the transactional crc64 for the body, to be validated by the service.
	TransactionalContentCRC64 *[]byte
	// Specify the transactional md5 for the body, to be validated by the service.
	TransactionalContentMD5 *[]byte
}

UploadOption identifies options used by the UploadBuffer and UploadFile functions.

type UploadStreamOptions

type UploadStreamOptions struct {
	// TransferManager provides a TransferManager that controls buffer allocation/reuse and
	// concurrency. This overrides BufferSize and MaxBuffers if set.
	TransferManager TransferManager

	// BufferSize sizes the buffer used to read data from source. If < 1 MiB, defaults to 1 MiB.
	BufferSize int
	// MaxBuffers defines the number of simultaneous uploads will be performed to upload the file.
	MaxBuffers           int
	HTTPHeaders          *BlobHTTPHeaders
	Metadata             map[string]string
	BlobAccessConditions *BlobAccessConditions
	AccessTier           *AccessTier
	BlobTagsMap          map[string]string
	CpkInfo              *CpkInfo
	CpkScopeInfo         *CpkScopeInfo
	// contains filtered or unexported fields
}

UploadStreamOptions provides set of configurations for UploadStream operation

type UserDelegationKey

type UserDelegationKey struct {
	// REQUIRED; The date-time the key expires
	SignedExpiry *time.Time `xml:"SignedExpiry"`

	// REQUIRED; The Azure Active Directory object ID in GUID format.
	SignedOid *string `xml:"SignedOid"`

	// REQUIRED; Abbreviation of the Azure Storage service that accepts the key
	SignedService *string `xml:"SignedService"`

	// REQUIRED; The date-time the key is active
	SignedStart *time.Time `xml:"SignedStart"`

	// REQUIRED; The Azure Active Directory tenant ID in GUID format
	SignedTid *string `xml:"SignedTid"`

	// REQUIRED; The service version that created the key
	SignedVersion *string `xml:"SignedVersion"`

	// REQUIRED; The key as a base64 string
	Value *string `xml:"Value"`
}

UserDelegationKey - A user delegation key

func (UserDelegationKey) MarshalXML

func (u UserDelegationKey) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaller interface for type UserDelegationKey.

func (*UserDelegationKey) UnmarshalXML

func (u *UserDelegationKey) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaller interface for type UserDelegationKey.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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