Maximum sizes (per REST API) for various concepts
const ( MaxBlobBlockSize = 100 * 1024 * 1024 MaxBlobPageSize = 4 * 1024 * 1024 )
const ( // DefaultBaseURL is the domain name used for storage requests in the // public cloud when a default client is created. DefaultBaseURL = "core.windows.net" // DefaultAPIVersion is the Azure Storage API version string used when a // basic client is created. DefaultAPIVersion = "2018-03-28" // StorageEmulatorAccountName is the fixed storage account used by Azure Storage Emulator StorageEmulatorAccountName = "devstoreaccount1" // StorageEmulatorAccountKey is the the fixed storage account used by Azure Storage Emulator StorageEmulatorAccountKey = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" )
This consts are meant to help with Odata supported operations
const ( OdataTypeSuffix = "@odata.type" OdataBinary = "Edm.Binary" OdataDateTime = "Edm.DateTime" OdataDouble = "Edm.Double" OdataGUID = "Edm.Guid" OdataInt64 = "Edm.Int64" OdataFilter = "$filter" OdataOrderBy = "$orderby" OdataTop = "$top" OdataSkip = "$skip" OdataCount = "$count" OdataExpand = "$expand" OdataSelect = "$select" OdataSearch = "$search" EmptyPayload MetadataLevel = "" NoMetadata MetadataLevel = "application/json;odata=nometadata" MinimalMetadata MetadataLevel = "application/json;odata=minimalmetadata" FullMetadata MetadataLevel = "application/json;odata=fullmetadata" )
consts for batch operations.
const ( InsertOp = Operation(1) DeleteOp = Operation(2) ReplaceOp = Operation(3) MergeOp = Operation(4) InsertOrReplaceOp = Operation(5) InsertOrMergeOp = Operation(6) )
ContainerAccessHeader references header used when setting/getting container ACL
const ( ContainerAccessHeader string = "x-ms-blob-public-access" )
MaxFileSize defines the maximum size in bytes for a file.
const MaxFileSize = oneTB
MaxRangeSize defines the maximum size in bytes for a file range.
const MaxRangeSize = fourMB
func IsValidCosmosAccount(account string) bool
IsValidCosmosAccount checks if the Cosmos account name is valid. See https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-manage-database-account
func IsValidStorageAccount(account string) bool
IsValidStorageAccount checks if the storage account name is valid. See https://docs.microsoft.com/en-us/azure/storage/storage-create-storage-account
AbortCopyOptions includes the options for an abort blob operation
type AbortCopyOptions struct { Timeout uint LeaseID string `header:"x-ms-lease-id"` RequestID string `header:"x-ms-client-request-id"` }
AccessPolicy is the response type from the GetPermissions call.
type AccessPolicy struct { SignedIdentifiersList SignedIdentifiers `xml:"SignedIdentifiers"` }
AccessPolicyDetailsXML has specifics about an access policy annotated with XML details.
type AccessPolicyDetailsXML struct { StartTime time.Time `xml:"Start"` ExpiryTime time.Time `xml:"Expiry"` Permission string `xml:"Permission"` }
AccountSASTokenOptions includes options for constructing an account SAS token. https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas
type AccountSASTokenOptions struct { APIVersion string Services Services ResourceTypes ResourceTypes Permissions Permissions Start time.Time Expiry time.Time IP string UseHTTPS bool }
AppendBlockOptions includes the options for an append block operation
type AppendBlockOptions struct { Timeout uint LeaseID string `header:"x-ms-lease-id"` MaxSize *uint `header:"x-ms-blob-condition-maxsize"` AppendPosition *uint `header:"x-ms-blob-condition-appendpos"` IfModifiedSince *time.Time `header:"If-Modified-Since"` IfUnmodifiedSince *time.Time `header:"If-Unmodified-Since"` IfMatch string `header:"If-Match"` IfNoneMatch string `header:"If-None-Match"` RequestID string `header:"x-ms-client-request-id"` ContentMD5 bool }
AzureStorageServiceError contains fields of the error response from Azure Storage Service REST API. See https://msdn.microsoft.com/en-us/library/azure/dd179382.aspx Some fields might be specific to certain calls.
type AzureStorageServiceError struct { Code string `xml:"Code"` Message string `xml:"Message"` AuthenticationErrorDetail string `xml:"AuthenticationErrorDetail"` QueryParameterName string `xml:"QueryParameterName"` QueryParameterValue string `xml:"QueryParameterValue"` Reason string `xml:"Reason"` Lang string StatusCode int RequestID string Date string APIVersion string }
func (e AzureStorageServiceError) Error() string
AzureTablesServiceError contains fields of the error response from Azure Table Storage Service REST API in Atom format. See https://msdn.microsoft.com/en-us/library/azure/dd179382.aspx
type AzureTablesServiceError struct { Code string `xml:"code"` Message string `xml:"message"` StatusCode int RequestID string Date string APIVersion string }
func (e AzureTablesServiceError) Error() string
BatchEntity used for tracking Entities to operate on and whether operations (replace/merge etc) should be forced. Wrapper for regular Entity with additional data specific for the entity.
type BatchEntity struct { *Entity Force bool Op Operation }
A Blob is an entry in BlobListResponse.
type Blob struct { Container *Container Name string `xml:"Name"` Snapshot time.Time `xml:"Snapshot"` Properties BlobProperties `xml:"Properties"` Metadata BlobMetadata `xml:"Metadata"` }
func (b *Blob) AbortCopy(copyID string, options *AbortCopyOptions) error
AbortCopy aborts a BlobCopy which has already been triggered by the StartBlobCopy function. copyID is generated from StartBlobCopy function. currentLeaseID is required IF the destination blob has an active lease on it. See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Abort-Copy-Blob
func (b *Blob) AcquireLease(leaseTimeInSeconds int, proposedLeaseID string, options *LeaseOptions) (returnedLeaseID string, err error)
AcquireLease creates a lease for a blob returns leaseID acquired In API Versions starting on 2012-02-12, the minimum leaseTimeInSeconds is 15, the maximum non-infinite leaseTimeInSeconds is 60. To specify an infinite lease, provide the value -1. See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Lease-Blob
func (b *Blob) AppendBlock(chunk []byte, options *AppendBlockOptions) error
AppendBlock appends a block to an append blob.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Append-Block
func (b *Blob) BreakLease(options *LeaseOptions) (breakTimeout int, err error)
BreakLease breaks the lease for a blob Returns the timeout remaining in the lease in seconds See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Lease-Blob
func (b *Blob) BreakLeaseWithBreakPeriod(breakPeriodInSeconds int, options *LeaseOptions) (breakTimeout int, err error)
BreakLeaseWithBreakPeriod breaks the lease for a blob breakPeriodInSeconds is used to determine how long until new lease can be created. Returns the timeout remaining in the lease in seconds See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Lease-Blob
func (b *Blob) ChangeLease(currentLeaseID string, proposedLeaseID string, options *LeaseOptions) (newLeaseID string, err error)
ChangeLease changes a lease ID for a blob Returns the new LeaseID acquired See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Lease-Blob
func (b *Blob) ClearRange(blobRange BlobRange, options *PutPageOptions) error
ClearRange clears the given range in a page blob. Ranges must be aligned with 512-byte boundaries and chunk must be of size multiplies by 512.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Put-Page
func (b *Blob) Copy(sourceBlob string, options *CopyOptions) error
Copy starts a blob copy operation and waits for the operation to complete. sourceBlob parameter must be a canonical URL to the blob (can be obtained using the GetURL method.) There is no SLA on blob copy and therefore this helper method works faster on smaller files.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Copy-Blob
func (b *Blob) CreateBlockBlob(options *PutBlobOptions) error
CreateBlockBlob initializes an empty block blob with no blocks.
See CreateBlockBlobFromReader for more info on creating blobs.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Put-Blob
func (b *Blob) CreateBlockBlobFromReader(blob io.Reader, options *PutBlobOptions) error
CreateBlockBlobFromReader initializes a block blob using data from reader. Size must be the number of bytes read from reader. To create an empty blob, use size==0 and reader==nil.
Any headers set in blob.Properties or metadata in blob.Metadata will be set on the blob.
The API rejects requests with size > 256 MiB (but this limit is not checked by the SDK). To write a larger blob, use CreateBlockBlob, PutBlock, and PutBlockList.
To create a blob from scratch, call container.GetBlobReference() to get an empty blob, fill in blob.Properties and blob.Metadata as appropriate then call this method.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Put-Blob
func (b *Blob) CreateSnapshot(options *SnapshotOptions) (snapshotTimestamp *time.Time, err error)
CreateSnapshot creates a snapshot for a blob See https://msdn.microsoft.com/en-us/library/azure/ee691971.aspx
func (b *Blob) Delete(options *DeleteBlobOptions) error
Delete deletes the given blob from the specified container. If the blob does not exist at the time of the Delete Blob operation, it returns error. See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Delete-Blob
func (b *Blob) DeleteIfExists(options *DeleteBlobOptions) (bool, error)
DeleteIfExists deletes the given blob from the specified container If the blob is deleted with this call, returns true. Otherwise returns false.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Delete-Blob
func (b *Blob) Exists() (bool, error)
Exists returns true if a blob with given name exists on the specified container of the storage account.
func (b *Blob) Get(options *GetBlobOptions) (io.ReadCloser, error)
Get returns a stream to read the blob. Caller must call both Read and Close() to correctly close the underlying connection.
See the GetRange method for use with a Range header.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Get-Blob
func (b *Blob) GetBlockList(blockType BlockListType, options *GetBlockListOptions) (BlockListResponse, error)
GetBlockList retrieves list of blocks in the specified block blob.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Get-Block-List
func (b *Blob) GetMetadata(options *GetBlobMetadataOptions) error
GetMetadata returns all user-defined metadata for the specified blob.
All metadata keys will be returned in lower case. (HTTP header names are case-insensitive.)
See https://msdn.microsoft.com/en-us/library/azure/dd179414.aspx
func (b *Blob) GetPageRanges(options *GetPageRangesOptions) (GetPageRangesResponse, error)
GetPageRanges returns the list of valid page ranges for a page blob.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Get-Page-Ranges
func (b *Blob) GetProperties(options *GetBlobPropertiesOptions) error
GetProperties provides various information about the specified blob. See https://msdn.microsoft.com/en-us/library/azure/dd179394.aspx
func (b *Blob) GetRange(options *GetBlobRangeOptions) (io.ReadCloser, error)
GetRange reads the specified range of a blob to a stream. The bytesRange string must be in a format like "0-", "10-100" as defined in HTTP 1.1 spec. Caller must call both Read and Close()// to correctly close the underlying connection. See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Get-Blob
func (b *Blob) GetSASURI(options BlobSASOptions) (string, error)
GetSASURI creates an URL to the blob which contains the Shared Access Signature with the specified options.
See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
func (b *Blob) GetURL() string
GetURL gets the canonical URL to the blob with the specified name in the specified container. This method does not create a publicly accessible URL if the blob or container is private and this method does not check if the blob exists.
func (b *Blob) IncrementalCopyBlob(sourceBlobURL string, snapshotTime time.Time, options *IncrementalCopyOptions) (string, error)
IncrementalCopyBlob copies a snapshot of a source blob and copies to referring blob sourceBlob parameter must be a valid snapshot URL of the original blob. THe original blob mut be public, or use a Shared Access Signature.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/incremental-copy-blob .
func (b *Blob) PutAppendBlob(options *PutBlobOptions) error
PutAppendBlob initializes an empty append blob with specified name. An append blob must be created using this method before appending blocks.
See CreateBlockBlobFromReader for more info on creating blobs.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Put-Blob
func (b *Blob) PutBlock(blockID string, chunk []byte, options *PutBlockOptions) error
PutBlock saves the given data chunk to the specified block blob with given ID.
The API rejects chunks larger than 100 MiB (but this limit is not checked by the SDK).
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Put-Block
func (b *Blob) PutBlockFromURL(blockID string, blobURL string, offset int64, size uint64, options *PutBlockFromURLOptions) error
PutBlockFromURL copy data of exactly specified size from specified URL to the block blob with given ID. It is an alternative to PutBlocks where data comes from a remote URL and the offset and length is known in advance.
The API rejects requests with size > 100 MiB (but this limit is not checked by the SDK).
See https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url
func (b *Blob) PutBlockList(blocks []Block, options *PutBlockListOptions) error
PutBlockList saves list of blocks to the specified block blob.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Put-Block-List
func (b *Blob) PutBlockWithLength(blockID string, size uint64, blob io.Reader, options *PutBlockOptions) error
PutBlockWithLength saves the given data stream of exactly specified size to the block blob with given ID. It is an alternative to PutBlocks where data comes as stream but the length is known in advance.
The API rejects requests with size > 100 MiB (but this limit is not checked by the SDK).
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Put-Block
func (b *Blob) PutPageBlob(options *PutBlobOptions) error
PutPageBlob initializes an empty page blob with specified name and maximum size in bytes (size must be aligned to a 512-byte boundary). A page blob must be created using this method before writing pages.
See CreateBlockBlobFromReader for more info on creating blobs.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Put-Blob
func (b *Blob) ReleaseLease(currentLeaseID string, options *LeaseOptions) error
ReleaseLease releases the lease for a blob See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Lease-Blob
func (b *Blob) RenewLease(currentLeaseID string, options *LeaseOptions) error
RenewLease renews the lease for a blob as per https://msdn.microsoft.com/en-us/library/azure/ee691972.aspx
func (b *Blob) SetMetadata(options *SetBlobMetadataOptions) error
SetMetadata replaces the metadata for the specified blob.
Some keys may be converted to Camel-Case before sending. All keys are returned in lower case by GetBlobMetadata. HTTP header names are case-insensitive so case munging should not matter to other applications either.
See https://msdn.microsoft.com/en-us/library/azure/dd179414.aspx
func (b *Blob) SetProperties(options *SetBlobPropertiesOptions) error
SetProperties replaces the BlobHeaders for the specified blob.
Some keys may be converted to Camel-Case before sending. All keys are returned in lower case by GetBlobProperties. HTTP header names are case-insensitive so case munging should not matter to other applications either.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Set-Blob-Properties
func (b *Blob) StartCopy(sourceBlob string, options *CopyOptions) (string, error)
StartCopy starts a blob copy operation. sourceBlob parameter must be a canonical URL to the blob (can be obtained using the GetURL method.)
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Copy-Blob
func (b *Blob) WaitForCopy(copyID string) error
WaitForCopy loops until a BlobCopy operation is completed (or fails with error)
func (b *Blob) WriteRange(blobRange BlobRange, bytes io.Reader, options *PutPageOptions) error
WriteRange writes a range of pages to a page blob. Ranges must be aligned with 512-byte boundaries and chunk must be of size multiplies by 512.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Put-Page
BlobListResponse contains the response fields from ListBlobs call.
See https://msdn.microsoft.com/en-us/library/azure/dd135734.aspx
type BlobListResponse struct { XMLName xml.Name `xml:"EnumerationResults"` Xmlns string `xml:"xmlns,attr"` Prefix string `xml:"Prefix"` Marker string `xml:"Marker"` NextMarker string `xml:"NextMarker"` MaxResults int64 `xml:"MaxResults"` Blobs []Blob `xml:"Blobs>Blob"` // BlobPrefix is used to traverse blobs as if it were a file system. // It is returned if ListBlobsParameters.Delimiter is specified. // The list here can be thought of as "folders" that may contain // other folders or blobs. BlobPrefixes []string `xml:"Blobs>BlobPrefix>Name"` // Delimiter is used to traverse blobs as if it were a file system. // It is returned if ListBlobsParameters.Delimiter is specified. Delimiter string `xml:"Delimiter"` }
BlobMetadata is a set of custom name/value pairs.
See https://msdn.microsoft.com/en-us/library/azure/dd179404.aspx
type BlobMetadata map[string]string
func (bm BlobMetadata) MarshalXML(enc *xml.Encoder, start xml.StartElement) error
MarshalXML implements the xml.Marshaler interface. It encodes metadata name/value pairs as they would appear in an Azure ListBlobs response.
func (bm *BlobMetadata) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML converts the xml:Metadata into Metadata map
BlobProperties contains various properties of a blob returned in various endpoints like ListBlobs or GetBlobProperties.
type BlobProperties struct { LastModified TimeRFC1123 `xml:"Last-Modified"` Etag string `xml:"Etag"` ContentMD5 string `xml:"Content-MD5" header:"x-ms-blob-content-md5"` ContentLength int64 `xml:"Content-Length"` ContentType string `xml:"Content-Type" header:"x-ms-blob-content-type"` ContentEncoding string `xml:"Content-Encoding" header:"x-ms-blob-content-encoding"` CacheControl string `xml:"Cache-Control" header:"x-ms-blob-cache-control"` ContentLanguage string `xml:"Cache-Language" header:"x-ms-blob-content-language"` ContentDisposition string `xml:"Content-Disposition" header:"x-ms-blob-content-disposition"` BlobType BlobType `xml:"BlobType"` SequenceNumber int64 `xml:"x-ms-blob-sequence-number"` CopyID string `xml:"CopyId"` CopyStatus string `xml:"CopyStatus"` CopySource string `xml:"CopySource"` CopyProgress string `xml:"CopyProgress"` CopyCompletionTime TimeRFC1123 `xml:"CopyCompletionTime"` CopyStatusDescription string `xml:"CopyStatusDescription"` LeaseStatus string `xml:"LeaseStatus"` LeaseState string `xml:"LeaseState"` LeaseDuration string `xml:"LeaseDuration"` ServerEncrypted bool `xml:"ServerEncrypted"` IncrementalCopy bool `xml:"IncrementalCopy"` }
BlobRange represents the bytes range to be get
type BlobRange struct { Start uint64 End uint64 }
func (br BlobRange) String() string
BlobSASOptions are options to construct a blob SAS URI. See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
type BlobSASOptions struct { BlobServiceSASPermissions OverrideHeaders SASOptions }
BlobServiceSASPermissions includes the available permissions for blob service SAS URI.
type BlobServiceSASPermissions struct { Read bool Add bool Create bool Write bool Delete bool }
BlobStorageClient contains operations for Microsoft Azure Blob Storage Service.
type BlobStorageClient struct {
// contains filtered or unexported fields
}
func (b *BlobStorageClient) GetContainerReference(name string) *Container
GetContainerReference returns a Container object for the specified container name.
func (b *BlobStorageClient) GetServiceProperties() (*ServiceProperties, error)
GetServiceProperties gets the properties of your storage account's blob service. See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/get-blob-service-properties
func (b BlobStorageClient) ListContainers(params ListContainersParameters) (*ContainerListResponse, error)
ListContainers returns the list of containers in a storage account along with pagination token and other response details.
See https://msdn.microsoft.com/en-us/library/azure/dd179352.aspx
func (b *BlobStorageClient) SetServiceProperties(props ServiceProperties) error
SetServiceProperties sets the properties of your storage account's blob service. See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/set-blob-service-properties
BlobType defines the type of the Azure Blob.
type BlobType string
Types of page blobs
const ( BlobTypeBlock BlobType = "BlockBlob" BlobTypePage BlobType = "PageBlob" BlobTypeAppend BlobType = "AppendBlob" )
Block is used to create Block entities for Put Block List call.
type Block struct { ID string Status BlockStatus }
BlockListResponse contains the response fields from Get Block List call.
See https://msdn.microsoft.com/en-us/library/azure/dd179400.aspx
type BlockListResponse struct { XMLName xml.Name `xml:"BlockList"` CommittedBlocks []BlockResponse `xml:"CommittedBlocks>Block"` UncommittedBlocks []BlockResponse `xml:"UncommittedBlocks>Block"` }
BlockListType is used to filter out types of blocks in a Get Blocks List call for a block blob.
See https://msdn.microsoft.com/en-us/library/azure/dd179400.aspx for all block types.
type BlockListType string
Filters for listing blocks in block blobs
const ( BlockListTypeAll BlockListType = "all" BlockListTypeCommitted BlockListType = "committed" BlockListTypeUncommitted BlockListType = "uncommitted" )
BlockResponse contains the block information returned in the GetBlockListCall.
type BlockResponse struct { Name string `xml:"Name"` Size int64 `xml:"Size"` }
BlockStatus defines states a block for a block blob can be in.
type BlockStatus string
List of statuses that can be used to refer to a block in a block list
const ( BlockStatusUncommitted BlockStatus = "Uncommitted" BlockStatusCommitted BlockStatus = "Committed" BlockStatusLatest BlockStatus = "Latest" )
Client is the object that needs to be constructed to perform operations on the storage account.
type Client struct { // HTTPClient is the http.Client used to initiate API // requests. http.DefaultClient is used when creating a // client. HTTPClient *http.Client // Sender is an interface that sends the request. Clients are // created with a DefaultSender. The DefaultSender has an // automatic retry strategy built in. The Sender can be customized. Sender Sender UseSharedKeyLite bool // contains filtered or unexported fields }
func NewAccountSASClient(account string, token url.Values, env azure.Environment) Client
NewAccountSASClient contructs a client that uses accountSAS authorization for its operations.
func NewAccountSASClientFromEndpointToken(endpoint string, sasToken string) (Client, error)
NewAccountSASClientFromEndpointToken constructs a client that uses accountSAS authorization for its operations using the specified endpoint and SAS token.
func NewBasicClient(accountName, accountKey string) (Client, error)
NewBasicClient constructs a Client with given storage service name and key.
func NewBasicClientOnSovereignCloud(accountName, accountKey string, env azure.Environment) (Client, error)
NewBasicClientOnSovereignCloud constructs a Client with given storage service name and key in the referenced cloud.
func NewClient(accountName, accountKey, serviceBaseURL, apiVersion string, useHTTPS bool) (Client, error)
NewClient constructs a Client. This should be used if the caller wants to specify whether to use HTTPS, a specific REST API version or a custom storage endpoint than Azure Public Cloud.
func NewClientFromConnectionString(input string) (Client, error)
NewClientFromConnectionString creates a Client from the connection string.
func NewCosmosClient(accountName, accountKey, serviceBaseURL, apiVersion string, useHTTPS bool) (Client, error)
NewCosmosClient constructs a Client for Azure CosmosDB. This should be used if the caller wants to specify whether to use HTTPS, a specific REST API version or a custom cosmos endpoint than Azure Public Cloud.
func NewEmulatorClient() (Client, error)
NewEmulatorClient contructs a Client intended to only work with Azure Storage Emulator
func (c *Client) AddAdditionalHeaders(headers map[string]string)
AddAdditionalHeaders adds additional standard headers
func (c *Client) AddToUserAgent(extension string) error
AddToUserAgent adds an extension to the current user agent
func (c Client) GetAccountSASToken(options AccountSASTokenOptions) (url.Values, error)
GetAccountSASToken creates an account SAS token See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas
func (c Client) GetBlobService() BlobStorageClient
GetBlobService returns a BlobStorageClient which can operate on the blob service of the storage account.
func (c Client) GetFileService() FileServiceClient
GetFileService returns a FileServiceClient which can operate on the file service of the storage account.
func (c Client) GetQueueService() QueueServiceClient
GetQueueService returns a QueueServiceClient which can operate on the queue service of the storage account.
func (c Client) GetTableService() TableServiceClient
GetTableService returns a TableServiceClient which can operate on the table service of the storage account.
Container represents an Azure container.
type Container struct { Name string `xml:"Name"` Properties ContainerProperties `xml:"Properties"` Metadata map[string]string // contains filtered or unexported fields }
func GetContainerReferenceFromSASURI(sasuri url.URL) (*Container, error)
GetContainerReferenceFromSASURI returns a Container object for the specified container SASURI
func (c *Container) Client() *Client
Client returns the HTTP client used by the Container reference.
func (c *Container) Create(options *CreateContainerOptions) error
Create creates a blob container within the storage account with given name and access level. Returns error if container already exists.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Create-Container
func (c *Container) CreateIfNotExists(options *CreateContainerOptions) (bool, error)
CreateIfNotExists creates a blob container if it does not exist. Returns true if container is newly created or false if container already exists.
func (c *Container) Delete(options *DeleteContainerOptions) error
Delete deletes the container with given name on the storage account. If the container does not exist returns error.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/delete-container
func (c *Container) DeleteIfExists(options *DeleteContainerOptions) (bool, error)
DeleteIfExists deletes the container with given name on the storage account if it exists. Returns true if container is deleted with this call, or false if the container did not exist at the time of the Delete Container operation.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/delete-container
func (c *Container) Exists() (bool, error)
Exists returns true if a container with given name exists on the storage account, otherwise returns false.
func (c *Container) GetBlobReference(name string) *Blob
GetBlobReference returns a Blob object for the specified blob name.
func (c *Container) GetMetadata(options *ContainerMetadataOptions) error
GetMetadata returns all user-defined metadata for the specified container.
All metadata keys will be returned in lower case. (HTTP header names are case-insensitive.)
See https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-metadata
func (c *Container) GetPermissions(options *GetContainerPermissionOptions) (*ContainerPermissions, error)
GetPermissions gets the container permissions as per https://msdn.microsoft.com/en-us/library/azure/dd179469.aspx If timeout is 0 then it will not be passed to Azure leaseID will only be passed to Azure if populated
func (c *Container) GetProperties() error
GetProperties updated the properties of the container.
See https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties
func (c *Container) GetSASURI(options ContainerSASOptions) (string, error)
GetSASURI creates an URL to the container which contains the Shared Access Signature with the specified options.
See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
func (c *Container) GetURL() string
GetURL gets the canonical URL to the container. This method does not create a publicly accessible URL if the container is private and this method does not check if the blob exists.
func (c *Container) ListBlobs(params ListBlobsParameters) (BlobListResponse, error)
ListBlobs returns an object that contains list of blobs in the container, pagination token and other information in the response of List Blobs call.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/List-Blobs
func (c *Container) SetMetadata(options *ContainerMetadataOptions) error
SetMetadata replaces the metadata for the specified container.
Some keys may be converted to Camel-Case before sending. All keys are returned in lower case by GetBlobMetadata. HTTP header names are case-insensitive so case munging should not matter to other applications either.
See https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata
func (c *Container) SetPermissions(permissions ContainerPermissions, options *SetContainerPermissionOptions) error
SetPermissions sets up container permissions See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Set-Container-ACL
ContainerAccessPolicy represents each access policy in the container ACL.
type ContainerAccessPolicy struct { ID string StartTime time.Time ExpiryTime time.Time CanRead bool CanWrite bool CanDelete bool }
ContainerAccessType defines the access level to the container from a public request.
See https://msdn.microsoft.com/en-us/library/azure/dd179468.aspx and "x-ms- blob-public-access" header.
type ContainerAccessType string
Access options for containers
const ( ContainerAccessTypePrivate ContainerAccessType = "" ContainerAccessTypeBlob ContainerAccessType = "blob" ContainerAccessTypeContainer ContainerAccessType = "container" )
ContainerListResponse contains the response fields from ListContainers call.
See https://msdn.microsoft.com/en-us/library/azure/dd179352.aspx
type ContainerListResponse struct { XMLName xml.Name `xml:"EnumerationResults"` Xmlns string `xml:"xmlns,attr"` Prefix string `xml:"Prefix"` Marker string `xml:"Marker"` NextMarker string `xml:"NextMarker"` MaxResults int64 `xml:"MaxResults"` Containers []Container `xml:"Containers>Container"` }
ContainerMetadataOptions includes options for container metadata operations
type ContainerMetadataOptions struct { Timeout uint LeaseID string `header:"x-ms-lease-id"` RequestID string `header:"x-ms-client-request-id"` }
ContainerPermissions represents the container ACLs.
type ContainerPermissions struct { AccessType ContainerAccessType AccessPolicies []ContainerAccessPolicy }
ContainerProperties contains various properties of a container returned from various endpoints like ListContainers.
type ContainerProperties struct { LastModified string `xml:"Last-Modified"` Etag string `xml:"Etag"` LeaseStatus string `xml:"LeaseStatus"` LeaseState string `xml:"LeaseState"` LeaseDuration string `xml:"LeaseDuration"` PublicAccess ContainerAccessType `xml:"PublicAccess"` }
ContainerSASOptions are options to construct a container SAS URI. See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
type ContainerSASOptions struct { ContainerSASPermissions OverrideHeaders SASOptions }
ContainerSASPermissions includes the available permissions for a container SAS URI.
type ContainerSASPermissions struct { BlobServiceSASPermissions List bool }
CopyOptions includes the options for a copy blob operation
type CopyOptions struct { Timeout uint Source CopyOptionsConditions Destiny CopyOptionsConditions RequestID string }
CopyOptionsConditions includes some conditional options in a copy blob operation
type CopyOptionsConditions struct { LeaseID string IfModifiedSince *time.Time IfUnmodifiedSince *time.Time IfMatch string IfNoneMatch string }
Cors includes all the CORS rules
type Cors struct { CorsRule []CorsRule }
CorsRule includes all settings for a Cors rule
type CorsRule struct { AllowedOrigins string AllowedMethods string MaxAgeInSeconds int ExposedHeaders string AllowedHeaders string }
CreateContainerOptions includes the options for a create container operation
type CreateContainerOptions struct { Timeout uint Access ContainerAccessType `header:"x-ms-blob-public-access"` RequestID string `header:"x-ms-client-request-id"` }
DefaultSender is the default sender for the client. It implements an automatic retry strategy.
type DefaultSender struct { RetryAttempts int RetryDuration time.Duration ValidStatusCodes []int // contains filtered or unexported fields }
func (ds *DefaultSender) Send(c *Client, req *http.Request) (resp *http.Response, err error)
Send is the default retry strategy in the client
DeleteBlobOptions includes the options for a delete blob operation
type DeleteBlobOptions struct { Timeout uint Snapshot *time.Time LeaseID string `header:"x-ms-lease-id"` DeleteSnapshots *bool IfModifiedSince *time.Time `header:"If-Modified-Since"` IfUnmodifiedSince *time.Time `header:"If-Unmodified-Since"` IfMatch string `header:"If-Match"` IfNoneMatch string `header:"If-None-Match"` RequestID string `header:"x-ms-client-request-id"` }
DeleteContainerOptions includes options for a delete container operation
type DeleteContainerOptions struct { Timeout uint LeaseID string `header:"x-ms-lease-id"` IfModifiedSince *time.Time `header:"If-Modified-Since"` IfUnmodifiedSince *time.Time `header:"If-Unmodified-Since"` RequestID string `header:"x-ms-client-request-id"` }
Directory represents a directory on a share.
type Directory struct { Metadata map[string]string Name string `xml:"Name"` Properties DirectoryProperties // contains filtered or unexported fields }
func (d *Directory) Create(options *FileRequestOptions) error
Create this directory in the associated share. If a directory with the same name already exists, the operation fails.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Create-Directory
func (d *Directory) CreateIfNotExists(options *FileRequestOptions) (bool, error)
CreateIfNotExists creates this directory under the associated share if the directory does not exist. Returns true if the directory is newly created or false if the directory already exists.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Create-Directory
func (d *Directory) Delete(options *FileRequestOptions) error
Delete removes this directory. It must be empty in order to be deleted. If the directory does not exist the operation fails.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Delete-Directory
func (d *Directory) DeleteIfExists(options *FileRequestOptions) (bool, error)
DeleteIfExists removes this directory if it exists.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Delete-Directory
func (d *Directory) Exists() (bool, error)
Exists returns true if this directory exists.
func (d *Directory) FetchAttributes(options *FileRequestOptions) error
FetchAttributes retrieves metadata for this directory.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/get-directory-properties
func (d *Directory) GetDirectoryReference(name string) *Directory
GetDirectoryReference returns a child Directory object for this directory.
func (d *Directory) GetFileReference(name string) *File
GetFileReference returns a child File object for this directory.
func (d *Directory) ListDirsAndFiles(params ListDirsAndFilesParameters) (*DirsAndFilesListResponse, error)
ListDirsAndFiles returns a list of files and directories under this directory. It also contains a pagination token and other response details.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/List-Directories-and-Files
func (d *Directory) SetMetadata(options *FileRequestOptions) error
SetMetadata replaces the metadata for this directory.
Some keys may be converted to Camel-Case before sending. All keys are returned in lower case by GetDirectoryMetadata. HTTP header names are case-insensitive so case munging should not matter to other applications either.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Set-Directory-Metadata
func (d *Directory) URL() string
URL gets the canonical URL to this directory. This method does not create a publicly accessible URL if the directory is private and this method does not check if the directory exists.
DirectoryProperties contains various properties of a directory.
type DirectoryProperties struct { LastModified string `xml:"Last-Modified"` Etag string `xml:"Etag"` }
DirsAndFilesListResponse contains the response fields from a List Files and Directories call.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/List-Directories-and-Files
type DirsAndFilesListResponse struct { XMLName xml.Name `xml:"EnumerationResults"` Xmlns string `xml:"xmlns,attr"` Marker string `xml:"Marker"` MaxResults int64 `xml:"MaxResults"` Directories []Directory `xml:"Entries>Directory"` Files []File `xml:"Entries>File"` NextMarker string `xml:"NextMarker"` }
Entity represents an entity inside an Azure table.
type Entity struct { Table *Table PartitionKey string RowKey string TimeStamp time.Time OdataMetadata string OdataType string OdataID string OdataEtag string OdataEditLink string Properties map[string]interface{} }
func (e *Entity) Delete(force bool, options *EntityOptions) error
Delete deletes the entity. The function fails if there is no entity with the same PartitionKey and RowKey in the table or if the ETag is different than the one in Azure. See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/delete-entity1
func (e *Entity) Get(timeout uint, ml MetadataLevel, options *GetEntityOptions) error
Get gets the referenced entity. Which properties to get can be specified using the select option. See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/query-entities https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/querying-tables-and-entities
func (e *Entity) Insert(ml MetadataLevel, options *EntityOptions) error
Insert inserts the referenced entity in its table. The function fails if there is an entity with the same PartitionKey and RowKey in the table. ml determines the level of detail of metadata in the operation response, or no data at all. See: https://docs.microsoft.com/rest/api/storageservices/fileservices/insert-entity
func (e *Entity) InsertOrMerge(options *EntityOptions) error
InsertOrMerge inserts an entity or merges the existing one. Read more: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/insert-or-merge-entity
func (e *Entity) InsertOrReplace(options *EntityOptions) error
InsertOrReplace inserts an entity or replaces the existing one. Read more: https://docs.microsoft.com/rest/api/storageservices/fileservices/insert-or-replace-entity
func (e *Entity) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller for entity
func (e *Entity) Merge(force bool, options *EntityOptions) error
Merge merges the contents of entity specified with PartitionKey and RowKey with the content specified in Properties. The function fails if there is no entity with the same PartitionKey and RowKey in the table or if the ETag is different than the one in Azure. Read more: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/merge-entity
func (e *Entity) UnmarshalJSON(data []byte) error
UnmarshalJSON is a custom unmarshaller for entities
func (e *Entity) Update(force bool, options *EntityOptions) error
Update updates the contents of an entity. The function fails if there is no entity with the same PartitionKey and RowKey in the table or if the ETag is different than the one in Azure. See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/update-entity2
EntityOptions includes options for entity operations.
type EntityOptions struct { Timeout uint RequestID string `header:"x-ms-client-request-id"` }
EntityQueryResult contains the response from ExecuteQuery and ExecuteQueryNextResults functions.
type EntityQueryResult struct { OdataMetadata string `json:"odata.metadata"` Entities []*Entity `json:"value"` QueryNextLink // contains filtered or unexported fields }
func (eqr *EntityQueryResult) NextResults(options *TableOptions) (*EntityQueryResult, error)
NextResults returns the next page of results from a QueryEntities or NextResults operation.
See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/query-entities See https://docs.microsoft.com/rest/api/storageservices/fileservices/query-timeout-and-pagination
File represents a file on a share.
type File struct { Metadata map[string]string Name string `xml:"Name"` Properties FileProperties `xml:"Properties"` FileCopyProperties FileCopyState // contains filtered or unexported fields }
func (f *File) ClearRange(fileRange FileRange, options *FileRequestOptions) error
ClearRange releases the specified range of space in a file.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Put-Range
func (f *File) CopyFile(sourceURL string, options *FileRequestOptions) error
CopyFile operation copied a file/blob from the sourceURL to the path provided.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/copy-file
func (f *File) Create(maxSize uint64, options *FileRequestOptions) error
Create creates a new file or replaces an existing one.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Create-File
func (f *File) Delete(options *FileRequestOptions) error
Delete immediately removes this file from the storage account.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Delete-File2
func (f *File) DeleteIfExists(options *FileRequestOptions) (bool, error)
DeleteIfExists removes this file if it exists.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Delete-File2
func (f *File) DownloadRangeToStream(fileRange FileRange, options *GetFileOptions) (fs FileStream, err error)
DownloadRangeToStream operation downloads the specified range of this file with optional MD5 hash.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/get-file
func (f *File) DownloadToStream(options *FileRequestOptions) (io.ReadCloser, error)
DownloadToStream operation downloads the file.
See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/get-file
func (f *File) Exists() (bool, error)
Exists returns true if this file exists.
func (f *File) FetchAttributes(options *FileRequestOptions) error
FetchAttributes updates metadata and properties for this file. See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/get-file-properties
func (f *File) ListRanges(options *ListRangesOptions) (*FileRanges, error)
ListRanges returns the list of valid ranges for this file.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/List-Ranges
func (f *File) SetMetadata(options *FileRequestOptions) error
SetMetadata replaces the metadata for this file.
Some keys may be converted to Camel-Case before sending. All keys are returned in lower case by GetFileMetadata. HTTP header names are case-insensitive so case munging should not matter to other applications either.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Set-File-Metadata
func (f *File) SetProperties(options *FileRequestOptions) error
SetProperties sets system properties on this file.
Some keys may be converted to Camel-Case before sending. All keys are returned in lower case by SetFileProperties. HTTP header names are case-insensitive so case munging should not matter to other applications either.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Set-File-Properties
func (f *File) URL() string
URL gets the canonical URL to this file. This method does not create a publicly accessible URL if the file is private and this method does not check if the file exists.
func (f *File) WriteRange(bytes io.Reader, fileRange FileRange, options *WriteRangeOptions) error
WriteRange writes a range of bytes to this file with an optional MD5 hash of the content (inside options parameter). Note that the length of bytes must match (rangeEnd - rangeStart) + 1 with a maximum size of 4MB.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Put-Range
FileCopyState contains various properties of a file copy operation.
type FileCopyState struct { CompletionTime string ID string `header:"x-ms-copy-id"` Progress string Source string Status string `header:"x-ms-copy-status"` StatusDesc string }
FileProperties contains various properties of a file.
type FileProperties struct { CacheControl string `header:"x-ms-cache-control"` Disposition string `header:"x-ms-content-disposition"` Encoding string `header:"x-ms-content-encoding"` Etag string Language string `header:"x-ms-content-language"` LastModified string Length uint64 `xml:"Content-Length" header:"x-ms-content-length"` MD5 string `header:"x-ms-content-md5"` Type string `header:"x-ms-content-type"` }
FileRange contains range information for a file.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/List-Ranges
type FileRange struct { Start uint64 `xml:"Start"` End uint64 `xml:"End"` }
func (fr FileRange) String() string
FileRanges contains a list of file range information for a file.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/List-Ranges
type FileRanges struct { ContentLength uint64 LastModified string ETag string FileRanges []FileRange `xml:"Range"` }
FileRequestOptions will be passed to misc file operations. Currently just Timeout (in seconds) but could expand.
type FileRequestOptions struct { Timeout uint // timeout duration in seconds. }
FileServiceClient contains operations for Microsoft Azure File Service.
type FileServiceClient struct {
// contains filtered or unexported fields
}
func (f *FileServiceClient) GetServiceProperties() (*ServiceProperties, error)
GetServiceProperties gets the properties of your storage account's file service. File service does not support logging See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/get-file-service-properties
func (f *FileServiceClient) GetShareReference(name string) *Share
GetShareReference returns a Share object for the specified share name.
func (f FileServiceClient) ListShares(params ListSharesParameters) (*ShareListResponse, error)
ListShares returns the list of shares in a storage account along with pagination token and other response details.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/list-shares
func (f *FileServiceClient) SetServiceProperties(props ServiceProperties) error
SetServiceProperties sets the properties of your storage account's file service. File service does not support logging See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/set-file-service-properties
FileStream contains file data returned from a call to GetFile.
type FileStream struct { Body io.ReadCloser ContentMD5 string }
GetBlobMetadataOptions includes the options for a get blob metadata operation
type GetBlobMetadataOptions struct { Timeout uint Snapshot *time.Time LeaseID string `header:"x-ms-lease-id"` IfModifiedSince *time.Time `header:"If-Modified-Since"` IfUnmodifiedSince *time.Time `header:"If-Unmodified-Since"` IfMatch string `header:"If-Match"` IfNoneMatch string `header:"If-None-Match"` RequestID string `header:"x-ms-client-request-id"` }
GetBlobOptions includes the options for a get blob operation
type GetBlobOptions struct { Timeout uint Snapshot *time.Time LeaseID string `header:"x-ms-lease-id"` Origin string `header:"Origin"` IfModifiedSince *time.Time `header:"If-Modified-Since"` IfUnmodifiedSince *time.Time `header:"If-Unmodified-Since"` IfMatch string `header:"If-Match"` IfNoneMatch string `header:"If-None-Match"` RequestID string `header:"x-ms-client-request-id"` }
GetBlobPropertiesOptions includes the options for a get blob properties operation
type GetBlobPropertiesOptions struct { Timeout uint Snapshot *time.Time LeaseID string `header:"x-ms-lease-id"` IfModifiedSince *time.Time `header:"If-Modified-Since"` IfUnmodifiedSince *time.Time `header:"If-Unmodified-Since"` IfMatch string `header:"If-Match"` IfNoneMatch string `header:"If-None-Match"` RequestID string `header:"x-ms-client-request-id"` }
GetBlobRangeOptions includes the options for a get blob range operation
type GetBlobRangeOptions struct { Range *BlobRange GetRangeContentMD5 bool *GetBlobOptions }
GetBlockListOptions includes the options for a get block list operation
type GetBlockListOptions struct { Timeout uint Snapshot *time.Time LeaseID string `header:"x-ms-lease-id"` RequestID string `header:"x-ms-client-request-id"` }
GetContainerPermissionOptions includes options for a get container permissions operation
type GetContainerPermissionOptions struct { Timeout uint LeaseID string `header:"x-ms-lease-id"` RequestID string `header:"x-ms-client-request-id"` }
GetEntityOptions includes options for a get entity operation
type GetEntityOptions struct { Select []string RequestID string `header:"x-ms-client-request-id"` }
GetFileOptions includes options for a get file operation
type GetFileOptions struct { Timeout uint GetContentMD5 bool }
GetMessagesOptions is the set of options can be specified for Get Messsages operation. A zero struct does not use any preferences for the request.
type GetMessagesOptions struct { Timeout uint NumOfMessages int VisibilityTimeout int RequestID string `header:"x-ms-client-request-id"` }
GetPageRangesOptions includes the options for a get page ranges operation
type GetPageRangesOptions struct { Timeout uint Snapshot *time.Time PreviousSnapshot *time.Time Range *BlobRange LeaseID string `header:"x-ms-lease-id"` RequestID string `header:"x-ms-client-request-id"` }
GetPageRangesResponse contains the response fields from Get Page Ranges call.
See https://msdn.microsoft.com/en-us/library/azure/ee691973.aspx
type GetPageRangesResponse struct { XMLName xml.Name `xml:"PageList"` PageList []PageRange `xml:"PageRange"` }
GetQueuePermissionOptions includes options for a get queue permissions operation
type GetQueuePermissionOptions struct { Timeout uint RequestID string `header:"x-ms-client-request-id"` }
IncludeBlobDataset has options to include in a list blobs operation
type IncludeBlobDataset struct { Snapshots bool Metadata bool UncommittedBlobs bool Copy bool }
IncrementalCopyOptions includes the options for an incremental copy blob operation
type IncrementalCopyOptions struct { Timeout uint Destination IncrementalCopyOptionsConditions RequestID string }
IncrementalCopyOptionsConditions includes some conditional options in a copy blob operation
type IncrementalCopyOptionsConditions struct { IfModifiedSince *time.Time IfUnmodifiedSince *time.Time IfMatch string IfNoneMatch string }
LeaseOptions includes options for all operations regarding leasing blobs
type LeaseOptions struct { Timeout uint Origin string `header:"Origin"` IfMatch string `header:"If-Match"` IfNoneMatch string `header:"If-None-Match"` IfModifiedSince *time.Time `header:"If-Modified-Since"` IfUnmodifiedSince *time.Time `header:"If-Unmodified-Since"` RequestID string `header:"x-ms-client-request-id"` }
ListBlobsParameters defines the set of customizable parameters to make a List Blobs call.
See https://msdn.microsoft.com/en-us/library/azure/dd135734.aspx
type ListBlobsParameters struct { Prefix string Delimiter string Marker string Include *IncludeBlobDataset MaxResults uint Timeout uint RequestID string }
ListContainersParameters defines the set of customizable parameters to make a List Containers call.
See https://msdn.microsoft.com/en-us/library/azure/dd179352.aspx
type ListContainersParameters struct { Prefix string Marker string Include string MaxResults uint Timeout uint }
ListDirsAndFilesParameters defines the set of customizable parameters to make a List Files and Directories call.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/List-Directories-and-Files
type ListDirsAndFilesParameters struct { Prefix string Marker string MaxResults uint Timeout uint }
ListRangesOptions includes options for a list file ranges operation
type ListRangesOptions struct { Timeout uint ListRange *FileRange }
ListSharesParameters defines the set of customizable parameters to make a List Shares call.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/List-Shares
type ListSharesParameters struct { Prefix string Marker string Include string MaxResults uint Timeout uint }
Logging represents the Azure Analytics Logging settings
type Logging struct { Version string Delete bool Read bool Write bool RetentionPolicy *RetentionPolicy }
Message represents an Azure message.
type Message struct { Queue *Queue Text string `xml:"MessageText"` ID string `xml:"MessageId"` Insertion TimeRFC1123 `xml:"InsertionTime"` Expiration TimeRFC1123 `xml:"ExpirationTime"` PopReceipt string `xml:"PopReceipt"` NextVisible TimeRFC1123 `xml:"TimeNextVisible"` DequeueCount int `xml:"DequeueCount"` }
func (m *Message) Delete(options *QueueServiceOptions) error
Delete operation deletes the specified message.
See https://msdn.microsoft.com/en-us/library/azure/dd179347.aspx
func (m *Message) Put(options *PutMessageOptions) error
Put operation adds a new message to the back of the message queue.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Put-Message
func (m *Message) Update(options *UpdateMessageOptions) error
Update operation updates the specified message.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Update-Message
MetadataLevel determines if operations should return a paylod, and it level of detail.
type MetadataLevel string
Metrics provide request statistics.
type Metrics struct { Version string Enabled bool IncludeAPIs *bool RetentionPolicy *RetentionPolicy }
Operation type. Insert, Delete, Replace etc.
type Operation int
OverrideHeaders defines overridable response heaedrs in a request using a SAS URI. See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
type OverrideHeaders struct { CacheControl string ContentDisposition string ContentEncoding string ContentLanguage string ContentType string }
PageRange contains information about a page of a page blob from Get Pages Range call.
See https://msdn.microsoft.com/en-us/library/azure/ee691973.aspx
type PageRange struct { Start int64 `xml:"Start"` End int64 `xml:"End"` }
PeekMessagesOptions is the set of options can be specified for Peek Messsage operation. A zero struct does not use any preferences for the request.
type PeekMessagesOptions struct { Timeout uint NumOfMessages int RequestID string `header:"x-ms-client-request-id"` }
Permissions specifies permissions for an accountSAS.
type Permissions struct { Read bool Write bool Delete bool List bool Add bool Create bool Update bool Process bool }
PutBlobOptions includes the options any put blob operation (page, block, append)
type PutBlobOptions struct { Timeout uint LeaseID string `header:"x-ms-lease-id"` Origin string `header:"Origin"` IfModifiedSince *time.Time `header:"If-Modified-Since"` IfUnmodifiedSince *time.Time `header:"If-Unmodified-Since"` IfMatch string `header:"If-Match"` IfNoneMatch string `header:"If-None-Match"` RequestID string `header:"x-ms-client-request-id"` }
PutBlockFromURLOptions includes the options for a put block from URL operation
type PutBlockFromURLOptions struct { PutBlockOptions SourceContentMD5 string `header:"x-ms-source-content-md5"` SourceContentCRC64 string `header:"x-ms-source-content-crc64"` }
PutBlockListOptions includes the options for a put block list operation
type PutBlockListOptions struct { Timeout uint LeaseID string `header:"x-ms-lease-id"` IfModifiedSince *time.Time `header:"If-Modified-Since"` IfUnmodifiedSince *time.Time `header:"If-Unmodified-Since"` IfMatch string `header:"If-Match"` IfNoneMatch string `header:"If-None-Match"` RequestID string `header:"x-ms-client-request-id"` }
PutBlockOptions includes the options for a put block operation
type PutBlockOptions struct { Timeout uint LeaseID string `header:"x-ms-lease-id"` ContentMD5 string `header:"Content-MD5"` RequestID string `header:"x-ms-client-request-id"` }
PutMessageOptions is the set of options can be specified for Put Messsage operation. A zero struct does not use any preferences for the request.
type PutMessageOptions struct { Timeout uint VisibilityTimeout int MessageTTL int RequestID string `header:"x-ms-client-request-id"` }
PutPageOptions includes the options for a put page operation
type PutPageOptions struct { Timeout uint LeaseID string `header:"x-ms-lease-id"` IfSequenceNumberLessThanOrEqualTo *int `header:"x-ms-if-sequence-number-le"` IfSequenceNumberLessThan *int `header:"x-ms-if-sequence-number-lt"` IfSequenceNumberEqualTo *int `header:"x-ms-if-sequence-number-eq"` IfModifiedSince *time.Time `header:"If-Modified-Since"` IfUnmodifiedSince *time.Time `header:"If-Unmodified-Since"` IfMatch string `header:"If-Match"` IfNoneMatch string `header:"If-None-Match"` RequestID string `header:"x-ms-client-request-id"` }
QueryNextLink includes information for getting the next page of results in query operations
type QueryNextLink struct { NextLink *string // contains filtered or unexported fields }
QueryOptions includes options for a query entities operation. Top, filter and select are OData query options.
type QueryOptions struct { Top uint Filter string Select []string RequestID string }
QueryTablesOptions includes options for some table operations
type QueryTablesOptions struct { Top uint Filter string RequestID string }
Queue represents an Azure queue.
type Queue struct { Name string Metadata map[string]string AproxMessageCount uint64 // contains filtered or unexported fields }
func (q *Queue) ClearMessages(options *QueueServiceOptions) error
ClearMessages operation deletes all messages from the specified queue.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Clear-Messages
func (q *Queue) Create(options *QueueServiceOptions) error
Create operation creates a queue under the given account.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Create-Queue4
func (q *Queue) Delete(options *QueueServiceOptions) error
Delete operation permanently deletes the specified queue.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Delete-Queue3
func (q *Queue) Exists() (bool, error)
Exists returns true if a queue with given name exists.
func (q *Queue) GetMessageReference(text string) *Message
GetMessageReference returns a message object with the specified text.
func (q *Queue) GetMessages(options *GetMessagesOptions) ([]Message, error)
GetMessages operation retrieves one or more messages from the front of the queue.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Get-Messages
func (q *Queue) GetMetadata(options *QueueServiceOptions) error
GetMetadata operation retrieves user-defined metadata and queue properties on the specified queue. Metadata is associated with the queue as name-values pairs.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Set-Queue-Metadata
Because the way Golang's http client (and http.Header in particular) canonicalize header names, the returned metadata names would always be all lower case.
func (q *Queue) GetPermissions(options *GetQueuePermissionOptions) (*QueuePermissions, error)
GetPermissions gets the queue permissions as per https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/get-queue-acl If timeout is 0 then it will not be passed to Azure
func (q *Queue) GetSASURI(options QueueSASOptions) (string, error)
GetSASURI creates an URL to the specified queue which contains the Shared Access Signature with specified permissions and expiration time.
See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
func (q *Queue) PeekMessages(options *PeekMessagesOptions) ([]Message, error)
PeekMessages retrieves one or more messages from the front of the queue, but does not alter the visibility of the message.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Peek-Messages
func (q *Queue) SetMetadata(options *QueueServiceOptions) error
SetMetadata operation sets user-defined metadata on the specified queue. Metadata is associated with the queue as name-value pairs.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Set-Queue-Metadata
func (q *Queue) SetPermissions(permissions QueuePermissions, options *SetQueuePermissionOptions) error
SetPermissions sets up queue permissions See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/set-queue-acl
QueueAccessPolicy represents each access policy in the queue ACL.
type QueueAccessPolicy struct { ID string StartTime time.Time ExpiryTime time.Time CanRead bool CanAdd bool CanUpdate bool CanProcess bool }
QueuePermissions represents the queue ACLs.
type QueuePermissions struct { AccessPolicies []QueueAccessPolicy }
QueueSASOptions are options to construct a blob SAS URI. See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
type QueueSASOptions struct { QueueSASPermissions SASOptions }
QueueSASPermissions includes the available permissions for a queue SAS URI.
type QueueSASPermissions struct { Read bool Add bool Update bool Process bool }
QueueServiceClient contains operations for Microsoft Azure Queue Storage Service.
type QueueServiceClient struct {
// contains filtered or unexported fields
}
func (q *QueueServiceClient) GetQueueReference(name string) *Queue
GetQueueReference returns a Container object for the specified queue name.
func (q *QueueServiceClient) GetServiceProperties() (*ServiceProperties, error)
GetServiceProperties gets the properties of your storage account's queue service. See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/get-queue-service-properties
func (q *QueueServiceClient) SetServiceProperties(props ServiceProperties) error
SetServiceProperties sets the properties of your storage account's queue service. See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/set-queue-service-properties
QueueServiceOptions includes options for some queue service operations
type QueueServiceOptions struct { Timeout uint RequestID string `header:"x-ms-client-request-id"` }
ResourceTypes specify the resources accesible with an account SAS.
type ResourceTypes struct { Service bool Container bool Object bool }
RetentionPolicy indicates if retention is enabled and for how many days
type RetentionPolicy struct { Enabled bool Days *int }
SASOptions includes options used by SAS URIs for different services and resources.
type SASOptions struct { APIVersion string Start time.Time Expiry time.Time IP string UseHTTPS bool Identifier string }
Sender sends a request
type Sender interface { Send(*Client, *http.Request) (*http.Response, error) }
SequenceNumberAction defines how the blob's sequence number should be modified
type SequenceNumberAction string
Options for sequence number action
const ( SequenceNumberActionMax SequenceNumberAction = "max" SequenceNumberActionUpdate SequenceNumberAction = "update" SequenceNumberActionIncrement SequenceNumberAction = "increment" )
ServiceProperties represents the storage account service properties
type ServiceProperties struct { Logging *Logging HourMetrics *Metrics MinuteMetrics *Metrics Cors *Cors DeleteRetentionPolicy *RetentionPolicy // blob storage only StaticWebsite *StaticWebsite // blob storage only }
Services specify services accessible with an account SAS.
type Services struct { Blob bool Queue bool Table bool File bool }
SetBlobMetadataOptions includes the options for a set blob metadata operation
type SetBlobMetadataOptions struct { Timeout uint LeaseID string `header:"x-ms-lease-id"` IfModifiedSince *time.Time `header:"If-Modified-Since"` IfUnmodifiedSince *time.Time `header:"If-Unmodified-Since"` IfMatch string `header:"If-Match"` IfNoneMatch string `header:"If-None-Match"` RequestID string `header:"x-ms-client-request-id"` }
SetBlobPropertiesOptions contains various properties of a blob and is an entry in SetProperties
type SetBlobPropertiesOptions struct { Timeout uint LeaseID string `header:"x-ms-lease-id"` Origin string `header:"Origin"` IfModifiedSince *time.Time `header:"If-Modified-Since"` IfUnmodifiedSince *time.Time `header:"If-Unmodified-Since"` IfMatch string `header:"If-Match"` IfNoneMatch string `header:"If-None-Match"` SequenceNumberAction *SequenceNumberAction RequestID string `header:"x-ms-client-request-id"` }
SetContainerPermissionOptions includes options for a set container permissions operation
type SetContainerPermissionOptions struct { Timeout uint LeaseID string `header:"x-ms-lease-id"` IfModifiedSince *time.Time `header:"If-Modified-Since"` IfUnmodifiedSince *time.Time `header:"If-Unmodified-Since"` RequestID string `header:"x-ms-client-request-id"` }
SetQueuePermissionOptions includes options for a set queue permissions operation
type SetQueuePermissionOptions struct { Timeout uint RequestID string `header:"x-ms-client-request-id"` }
Share represents an Azure file share.
type Share struct { Name string `xml:"Name"` Properties ShareProperties `xml:"Properties"` Metadata map[string]string // contains filtered or unexported fields }
func (s *Share) Create(options *FileRequestOptions) error
Create this share under the associated account. If a share with the same name already exists, the operation fails.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Create-Share
func (s *Share) CreateIfNotExists(options *FileRequestOptions) (bool, error)
CreateIfNotExists creates this share under the associated account if it does not exist. Returns true if the share is newly created or false if the share already exists.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Create-Share
func (s *Share) Delete(options *FileRequestOptions) error
Delete marks this share for deletion. The share along with any files and directories contained within it are later deleted during garbage collection. If the share does not exist the operation fails
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Delete-Share
func (s *Share) DeleteIfExists(options *FileRequestOptions) (bool, error)
DeleteIfExists operation marks this share for deletion if it exists.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Delete-Share
func (s *Share) Exists() (bool, error)
Exists returns true if this share already exists on the storage account, otherwise returns false.
func (s *Share) FetchAttributes(options *FileRequestOptions) error
FetchAttributes retrieves metadata and properties for this share. See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/get-share-properties
func (s *Share) GetRootDirectoryReference() *Directory
GetRootDirectoryReference returns a Directory object at the root of this share.
func (s *Share) ServiceClient() *FileServiceClient
ServiceClient returns the FileServiceClient associated with this share.
func (s *Share) SetMetadata(options *FileRequestOptions) error
SetMetadata replaces the metadata for this share.
Some keys may be converted to Camel-Case before sending. All keys are returned in lower case by GetShareMetadata. HTTP header names are case-insensitive so case munging should not matter to other applications either.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/set-share-metadata
func (s *Share) SetProperties(options *FileRequestOptions) error
SetProperties sets system properties for this share.
Some keys may be converted to Camel-Case before sending. All keys are returned in lower case by SetShareProperties. HTTP header names are case-insensitive so case munging should not matter to other applications either.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Set-Share-Properties
func (s *Share) URL() string
URL gets the canonical URL to this share. This method does not create a publicly accessible URL if the share is private and this method does not check if the share exists.
ShareListResponse contains the response fields from ListShares call.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/List-Shares
type ShareListResponse struct { XMLName xml.Name `xml:"EnumerationResults"` Xmlns string `xml:"xmlns,attr"` Prefix string `xml:"Prefix"` Marker string `xml:"Marker"` NextMarker string `xml:"NextMarker"` MaxResults int64 `xml:"MaxResults"` Shares []Share `xml:"Shares>Share"` }
ShareProperties contains various properties of a share.
type ShareProperties struct { LastModified string `xml:"Last-Modified"` Etag string `xml:"Etag"` Quota int `xml:"Quota"` }
SignedIdentifier is a wrapper for a specific policy
type SignedIdentifier struct { ID string `xml:"Id"` AccessPolicy AccessPolicyDetailsXML `xml:"AccessPolicy"` }
SignedIdentifiers part of the response from GetPermissions call.
type SignedIdentifiers struct { SignedIdentifiers []SignedIdentifier `xml:"SignedIdentifier"` }
SnapshotOptions includes the options for a snapshot blob operation
type SnapshotOptions struct { Timeout uint LeaseID string `header:"x-ms-lease-id"` IfModifiedSince *time.Time `header:"If-Modified-Since"` IfUnmodifiedSince *time.Time `header:"If-Unmodified-Since"` IfMatch string `header:"If-Match"` IfNoneMatch string `header:"If-None-Match"` RequestID string `header:"x-ms-client-request-id"` }
StaticWebsite - The properties that enable an account to host a static website
type StaticWebsite struct { // Enabled - Indicates whether this account is hosting a static website Enabled bool // IndexDocument - The default name of the index page under each directory IndexDocument *string // ErrorDocument404Path - The absolute path of the custom 404 page ErrorDocument404Path *string }
Table represents an Azure table.
type Table struct { Name string `json:"TableName"` OdataEditLink string `json:"odata.editLink"` OdataID string `json:"odata.id"` OdataMetadata string `json:"odata.metadata"` OdataType string `json:"odata.type"` // contains filtered or unexported fields }
func (t *Table) Create(timeout uint, ml MetadataLevel, options *TableOptions) error
Create creates the referenced table. This function fails if the name is not compliant with the specification or the tables already exists. ml determines the level of detail of metadata in the operation response, or no data at all. See https://docs.microsoft.com/rest/api/storageservices/fileservices/create-table
func (t *Table) Delete(timeout uint, options *TableOptions) error
Delete deletes the referenced table. This function fails if the table is not present. Be advised: Delete deletes all the entries that may be present. See https://docs.microsoft.com/rest/api/storageservices/fileservices/delete-table
func (t *Table) Get(timeout uint, ml MetadataLevel) error
Get gets the referenced table. See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/querying-tables-and-entities
func (t *Table) GetEntityReference(partitionKey, rowKey string) *Entity
GetEntityReference returns an Entity object with the specified partition key and row key.
func (t *Table) GetPermissions(timeout int, options *TableOptions) ([]TableAccessPolicy, error)
GetPermissions gets the table ACL permissions See https://docs.microsoft.com/rest/api/storageservices/fileservices/get-table-acl
func (t *Table) NewBatch() *TableBatch
NewBatch return new TableBatch for populating.
func (t *Table) QueryEntities(timeout uint, ml MetadataLevel, options *QueryOptions) (*EntityQueryResult, error)
QueryEntities returns the entities in the table. You can use query options defined by the OData Protocol specification.
See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/query-entities
func (t *Table) SetPermissions(tap []TableAccessPolicy, timeout uint, options *TableOptions) error
SetPermissions sets up table ACL permissions See https://docs.microsoft.com/rest/api/storageservices/fileservices/Set-Table-ACL
TableAccessPolicy are used for SETTING table policies
type TableAccessPolicy struct { ID string StartTime time.Time ExpiryTime time.Time CanRead bool CanAppend bool CanUpdate bool CanDelete bool }
TableBatch stores all the entities that will be operated on during a batch process. Entities can be inserted, replaced or deleted.
type TableBatch struct { BatchEntitySlice []BatchEntity // reference to table we're operating on. Table *Table }
func (t *TableBatch) DeleteEntity(entity *Entity, force bool)
DeleteEntity adds an entity in preparation for a batch delete
func (t *TableBatch) DeleteEntityByForce(entity *Entity, force bool)
DeleteEntityByForce adds an entity in preparation for a batch delete. Forces regardless of ETag
func (t *TableBatch) ExecuteBatch() error
ExecuteBatch executes many table operations in one request to Azure. The operations can be combinations of Insert, Delete, Replace and Merge Creates the inner changeset body (various operations, Insert, Delete etc) then creates the outer request packet that encompasses the changesets. As per document https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/performing-entity-group-transactions
func (t *TableBatch) InsertEntity(entity *Entity)
InsertEntity adds an entity in preparation for a batch insert.
func (t *TableBatch) InsertOrMergeEntity(entity *Entity, force bool)
InsertOrMergeEntity adds an entity in preparation for a batch insert or merge.
func (t *TableBatch) InsertOrMergeEntityByForce(entity *Entity)
InsertOrMergeEntityByForce adds an entity in preparation for a batch insert or merge. Forces regardless of ETag
func (t *TableBatch) InsertOrReplaceEntity(entity *Entity, force bool)
InsertOrReplaceEntity adds an entity in preparation for a batch insert or replace.
func (t *TableBatch) InsertOrReplaceEntityByForce(entity *Entity)
InsertOrReplaceEntityByForce adds an entity in preparation for a batch insert or replace. Forces regardless of ETag
func (t *TableBatch) MergeEntity(entity *Entity)
MergeEntity adds an entity in preparation for a batch merge
func (t *TableBatch) ReplaceEntity(entity *Entity)
ReplaceEntity adds an entity in preparation for a batch replace.
TableOptions includes options for some table operations
type TableOptions struct { RequestID string }
TableQueryResult contains the response from QueryTables and QueryTablesNextResults functions.
type TableQueryResult struct { OdataMetadata string `json:"odata.metadata"` Tables []Table `json:"value"` QueryNextLink // contains filtered or unexported fields }
func (tqr *TableQueryResult) NextResults(options *TableOptions) (*TableQueryResult, error)
NextResults returns the next page of results from a QueryTables or a NextResults operation.
See https://docs.microsoft.com/rest/api/storageservices/fileservices/query-tables See https://docs.microsoft.com/rest/api/storageservices/fileservices/query-timeout-and-pagination
TableServiceClient contains operations for Microsoft Azure Table Storage Service.
type TableServiceClient struct {
// contains filtered or unexported fields
}
func (t *TableServiceClient) GetServiceProperties() (*ServiceProperties, error)
GetServiceProperties gets the properties of your storage account's table service. See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/get-table-service-properties
func (t *TableServiceClient) GetTableReference(name string) *Table
GetTableReference returns a Table object for the specified table name.
func (t *TableServiceClient) QueryTables(ml MetadataLevel, options *QueryTablesOptions) (*TableQueryResult, error)
QueryTables returns the tables in the storage account. You can use query options defined by the OData Protocol specification.
See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/query-tables
func (t *TableServiceClient) SetServiceProperties(props ServiceProperties) error
SetServiceProperties sets the properties of your storage account's table service. See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/set-table-service-properties
TimeRFC1123 is an alias for time.Time needed for custom Unmarshalling
type TimeRFC1123 time.Time
func (t *TimeRFC1123) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML marshals using time.RFC1123.
func (t *TimeRFC1123) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML is a custom unmarshaller that overrides the default time unmarshal which uses a different time layout.
UnexpectedStatusCodeError is returned when a storage service responds with neither an error nor with an HTTP status code indicating success.
type UnexpectedStatusCodeError struct {
// contains filtered or unexported fields
}
func (e UnexpectedStatusCodeError) Error() string
func (e UnexpectedStatusCodeError) Got() int
Got is the actual status code returned by Azure.
func (e UnexpectedStatusCodeError) Inner() error
Inner returns any inner error info.
UpdateMessageOptions is the set of options can be specified for Update Messsage operation. A zero struct does not use any preferences for the request.
type UpdateMessageOptions struct { Timeout uint VisibilityTimeout int RequestID string `header:"x-ms-client-request-id"` }
WriteRangeOptions includes options for a write file range operation
type WriteRangeOptions struct { Timeout uint ContentMD5 string }