Documentation ¶
Overview ¶
Package azfile allows you to manipulate Azure Storage shares, directories and files objects.
URL Types ¶
The most common types you'll work with are the XxxURL types. The methods of these types make requests against the Azure Storage Service.
- ServiceURL's methods perform operations on a storage account.
- ShareURL's methods perform operations on an account's share. -DirectoryURL's methods perform operations on a share's directory. -FileURL's methods perform operations on a directory's file.
Internally, each XxxURL object contains a URL and a request pipeline. The URL indicates the endpoint where each HTTP request is sent and the pipeline indicates how the outgoing HTTP request and incoming HTTP response is processed. The pipeline specifies things like retry policies, logging, deserialization of HTTP response payloads, and more.
Pipelines are thread-safe and may be shared by multiple XxxURL objects. When you create a ServiceURL, you pass an initial pipeline. When you call ServiceURL's NewShareURL method, the new ShareURL object has its own URL but it shares the same pipeline as the parent ServiceURL object.
To work with a directory, call ShareURL or DirectoryURL's NewDirectoryURL method to get a new DirectoryURL object. The new DirectoryURL object has its own URL but it shares the same pipeline as the parent XxxURL object.
To work with a file, call DirectoryURL's NewFileURL method. When you call DirectoryURL's NewFileURL, the new FileURL object has its own URL but it shares the same pipeline as the parent DirectoryURL object.
If you'd like to use a different pipeline with a ServiceURL, ShareURL, DirectoryURL or FileURL object, then call the XxxURL object's WithPipeline method passing in the desired pipeline. The WithPipeline methods create a new XxxURL object with the same URL as the original but with the specified pipeline.
Note that XxxURL objects use little memory, are goroutine-safe, and many objects share the same pipeline. This means that XxxURL objects share a lot of system resources making them very efficient.
All of XxxURL's methods that make HTTP requests return rich error handling information so you can discern network failures, transient failures, timeout failures, service failures, etc. See the StorageError interface for more information and an example of how to do deal with errors.
URL and Shared Access Signature Manipulation ¶
The library includes a FileURLParts type for deconstructing and reconstructing URLs. And you can use the following there types for generating and parsing Shared Access Signature (SAS)
- Use the AccountSASSignatureValues type to create a SAS for a storage account.
- Use the FileSASSignatureValues type to create a SAS for a share or file.
- Use the SASQueryParameters type to turn signature values in to query parameres or to parse query parameters.
To generate a SAS, you must use the SharedKeyCredential type.
Credentials ¶
When creating a request pipeline, you must specify one of this package's credential types.
- Call the NewAnonymousCredential function for requests that contain a Shared Access Signature (SAS).
- Call the NewSharedKeyCredential function (with an account name & key) to access any account resources. You must also use this to generate Shared Access Signatures.
HTTP Request Policy Factories ¶
This package defines several request policy factories for use with the pipeline package. Most applications will not use these factories directly; instead, the NewPipeline function creates these factories, initializes them (via the PipelineOptions type) and returns a pipeline object for use by the XxxURL objects.
However, for advanced scenarios, developers can access these policy factories directly and even create their own and then construct their own pipeline in order to affect HTTP requests and responses performed by the XxxURL objects. For example, developers can introduce their own logging, random failures, request recording & playback for fast testing, HTTP request pacing, alternate retry mechanisms, metering, metrics, etc. The possibilities are endless!
Below are the request pipeline policy factory functions that are provided with this package:
- NewRetryPolicyFactory Enables rich retry semantics for failed HTTP requests.
- NewRequestLogPolicyFactory Enables rich logging support for HTTP requests/responses & failures.
- NewTelemetryPolicyFactory Enables simple modification of the HTTP request's User-Agent header so each request reports the SDK version & language/runtime making the requests.
- NewUniqueRequestIDPolicyFactory Adds a x-ms-client-request-id header with a unique UUID value to an HTTP request to help with diagnosing failures.
Also, note that all the NewXxxCredential functions return request policy factory objects which get injected into the pipeline.
Index ¶
- Constants
- Variables
- func FormatTimesForSASSigning(startTime, expiryTime time.Time) (string, string)
- func NewPipeline(c Credential, o PipelineOptions) pipeline.Pipeline
- func NewRequestLogPolicyFactory(o RequestLogOptions) pipeline.Factory
- func NewResponseError(cause error, response *http.Response, description string) error
- func NewRetryPolicyFactory(o RetryOptions) pipeline.Factory
- func NewRetryReader(ctx context.Context, initialResponse *http.Response, info HTTPGetterInfo, ...) io.ReadCloser
- func NewTelemetryPolicyFactory(o TelemetryOptions) pipeline.Factory
- func NewUUID() (u uuid)
- func NewUniqueRequestIDPolicyFactory() pipeline.Factory
- func RedactSigQueryParam(rawQuery string) (bool, string)
- func UploadBufferToAzureFile(ctx context.Context, b []byte, fileURL FileURL, o UploadToAzureFileOptions) error
- func UploadFileToAzureFile(ctx context.Context, file *os.File, fileURL FileURL, ...) error
- func UserAgent() string
- func Version() string
- type AccessPolicy
- type AccessPolicyPermission
- type AccountSASPermissions
- type AccountSASResourceTypes
- type AccountSASServices
- type AccountSASSignatureValues
- type CopyStatusType
- type CorsRule
- type Credential
- type DeleteSnapshotsOptionType
- type DirectoryCreateResponse
- func (dcr DirectoryCreateResponse) Date() time.Time
- func (dcr DirectoryCreateResponse) ETag() ETag
- func (dcr DirectoryCreateResponse) ErrorCode() string
- func (dcr DirectoryCreateResponse) FileAttributes() string
- func (dcr DirectoryCreateResponse) FileChangeTime() string
- func (dcr DirectoryCreateResponse) FileCreationTime() string
- func (dcr DirectoryCreateResponse) FileID() string
- func (dcr DirectoryCreateResponse) FileLastWriteTime() string
- func (dcr DirectoryCreateResponse) FileParentID() string
- func (dcr DirectoryCreateResponse) FilePermissionKey() string
- func (dcr DirectoryCreateResponse) IsServerEncrypted() string
- func (dcr DirectoryCreateResponse) LastModified() time.Time
- func (dcr DirectoryCreateResponse) RequestID() string
- func (dcr DirectoryCreateResponse) Response() *http.Response
- func (dcr DirectoryCreateResponse) Status() string
- func (dcr DirectoryCreateResponse) StatusCode() int
- func (dcr DirectoryCreateResponse) Version() string
- type DirectoryDeleteResponse
- func (ddr DirectoryDeleteResponse) Date() time.Time
- func (ddr DirectoryDeleteResponse) ErrorCode() string
- func (ddr DirectoryDeleteResponse) RequestID() string
- func (ddr DirectoryDeleteResponse) Response() *http.Response
- func (ddr DirectoryDeleteResponse) Status() string
- func (ddr DirectoryDeleteResponse) StatusCode() int
- func (ddr DirectoryDeleteResponse) Version() string
- type DirectoryForceCloseHandlesResponse
- func (dfchr DirectoryForceCloseHandlesResponse) Date() time.Time
- func (dfchr DirectoryForceCloseHandlesResponse) ErrorCode() string
- func (dfchr DirectoryForceCloseHandlesResponse) Marker() string
- func (dfchr DirectoryForceCloseHandlesResponse) NumberOfHandlesClosed() int32
- func (dfchr DirectoryForceCloseHandlesResponse) RequestID() string
- func (dfchr DirectoryForceCloseHandlesResponse) Response() *http.Response
- func (dfchr DirectoryForceCloseHandlesResponse) Status() string
- func (dfchr DirectoryForceCloseHandlesResponse) StatusCode() int
- func (dfchr DirectoryForceCloseHandlesResponse) Version() string
- type DirectoryGetPropertiesResponse
- func (dgpr DirectoryGetPropertiesResponse) Date() time.Time
- func (dgpr DirectoryGetPropertiesResponse) ETag() ETag
- func (dgpr DirectoryGetPropertiesResponse) ErrorCode() string
- func (dgpr DirectoryGetPropertiesResponse) FileAttributes() string
- func (dgpr DirectoryGetPropertiesResponse) FileChangeTime() string
- func (dgpr DirectoryGetPropertiesResponse) FileCreationTime() string
- func (dgpr DirectoryGetPropertiesResponse) FileID() string
- func (dgpr DirectoryGetPropertiesResponse) FileLastWriteTime() string
- func (dgpr DirectoryGetPropertiesResponse) FileParentID() string
- func (dgpr DirectoryGetPropertiesResponse) FilePermissionKey() string
- func (dgpr DirectoryGetPropertiesResponse) IsServerEncrypted() string
- func (dgpr DirectoryGetPropertiesResponse) LastModified() time.Time
- func (dgpr DirectoryGetPropertiesResponse) NewMetadata() Metadata
- func (dgpr DirectoryGetPropertiesResponse) RequestID() string
- func (dgpr DirectoryGetPropertiesResponse) Response() *http.Response
- func (dgpr DirectoryGetPropertiesResponse) Status() string
- func (dgpr DirectoryGetPropertiesResponse) StatusCode() int
- func (dgpr DirectoryGetPropertiesResponse) Version() string
- type DirectoryItem
- type DirectorySetMetadataResponse
- func (dsmr DirectorySetMetadataResponse) Date() time.Time
- func (dsmr DirectorySetMetadataResponse) ETag() ETag
- func (dsmr DirectorySetMetadataResponse) ErrorCode() string
- func (dsmr DirectorySetMetadataResponse) IsServerEncrypted() string
- func (dsmr DirectorySetMetadataResponse) RequestID() string
- func (dsmr DirectorySetMetadataResponse) Response() *http.Response
- func (dsmr DirectorySetMetadataResponse) Status() string
- func (dsmr DirectorySetMetadataResponse) StatusCode() int
- func (dsmr DirectorySetMetadataResponse) Version() string
- type DirectorySetPropertiesResponse
- func (dspr DirectorySetPropertiesResponse) Date() time.Time
- func (dspr DirectorySetPropertiesResponse) ETag() ETag
- func (dspr DirectorySetPropertiesResponse) ErrorCode() string
- func (dspr DirectorySetPropertiesResponse) FileAttributes() string
- func (dspr DirectorySetPropertiesResponse) FileChangeTime() string
- func (dspr DirectorySetPropertiesResponse) FileCreationTime() string
- func (dspr DirectorySetPropertiesResponse) FileID() string
- func (dspr DirectorySetPropertiesResponse) FileLastWriteTime() string
- func (dspr DirectorySetPropertiesResponse) FileParentID() string
- func (dspr DirectorySetPropertiesResponse) FilePermissionKey() string
- func (dspr DirectorySetPropertiesResponse) IsServerEncrypted() string
- func (dspr DirectorySetPropertiesResponse) LastModified() time.Time
- func (dspr DirectorySetPropertiesResponse) RequestID() string
- func (dspr DirectorySetPropertiesResponse) Response() *http.Response
- func (dspr DirectorySetPropertiesResponse) Status() string
- func (dspr DirectorySetPropertiesResponse) StatusCode() int
- func (dspr DirectorySetPropertiesResponse) Version() string
- type DirectoryURL
- func (d DirectoryURL) Create(ctx context.Context, metadata Metadata, properties SMBProperties) (*DirectoryCreateResponse, error)
- func (d DirectoryURL) Delete(ctx context.Context) (*DirectoryDeleteResponse, error)
- func (d DirectoryURL) GetProperties(ctx context.Context) (*DirectoryGetPropertiesResponse, error)
- func (d DirectoryURL) ListFilesAndDirectoriesSegment(ctx context.Context, marker Marker, o ListFilesAndDirectoriesOptions) (*ListFilesAndDirectoriesSegmentResponse, error)
- func (d DirectoryURL) NewDirectoryURL(directoryName string) DirectoryURL
- func (d DirectoryURL) NewFileURL(fileName string) FileURL
- func (d DirectoryURL) SetMetadata(ctx context.Context, metadata Metadata) (*DirectorySetMetadataResponse, error)
- func (d DirectoryURL) SetProperties(ctx context.Context, properties SMBProperties) (*DirectorySetPropertiesResponse, error)
- func (d DirectoryURL) String() string
- func (d DirectoryURL) URL() url.URL
- func (d DirectoryURL) WithPipeline(p pipeline.Pipeline) DirectoryURL
- type DownloadFromAzureFileOptions
- type DownloadResponse
- func (dr DownloadResponse) AcceptRanges() string
- func (dr DownloadResponse) Body() io.ReadCloser
- func (dr DownloadResponse) CacheControl() string
- func (dr DownloadResponse) ContentDisposition() string
- func (dr DownloadResponse) ContentEncoding() string
- func (dr DownloadResponse) ContentLanguage() string
- func (dr DownloadResponse) ContentLength() int64
- func (dr DownloadResponse) ContentMD5() []byte
- func (dr DownloadResponse) ContentRange() string
- func (dr DownloadResponse) ContentType() string
- func (dr DownloadResponse) CopyCompletionTime() time.Time
- func (dr DownloadResponse) CopyID() string
- func (dr DownloadResponse) CopyProgress() string
- func (dr DownloadResponse) CopySource() string
- func (dr DownloadResponse) CopyStatus() CopyStatusType
- func (dr DownloadResponse) CopyStatusDescription() string
- func (dr DownloadResponse) Date() time.Time
- func (dr DownloadResponse) ETag() ETag
- func (dr DownloadResponse) ErrorCode() string
- func (dr DownloadResponse) FileAttributes() string
- func (dr DownloadResponse) FileChangeTime() string
- func (dr DownloadResponse) FileContentMD5() []byte
- func (dr DownloadResponse) FileCreationTime() string
- func (dr DownloadResponse) FileID() string
- func (dr DownloadResponse) FileLastWriteTime() string
- func (dr DownloadResponse) FileParentID() string
- func (dr DownloadResponse) FilePermissionKey() string
- func (dr DownloadResponse) IsServerEncrypted() string
- func (dr DownloadResponse) LastModified() time.Time
- func (dr DownloadResponse) NewMetadata() Metadata
- func (dr DownloadResponse) RequestID() string
- func (dr DownloadResponse) Response() *http.Response
- func (dr DownloadResponse) Status() string
- func (dr DownloadResponse) StatusCode() int
- func (dr DownloadResponse) Version() string
- type ETag
- type FailedReadNotifier
- type FileAbortCopyResponse
- func (facr FileAbortCopyResponse) Date() time.Time
- func (facr FileAbortCopyResponse) ErrorCode() string
- func (facr FileAbortCopyResponse) RequestID() string
- func (facr FileAbortCopyResponse) Response() *http.Response
- func (facr FileAbortCopyResponse) Status() string
- func (facr FileAbortCopyResponse) StatusCode() int
- func (facr FileAbortCopyResponse) Version() string
- type FileAttributeFlags
- type FileCreateResponse
- func (fcr FileCreateResponse) Date() time.Time
- func (fcr FileCreateResponse) ETag() ETag
- func (fcr FileCreateResponse) ErrorCode() string
- func (fcr FileCreateResponse) FileAttributes() string
- func (fcr FileCreateResponse) FileChangeTime() string
- func (fcr FileCreateResponse) FileCreationTime() string
- func (fcr FileCreateResponse) FileID() string
- func (fcr FileCreateResponse) FileLastWriteTime() string
- func (fcr FileCreateResponse) FileParentID() string
- func (fcr FileCreateResponse) FilePermissionKey() string
- func (fcr FileCreateResponse) IsServerEncrypted() string
- func (fcr FileCreateResponse) LastModified() time.Time
- func (fcr FileCreateResponse) RequestID() string
- func (fcr FileCreateResponse) Response() *http.Response
- func (fcr FileCreateResponse) Status() string
- func (fcr FileCreateResponse) StatusCode() int
- func (fcr FileCreateResponse) Version() string
- type FileDeleteResponse
- func (fdr FileDeleteResponse) Date() time.Time
- func (fdr FileDeleteResponse) ErrorCode() string
- func (fdr FileDeleteResponse) RequestID() string
- func (fdr FileDeleteResponse) Response() *http.Response
- func (fdr FileDeleteResponse) Status() string
- func (fdr FileDeleteResponse) StatusCode() int
- func (fdr FileDeleteResponse) Version() string
- type FileForceCloseHandlesResponse
- func (ffchr FileForceCloseHandlesResponse) Date() time.Time
- func (ffchr FileForceCloseHandlesResponse) ErrorCode() string
- func (ffchr FileForceCloseHandlesResponse) Marker() string
- func (ffchr FileForceCloseHandlesResponse) NumberOfHandlesClosed() int32
- func (ffchr FileForceCloseHandlesResponse) RequestID() string
- func (ffchr FileForceCloseHandlesResponse) Response() *http.Response
- func (ffchr FileForceCloseHandlesResponse) Status() string
- func (ffchr FileForceCloseHandlesResponse) StatusCode() int
- func (ffchr FileForceCloseHandlesResponse) Version() string
- type FileGetPropertiesResponse
- func (fgpr FileGetPropertiesResponse) CacheControl() string
- func (fgpr FileGetPropertiesResponse) ContentDisposition() string
- func (fgpr FileGetPropertiesResponse) ContentEncoding() string
- func (fgpr FileGetPropertiesResponse) ContentLanguage() string
- func (fgpr FileGetPropertiesResponse) ContentLength() int64
- func (fgpr FileGetPropertiesResponse) ContentMD5() []byte
- func (fgpr FileGetPropertiesResponse) ContentType() string
- func (fgpr FileGetPropertiesResponse) CopyCompletionTime() time.Time
- func (fgpr FileGetPropertiesResponse) CopyID() string
- func (fgpr FileGetPropertiesResponse) CopyProgress() string
- func (fgpr FileGetPropertiesResponse) CopySource() string
- func (fgpr FileGetPropertiesResponse) CopyStatus() CopyStatusType
- func (fgpr FileGetPropertiesResponse) CopyStatusDescription() string
- func (fgpr FileGetPropertiesResponse) Date() time.Time
- func (fgpr FileGetPropertiesResponse) ETag() ETag
- func (fgpr FileGetPropertiesResponse) ErrorCode() string
- func (fgpr FileGetPropertiesResponse) FileAttributes() string
- func (fgpr FileGetPropertiesResponse) FileChangeTime() string
- func (fgpr FileGetPropertiesResponse) FileCreationTime() string
- func (fgpr FileGetPropertiesResponse) FileID() string
- func (fgpr FileGetPropertiesResponse) FileLastWriteTime() string
- func (fgpr FileGetPropertiesResponse) FileParentID() string
- func (fgpr FileGetPropertiesResponse) FilePermissionKey() string
- func (fgpr FileGetPropertiesResponse) FileType() string
- func (fgpr FileGetPropertiesResponse) IsServerEncrypted() string
- func (fgpr FileGetPropertiesResponse) LastModified() time.Time
- func (fgpr FileGetPropertiesResponse) NewHTTPHeaders() FileHTTPHeaders
- func (fgpr FileGetPropertiesResponse) NewMetadata() Metadata
- func (fgpr FileGetPropertiesResponse) RequestID() string
- func (fgpr FileGetPropertiesResponse) Response() *http.Response
- func (fgpr FileGetPropertiesResponse) Status() string
- func (fgpr FileGetPropertiesResponse) StatusCode() int
- func (fgpr FileGetPropertiesResponse) Version() string
- type FileHTTPHeaders
- type FileItem
- type FileProperty
- type FileRangeWriteType
- type FileSASPermissions
- type FileSASSignatureValues
- type FileServiceProperties
- type FileSetHTTPHeadersResponse
- func (fshhr FileSetHTTPHeadersResponse) Date() time.Time
- func (fshhr FileSetHTTPHeadersResponse) ETag() ETag
- func (fshhr FileSetHTTPHeadersResponse) ErrorCode() string
- func (fshhr FileSetHTTPHeadersResponse) FileAttributes() string
- func (fshhr FileSetHTTPHeadersResponse) FileChangeTime() string
- func (fshhr FileSetHTTPHeadersResponse) FileCreationTime() string
- func (fshhr FileSetHTTPHeadersResponse) FileID() string
- func (fshhr FileSetHTTPHeadersResponse) FileLastWriteTime() string
- func (fshhr FileSetHTTPHeadersResponse) FileParentID() string
- func (fshhr FileSetHTTPHeadersResponse) FilePermissionKey() string
- func (fshhr FileSetHTTPHeadersResponse) IsServerEncrypted() string
- func (fshhr FileSetHTTPHeadersResponse) LastModified() time.Time
- func (fshhr FileSetHTTPHeadersResponse) RequestID() string
- func (fshhr FileSetHTTPHeadersResponse) Response() *http.Response
- func (fshhr FileSetHTTPHeadersResponse) Status() string
- func (fshhr FileSetHTTPHeadersResponse) StatusCode() int
- func (fshhr FileSetHTTPHeadersResponse) Version() string
- type FileSetMetadataResponse
- func (fsmr FileSetMetadataResponse) Date() time.Time
- func (fsmr FileSetMetadataResponse) ETag() ETag
- func (fsmr FileSetMetadataResponse) ErrorCode() string
- func (fsmr FileSetMetadataResponse) IsServerEncrypted() string
- func (fsmr FileSetMetadataResponse) RequestID() string
- func (fsmr FileSetMetadataResponse) Response() *http.Response
- func (fsmr FileSetMetadataResponse) Status() string
- func (fsmr FileSetMetadataResponse) StatusCode() int
- func (fsmr FileSetMetadataResponse) Version() string
- type FileStartCopyResponse
- func (fscr FileStartCopyResponse) CopyID() string
- func (fscr FileStartCopyResponse) CopyStatus() CopyStatusType
- func (fscr FileStartCopyResponse) Date() time.Time
- func (fscr FileStartCopyResponse) ETag() ETag
- func (fscr FileStartCopyResponse) ErrorCode() string
- func (fscr FileStartCopyResponse) LastModified() time.Time
- func (fscr FileStartCopyResponse) RequestID() string
- func (fscr FileStartCopyResponse) Response() *http.Response
- func (fscr FileStartCopyResponse) Status() string
- func (fscr FileStartCopyResponse) StatusCode() int
- func (fscr FileStartCopyResponse) Version() string
- type FileURL
- func (f FileURL) AbortCopy(ctx context.Context, copyID string) (*FileAbortCopyResponse, error)
- func (f FileURL) ClearRange(ctx context.Context, offset int64, count int64) (*FileUploadRangeResponse, error)
- func (f FileURL) Create(ctx context.Context, size int64, h FileHTTPHeaders, metadata Metadata) (*FileCreateResponse, error)
- func (f FileURL) Delete(ctx context.Context) (*FileDeleteResponse, error)
- func (f FileURL) Download(ctx context.Context, offset int64, count int64, rangeGetContentMD5 bool) (*RetryableDownloadResponse, error)
- func (f FileURL) GetProperties(ctx context.Context) (*FileGetPropertiesResponse, error)
- func (f FileURL) GetRangeList(ctx context.Context, offset int64, count int64) (*Ranges, error)
- func (f FileURL) Resize(ctx context.Context, length int64) (*FileSetHTTPHeadersResponse, error)
- func (f FileURL) SetHTTPHeaders(ctx context.Context, h FileHTTPHeaders) (*FileSetHTTPHeadersResponse, error)
- func (f FileURL) SetMetadata(ctx context.Context, metadata Metadata) (*FileSetMetadataResponse, error)
- func (f FileURL) StartCopy(ctx context.Context, source url.URL, metadata Metadata) (*FileStartCopyResponse, error)
- func (f FileURL) String() string
- func (f FileURL) URL() url.URL
- func (f FileURL) UploadRange(ctx context.Context, offset int64, body io.ReadSeeker, transactionalMD5 []byte) (*FileUploadRangeResponse, error)
- func (f FileURL) UploadRangeFromURL(ctx context.Context, sourceURL url.URL, sourceOffset int64, destOffset int64, ...) (*FileUploadRangeFromURLResponse, error)
- func (f FileURL) WithPipeline(p pipeline.Pipeline) FileURL
- func (f FileURL) WithSnapshot(shareSnapshot string) FileURL
- type FileURLParts
- type FileUploadRangeFromURLResponse
- func (furfur FileUploadRangeFromURLResponse) Date() time.Time
- func (furfur FileUploadRangeFromURLResponse) ETag() ETag
- func (furfur FileUploadRangeFromURLResponse) ErrorCode() string
- func (furfur FileUploadRangeFromURLResponse) IsServerEncrypted() string
- func (furfur FileUploadRangeFromURLResponse) LastModified() time.Time
- func (furfur FileUploadRangeFromURLResponse) RequestID() string
- func (furfur FileUploadRangeFromURLResponse) Response() *http.Response
- func (furfur FileUploadRangeFromURLResponse) Status() string
- func (furfur FileUploadRangeFromURLResponse) StatusCode() int
- func (furfur FileUploadRangeFromURLResponse) Version() string
- func (furfur FileUploadRangeFromURLResponse) XMsContentCrc64() []byte
- type FileUploadRangeResponse
- func (furr FileUploadRangeResponse) ContentMD5() []byte
- func (furr FileUploadRangeResponse) Date() time.Time
- func (furr FileUploadRangeResponse) ETag() ETag
- func (furr FileUploadRangeResponse) ErrorCode() string
- func (furr FileUploadRangeResponse) IsServerEncrypted() string
- func (furr FileUploadRangeResponse) LastModified() time.Time
- func (furr FileUploadRangeResponse) RequestID() string
- func (furr FileUploadRangeResponse) Response() *http.Response
- func (furr FileUploadRangeResponse) Status() string
- func (furr FileUploadRangeResponse) StatusCode() int
- func (furr FileUploadRangeResponse) Version() string
- type FilesAndDirectoriesListSegment
- type HTTPGetter
- type HTTPGetterInfo
- type HandleItem
- type IPEndpointStyleInfo
- type IPRange
- type ListFilesAndDirectoriesOptions
- type ListFilesAndDirectoriesSegmentResponse
- func (ldafr ListFilesAndDirectoriesSegmentResponse) ContentType() string
- func (ldafr ListFilesAndDirectoriesSegmentResponse) Date() time.Time
- func (ldafr ListFilesAndDirectoriesSegmentResponse) ErrorCode() string
- func (ldafr ListFilesAndDirectoriesSegmentResponse) RequestID() string
- func (ldafr ListFilesAndDirectoriesSegmentResponse) Response() *http.Response
- func (ldafr ListFilesAndDirectoriesSegmentResponse) Status() string
- func (ldafr ListFilesAndDirectoriesSegmentResponse) StatusCode() int
- func (ldafr ListFilesAndDirectoriesSegmentResponse) Version() string
- type ListHandlesResponse
- func (lhr ListHandlesResponse) ContentType() string
- func (lhr ListHandlesResponse) Date() time.Time
- func (lhr ListHandlesResponse) ErrorCode() string
- func (lhr ListHandlesResponse) RequestID() string
- func (lhr ListHandlesResponse) Response() *http.Response
- func (lhr ListHandlesResponse) Status() string
- func (lhr ListHandlesResponse) StatusCode() int
- func (lhr ListHandlesResponse) Version() string
- type ListSharesDetail
- type ListSharesIncludeType
- type ListSharesOptions
- type ListSharesResponse
- type Marker
- type Metadata
- type MetricProperties
- type Metrics
- type PipelineOptions
- type Range
- type Ranges
- func (r Ranges) Date() time.Time
- func (r Ranges) ETag() ETag
- func (r Ranges) ErrorCode() string
- func (r Ranges) FileContentLength() int64
- func (r Ranges) LastModified() time.Time
- func (r Ranges) RequestID() string
- func (r Ranges) Response() *http.Response
- func (r Ranges) Status() string
- func (r Ranges) StatusCode() int
- func (r Ranges) Version() string
- type RequestLogOptions
- type ResponseError
- type RetentionPolicy
- type RetryOptions
- type RetryPolicy
- type RetryReaderOptions
- type RetryableDownloadResponse
- func (dr RetryableDownloadResponse) AcceptRanges() string
- func (dr *RetryableDownloadResponse) Body(o RetryReaderOptions) io.ReadCloser
- func (dr RetryableDownloadResponse) CacheControl() string
- func (dr RetryableDownloadResponse) ContentDisposition() string
- func (dr RetryableDownloadResponse) ContentEncoding() string
- func (dr RetryableDownloadResponse) ContentLanguage() string
- func (dr RetryableDownloadResponse) ContentLength() int64
- func (dr RetryableDownloadResponse) ContentMD5() []byte
- func (dr RetryableDownloadResponse) ContentRange() string
- func (dr RetryableDownloadResponse) ContentType() string
- func (dr RetryableDownloadResponse) CopyCompletionTime() time.Time
- func (dr RetryableDownloadResponse) CopyID() string
- func (dr RetryableDownloadResponse) CopyProgress() string
- func (dr RetryableDownloadResponse) CopySource() string
- func (dr RetryableDownloadResponse) CopyStatus() CopyStatusType
- func (dr RetryableDownloadResponse) CopyStatusDescription() string
- func (dr RetryableDownloadResponse) Date() time.Time
- func (dr RetryableDownloadResponse) ETag() ETag
- func (dr RetryableDownloadResponse) FileContentMD5() []byte
- func (dr RetryableDownloadResponse) IsServerEncrypted() string
- func (dr RetryableDownloadResponse) LastModified() time.Time
- func (dr RetryableDownloadResponse) NewHTTPHeaders() FileHTTPHeaders
- func (dr RetryableDownloadResponse) NewMetadata() Metadata
- func (dr RetryableDownloadResponse) RequestID() string
- func (dr RetryableDownloadResponse) Response() *http.Response
- func (dr RetryableDownloadResponse) Status() string
- func (dr RetryableDownloadResponse) StatusCode() int
- func (dr RetryableDownloadResponse) Version() string
- type SASProtocol
- type SASQueryParameters
- func (p *SASQueryParameters) CacheControl() string
- func (p *SASQueryParameters) ContentDisposition() string
- func (p *SASQueryParameters) ContentEncoding() string
- func (p *SASQueryParameters) ContentLanguage() string
- func (p *SASQueryParameters) ContentType() string
- func (p *SASQueryParameters) Encode() string
- func (p *SASQueryParameters) ExpiryTime() time.Time
- func (p *SASQueryParameters) IPRange() IPRange
- func (p *SASQueryParameters) Identifier() string
- func (p *SASQueryParameters) Permissions() string
- func (p *SASQueryParameters) Protocol() SASProtocol
- func (p *SASQueryParameters) Resource() string
- func (p *SASQueryParameters) ResourceTypes() string
- func (p *SASQueryParameters) Services() string
- func (p *SASQueryParameters) Signature() string
- func (p *SASQueryParameters) StartTime() time.Time
- func (p *SASQueryParameters) Version() string
- type SMBProperties
- type SMBPropertyAdapter
- type SMBPropertyHolder
- type ServiceCodeType
- type ServiceSetPropertiesResponse
- func (sspr ServiceSetPropertiesResponse) ErrorCode() string
- func (sspr ServiceSetPropertiesResponse) RequestID() string
- func (sspr ServiceSetPropertiesResponse) Response() *http.Response
- func (sspr ServiceSetPropertiesResponse) Status() string
- func (sspr ServiceSetPropertiesResponse) StatusCode() int
- func (sspr ServiceSetPropertiesResponse) Version() string
- type ServiceURL
- func (s ServiceURL) GetProperties(ctx context.Context) (*FileServiceProperties, error)
- func (s ServiceURL) ListSharesSegment(ctx context.Context, marker Marker, o ListSharesOptions) (*ListSharesResponse, error)
- func (s ServiceURL) NewShareURL(shareName string) ShareURL
- func (s ServiceURL) SetProperties(ctx context.Context, properties FileServiceProperties) (*ServiceSetPropertiesResponse, error)
- func (s ServiceURL) String() string
- func (s ServiceURL) URL() url.URL
- func (s ServiceURL) WithPipeline(p pipeline.Pipeline) ServiceURL
- type ShareCreatePermissionResponse
- func (scpr ShareCreatePermissionResponse) Date() time.Time
- func (scpr ShareCreatePermissionResponse) ErrorCode() string
- func (scpr ShareCreatePermissionResponse) FilePermissionKey() string
- func (scpr ShareCreatePermissionResponse) RequestID() string
- func (scpr ShareCreatePermissionResponse) Response() *http.Response
- func (scpr ShareCreatePermissionResponse) Status() string
- func (scpr ShareCreatePermissionResponse) StatusCode() int
- func (scpr ShareCreatePermissionResponse) Version() string
- type ShareCreateResponse
- func (scr ShareCreateResponse) Date() time.Time
- func (scr ShareCreateResponse) ETag() ETag
- func (scr ShareCreateResponse) ErrorCode() string
- func (scr ShareCreateResponse) LastModified() time.Time
- func (scr ShareCreateResponse) RequestID() string
- func (scr ShareCreateResponse) Response() *http.Response
- func (scr ShareCreateResponse) Status() string
- func (scr ShareCreateResponse) StatusCode() int
- func (scr ShareCreateResponse) Version() string
- type ShareCreateSnapshotResponse
- func (scsr ShareCreateSnapshotResponse) Date() time.Time
- func (scsr ShareCreateSnapshotResponse) ETag() ETag
- func (scsr ShareCreateSnapshotResponse) ErrorCode() string
- func (scsr ShareCreateSnapshotResponse) LastModified() time.Time
- func (scsr ShareCreateSnapshotResponse) RequestID() string
- func (scsr ShareCreateSnapshotResponse) Response() *http.Response
- func (scsr ShareCreateSnapshotResponse) Snapshot() string
- func (scsr ShareCreateSnapshotResponse) Status() string
- func (scsr ShareCreateSnapshotResponse) StatusCode() int
- func (scsr ShareCreateSnapshotResponse) Version() string
- type ShareDeleteResponse
- func (sdr ShareDeleteResponse) Date() time.Time
- func (sdr ShareDeleteResponse) ErrorCode() string
- func (sdr ShareDeleteResponse) RequestID() string
- func (sdr ShareDeleteResponse) Response() *http.Response
- func (sdr ShareDeleteResponse) Status() string
- func (sdr ShareDeleteResponse) StatusCode() int
- func (sdr ShareDeleteResponse) Version() string
- type ShareGetPropertiesResponse
- func (sgpr ShareGetPropertiesResponse) Date() time.Time
- func (sgpr ShareGetPropertiesResponse) ETag() ETag
- func (sgpr ShareGetPropertiesResponse) ErrorCode() string
- func (sgpr ShareGetPropertiesResponse) LastModified() time.Time
- func (sgpr ShareGetPropertiesResponse) NewMetadata() Metadata
- func (sgpr ShareGetPropertiesResponse) Quota() int32
- func (sgpr ShareGetPropertiesResponse) RequestID() string
- func (sgpr ShareGetPropertiesResponse) Response() *http.Response
- func (sgpr ShareGetPropertiesResponse) Status() string
- func (sgpr ShareGetPropertiesResponse) StatusCode() int
- func (sgpr ShareGetPropertiesResponse) Version() string
- type ShareItem
- type SharePermission
- func (sp SharePermission) Date() time.Time
- func (sp SharePermission) ErrorCode() string
- func (sp SharePermission) RequestID() string
- func (sp SharePermission) Response() *http.Response
- func (sp SharePermission) Status() string
- func (sp SharePermission) StatusCode() int
- func (sp SharePermission) Version() string
- type ShareProperties
- type ShareSASPermissions
- type ShareSetAccessPolicyResponse
- func (ssapr ShareSetAccessPolicyResponse) Date() time.Time
- func (ssapr ShareSetAccessPolicyResponse) ETag() ETag
- func (ssapr ShareSetAccessPolicyResponse) ErrorCode() string
- func (ssapr ShareSetAccessPolicyResponse) LastModified() time.Time
- func (ssapr ShareSetAccessPolicyResponse) RequestID() string
- func (ssapr ShareSetAccessPolicyResponse) Response() *http.Response
- func (ssapr ShareSetAccessPolicyResponse) Status() string
- func (ssapr ShareSetAccessPolicyResponse) StatusCode() int
- func (ssapr ShareSetAccessPolicyResponse) Version() string
- type ShareSetMetadataResponse
- func (ssmr ShareSetMetadataResponse) Date() time.Time
- func (ssmr ShareSetMetadataResponse) ETag() ETag
- func (ssmr ShareSetMetadataResponse) ErrorCode() string
- func (ssmr ShareSetMetadataResponse) LastModified() time.Time
- func (ssmr ShareSetMetadataResponse) RequestID() string
- func (ssmr ShareSetMetadataResponse) Response() *http.Response
- func (ssmr ShareSetMetadataResponse) Status() string
- func (ssmr ShareSetMetadataResponse) StatusCode() int
- func (ssmr ShareSetMetadataResponse) Version() string
- type ShareSetQuotaResponse
- func (ssqr ShareSetQuotaResponse) Date() time.Time
- func (ssqr ShareSetQuotaResponse) ETag() ETag
- func (ssqr ShareSetQuotaResponse) ErrorCode() string
- func (ssqr ShareSetQuotaResponse) LastModified() time.Time
- func (ssqr ShareSetQuotaResponse) RequestID() string
- func (ssqr ShareSetQuotaResponse) Response() *http.Response
- func (ssqr ShareSetQuotaResponse) Status() string
- func (ssqr ShareSetQuotaResponse) StatusCode() int
- func (ssqr ShareSetQuotaResponse) Version() string
- type ShareStats
- func (ss ShareStats) Date() time.Time
- func (ss ShareStats) ETag() ETag
- func (ss ShareStats) ErrorCode() string
- func (ss ShareStats) LastModified() time.Time
- func (ss ShareStats) RequestID() string
- func (ss ShareStats) Response() *http.Response
- func (ss ShareStats) Status() string
- func (ss ShareStats) StatusCode() int
- func (ss ShareStats) Version() string
- type ShareURL
- func (s ShareURL) Create(ctx context.Context, metadata Metadata, quotaInGB int32) (*ShareCreateResponse, error)
- func (s ShareURL) CreatePermission(ctx context.Context, permission string) (*ShareCreatePermissionResponse, error)
- func (s ShareURL) CreateSnapshot(ctx context.Context, metadata Metadata) (*ShareCreateSnapshotResponse, error)
- func (s ShareURL) Delete(ctx context.Context, deleteSnapshotsOption DeleteSnapshotsOptionType) (*ShareDeleteResponse, error)
- func (s ShareURL) GetPermission(ctx context.Context, permissionKey string) (*SharePermission, error)
- func (s ShareURL) GetPermissions(ctx context.Context) (*SignedIdentifiers, error)
- func (s ShareURL) GetProperties(ctx context.Context) (*ShareGetPropertiesResponse, error)
- func (s ShareURL) GetStatistics(ctx context.Context) (*ShareStats, error)
- func (s ShareURL) NewDirectoryURL(directoryName string) DirectoryURL
- func (s ShareURL) NewRootDirectoryURL() DirectoryURL
- func (s ShareURL) SetMetadata(ctx context.Context, metadata Metadata) (*ShareSetMetadataResponse, error)
- func (s ShareURL) SetPermissions(ctx context.Context, permissions []SignedIdentifier) (*ShareSetAccessPolicyResponse, error)
- func (s ShareURL) SetQuota(ctx context.Context, quotaInGB int32) (*ShareSetQuotaResponse, error)
- func (s ShareURL) String() string
- func (s ShareURL) URL() url.URL
- func (s ShareURL) WithPipeline(p pipeline.Pipeline) ShareURL
- func (s ShareURL) WithSnapshot(snapshot string) ShareURL
- type SharedKeyCredential
- type SignedIdentifier
- type SignedIdentifiers
- func (si SignedIdentifiers) Date() time.Time
- func (si SignedIdentifiers) ETag() ETag
- func (si SignedIdentifiers) ErrorCode() string
- func (si SignedIdentifiers) LastModified() time.Time
- func (si SignedIdentifiers) RequestID() string
- func (si SignedIdentifiers) Response() *http.Response
- func (si SignedIdentifiers) Status() string
- func (si SignedIdentifiers) StatusCode() int
- func (si SignedIdentifiers) Version() string
- type StorageError
- type StorageErrorCodeType
- type StorageServiceProperties
- func (ssp StorageServiceProperties) ErrorCode() string
- func (ssp StorageServiceProperties) RequestID() string
- func (ssp StorageServiceProperties) Response() *http.Response
- func (ssp StorageServiceProperties) Status() string
- func (ssp StorageServiceProperties) StatusCode() int
- func (ssp StorageServiceProperties) Version() string
- type TelemetryOptions
- type TokenCredential
- type TokenRefresher
- type UploadToAzureFileOptions
Constants ¶
const ( // FileMaxUploadRangeBytes indicates the maximum number of bytes that can be sent in a call to UploadRange. FileMaxUploadRangeBytes = 4 * 1024 * 1024 // 4MB // FileMaxSizeInBytes indicates the maxiumum file size, in bytes. FileMaxSizeInBytes int64 = 1 * 1024 * 1024 * 1024 * 1024 // 1TB )
const ( // CountToEnd indiciates a flag for count parameter. It means the count of bytes // from start offset to the end of file. CountToEnd = 0 )
const ISO8601 = "2006-01-02T15:04:05.0000000Z" // must have 0's for fractional seconds, because Files Service requires fixed width
FileCreationTime and FileLastWriteTime are handled by the Azure Files service with high-precision ISO-8601 timestamps. Use this format to parse these fields and format them.
const ReadOnClosedBodyMessage = "read on closed response body"
const SASTimeFormat = "2006-01-02T15:04:05Z"
const SASVersion = ServiceVersion
SASVersion indicates the SAS version.
const ( // ServiceVersion specifies the version of the operations used in this package. //ServiceVersion = "2019-02-02" ServiceVersion = "2021-12-02" )
Variables ¶
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.
SASTimeFormats represents the format of a SAS start or expiry time. Use it when formatting/parsing a time.Time.
Functions ¶
func FormatTimesForSASSigning ¶
FormatTimesForSASSigning converts a time.Time to a snapshotTimeFormat string suitable for a SASField's StartTime or ExpiryTime fields. Returns "" if value.IsZero().
func NewPipeline ¶
func NewPipeline(c Credential, o PipelineOptions) pipeline.Pipeline
NewPipeline creates a Pipeline using the specified credentials and options. Note: c can't be nil.
func NewRequestLogPolicyFactory ¶
func NewRequestLogPolicyFactory(o RequestLogOptions) pipeline.Factory
NewRequestLogPolicyFactory creates a RequestLogPolicyFactory object configured using the specified options.
func NewResponseError ¶
NewResponseError creates an error object that implements the error interface.
func NewRetryPolicyFactory ¶
func NewRetryPolicyFactory(o RetryOptions) pipeline.Factory
NewRetryPolicyFactory creates a RetryPolicyFactory object configured using the specified options.
func NewRetryReader ¶
func NewRetryReader(ctx context.Context, initialResponse *http.Response, info HTTPGetterInfo, o RetryReaderOptions, getter HTTPGetter) io.ReadCloser
NewRetryReader creates a retry reader.
func NewTelemetryPolicyFactory ¶
func NewTelemetryPolicyFactory(o TelemetryOptions) pipeline.Factory
NewTelemetryPolicyFactory creates a factory that can create telemetry policy objects which add telemetry information to outgoing HTTP requests.
func NewUniqueRequestIDPolicyFactory ¶
NewUniqueRequestIDPolicyFactory creates a UniqueRequestIDPolicyFactory object that sets the request's x-ms-client-request-id header if it doesn't already exist.
func RedactSigQueryParam ¶
RedactSigQueryParam redacts the 'sig' query parameter in URL's raw query to protect secret.
func UploadBufferToAzureFile ¶
func UploadBufferToAzureFile(ctx context.Context, b []byte, fileURL FileURL, o UploadToAzureFileOptions) error
UploadBufferToAzureFile uploads a buffer to an Azure file. Note: o.RangeSize must be >= 0 and <= FileMaxUploadRangeBytes, and if not specified, method will use FileMaxUploadRangeBytes by default. The total size to be uploaded should be <= FileMaxSizeInBytes.
func UploadFileToAzureFile ¶
func UploadFileToAzureFile(ctx context.Context, file *os.File, fileURL FileURL, o UploadToAzureFileOptions) error
UploadFileToAzureFile uploads a local file to an Azure file.
func UserAgent ¶
func UserAgent() string
UserAgent returns the UserAgent string to use when sending http.Requests.
func Version ¶
func Version() string
Version returns the semantic version (see http://semver.org) of the client.
Types ¶
type AccessPolicy ¶
type AccessPolicy struct { // Start - The date-time the policy is active. Start *time.Time `xml:"Start"` // Expiry - The date-time the policy expires. Expiry *time.Time `xml:"Expiry"` // Permission - The permissions for the ACL policy. Permission *string `xml:"Permission"` }
AccessPolicy - An Access policy.
func (AccessPolicy) MarshalXML ¶
func (ap AccessPolicy) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements the xml.Marshaler interface for AccessPolicy.
func (*AccessPolicy) UnmarshalXML ¶
func (ap *AccessPolicy) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements the xml.Unmarshaler interface for AccessPolicy.
type AccessPolicyPermission ¶
type AccessPolicyPermission struct {
Read, Create, Write, Delete, List bool
}
The AccessPolicyPermission type simplifies creating the permissions string for a share'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)
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 share. Call this method to set AccessPolicy's Permission field.
type AccountSASPermissions ¶
type AccountSASPermissions struct {
Read, Write, Delete, List, Add, Create, Update, Process bool
}
The AccountSASPermissions type simplifies creating the permissions string for an Azure Storage Account SAS. Initialize an instance of this type and then call its String method to set AccountSASSignatureValues's Permissions field.
func (*AccountSASPermissions) Parse ¶
func (p *AccountSASPermissions) Parse(s string) error
Parse initializes the AccountSASPermissions's fields from a string.
func (AccountSASPermissions) String ¶
func (p AccountSASPermissions) String() string
String produces the SAS permissions string for an Azure Storage account. Call this method to set AccountSASSignatureValues's Permissions field.
type AccountSASResourceTypes ¶
type AccountSASResourceTypes struct {
Service, Container, Object bool
}
The AccountSASResourceTypes type simplifies creating the resource types string for an Azure Storage Account SAS. Initialize an instance of this type and then call its String method to set AccountSASSignatureValues's ResourceTypes field.
func (*AccountSASResourceTypes) Parse ¶
func (rt *AccountSASResourceTypes) Parse(s string) error
Parse initializes the AccountSASResourceType's fields from a string.
func (AccountSASResourceTypes) String ¶
func (rt AccountSASResourceTypes) String() string
String produces the SAS resource types string for an Azure Storage account. Call this method to set AccountSASSignatureValues's ResourceTypes field.
type AccountSASServices ¶
type AccountSASServices struct {
Blob, Queue, File bool
}
The AccountSASServices type simplifies creating the services string for an Azure Storage Account SAS. Initialize an instance of this type and then call its String method to set AccountSASSignatureValues's Services field.
func (*AccountSASServices) Parse ¶
func (a *AccountSASServices) Parse(s string) error
Parse initializes the AccountSASServices' fields from a string.
func (AccountSASServices) String ¶
func (s AccountSASServices) String() string
String produces the SAS services string for an Azure Storage account. Call this method to set AccountSASSignatureValues's Services field.
type AccountSASSignatureValues ¶
type AccountSASSignatureValues struct { Version string `param:"sv"` // If not specified, this defaults to SASVersion Protocol SASProtocol `param:"spr"` // See the SASProtocol* constants StartTime time.Time `param:"st"` // Not specified if IsZero ExpiryTime time.Time `param:"se"` // Not specified if IsZero Permissions string `param:"sp"` // Create by initializing a AccountSASPermissions and then call String() IPRange IPRange `param:"sip"` Services string `param:"ss"` // Create by initializing AccountSASServices and then call String() ResourceTypes string `param:"srt"` // Create by initializing AccountSASResourceTypes and then call String() }
AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. For more information, see https://docs.microsoft.com/rest/api/storageservices/constructing-an-account-sas
func (AccountSASSignatureValues) NewSASQueryParameters ¶
func (v AccountSASSignatureValues) NewSASQueryParameters(sharedKeyCredential *SharedKeyCredential) (SASQueryParameters, error)
NewSASQueryParameters uses an account's shared key credential to sign this signature values to produce the proper SAS query parameters.
type CopyStatusType ¶
type CopyStatusType string
CopyStatusType enumerates the values for copy status type.
const ( // CopyStatusAborted ... CopyStatusAborted CopyStatusType = "aborted" // CopyStatusFailed ... CopyStatusFailed CopyStatusType = "failed" // CopyStatusNone represents an empty CopyStatusType. CopyStatusNone CopyStatusType = "" // CopyStatusPending ... CopyStatusPending CopyStatusType = "pending" // CopyStatusSuccess ... CopyStatusSuccess CopyStatusType = "success" )
func PossibleCopyStatusTypeValues ¶
func PossibleCopyStatusTypeValues() []CopyStatusType
PossibleCopyStatusTypeValues returns an array of possible values for the CopyStatusType const type.
type CorsRule ¶
type CorsRule struct { // AllowedOrigins - The origin domains that are permitted to make a request against the storage service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character '*' to allow all origin domains to make requests via CORS. AllowedOrigins string `xml:"AllowedOrigins"` // AllowedMethods - The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated) AllowedMethods string `xml:"AllowedMethods"` // AllowedHeaders - The request headers that the origin domain may specify on the CORS request. AllowedHeaders string `xml:"AllowedHeaders"` // ExposedHeaders - The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer. ExposedHeaders string `xml:"ExposedHeaders"` // MaxAgeInSeconds - The maximum amount time that a browser should cache the preflight OPTIONS request. MaxAgeInSeconds int32 `xml:"MaxAgeInSeconds"` }
CorsRule - CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain.
type Credential ¶
Credential represent any credential type; it is used to create a credential policy Factory.
func NewAnonymousCredential ¶
func NewAnonymousCredential() Credential
NewAnonymousCredential creates an anonymous credential for use with HTTP(S) requests that read public resource or for use with Shared Access Signatures (SAS).
type DeleteSnapshotsOptionType ¶
type DeleteSnapshotsOptionType string
DeleteSnapshotsOptionType enumerates the values for delete snapshots option type.
const ( // DeleteSnapshotsOptionInclude ... DeleteSnapshotsOptionInclude DeleteSnapshotsOptionType = "include" // DeleteSnapshotsOptionNone represents an empty DeleteSnapshotsOptionType. DeleteSnapshotsOptionNone DeleteSnapshotsOptionType = "" )
func PossibleDeleteSnapshotsOptionTypeValues ¶
func PossibleDeleteSnapshotsOptionTypeValues() []DeleteSnapshotsOptionType
PossibleDeleteSnapshotsOptionTypeValues returns an array of possible values for the DeleteSnapshotsOptionType const type.
type DirectoryCreateResponse ¶
type DirectoryCreateResponse struct {
// contains filtered or unexported fields
}
DirectoryCreateResponse ...
func (DirectoryCreateResponse) Date ¶
func (dcr DirectoryCreateResponse) Date() time.Time
Date returns the value for header Date.
func (DirectoryCreateResponse) ETag ¶
func (dcr DirectoryCreateResponse) ETag() ETag
ETag returns the value for header ETag.
func (DirectoryCreateResponse) ErrorCode ¶
func (dcr DirectoryCreateResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (DirectoryCreateResponse) FileAttributes ¶
func (dcr DirectoryCreateResponse) FileAttributes() string
FileAttributes returns the value for header x-ms-file-attributes.
func (DirectoryCreateResponse) FileChangeTime ¶
func (dcr DirectoryCreateResponse) FileChangeTime() string
FileChangeTime returns the value for header x-ms-file-change-time.
func (DirectoryCreateResponse) FileCreationTime ¶
func (dcr DirectoryCreateResponse) FileCreationTime() string
FileCreationTime returns the value for header x-ms-file-creation-time.
func (DirectoryCreateResponse) FileID ¶
func (dcr DirectoryCreateResponse) FileID() string
FileID returns the value for header x-ms-file-id.
func (DirectoryCreateResponse) FileLastWriteTime ¶
func (dcr DirectoryCreateResponse) FileLastWriteTime() string
FileLastWriteTime returns the value for header x-ms-file-last-write-time.
func (DirectoryCreateResponse) FileParentID ¶
func (dcr DirectoryCreateResponse) FileParentID() string
FileParentID returns the value for header x-ms-file-parent-id.
func (DirectoryCreateResponse) FilePermissionKey ¶
func (dcr DirectoryCreateResponse) FilePermissionKey() string
FilePermissionKey returns the value for header x-ms-file-permission-key.
func (DirectoryCreateResponse) IsServerEncrypted ¶
func (dcr DirectoryCreateResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (DirectoryCreateResponse) LastModified ¶
func (dcr DirectoryCreateResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (DirectoryCreateResponse) RequestID ¶
func (dcr DirectoryCreateResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (DirectoryCreateResponse) Response ¶
func (dcr DirectoryCreateResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (DirectoryCreateResponse) Status ¶
func (dcr DirectoryCreateResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (DirectoryCreateResponse) StatusCode ¶
func (dcr DirectoryCreateResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (DirectoryCreateResponse) Version ¶
func (dcr DirectoryCreateResponse) Version() string
Version returns the value for header x-ms-version.
type DirectoryDeleteResponse ¶
type DirectoryDeleteResponse struct {
// contains filtered or unexported fields
}
DirectoryDeleteResponse ...
func (DirectoryDeleteResponse) Date ¶
func (ddr DirectoryDeleteResponse) Date() time.Time
Date returns the value for header Date.
func (DirectoryDeleteResponse) ErrorCode ¶
func (ddr DirectoryDeleteResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (DirectoryDeleteResponse) RequestID ¶
func (ddr DirectoryDeleteResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (DirectoryDeleteResponse) Response ¶
func (ddr DirectoryDeleteResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (DirectoryDeleteResponse) Status ¶
func (ddr DirectoryDeleteResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (DirectoryDeleteResponse) StatusCode ¶
func (ddr DirectoryDeleteResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (DirectoryDeleteResponse) Version ¶
func (ddr DirectoryDeleteResponse) Version() string
Version returns the value for header x-ms-version.
type DirectoryForceCloseHandlesResponse ¶
type DirectoryForceCloseHandlesResponse struct {
// contains filtered or unexported fields
}
DirectoryForceCloseHandlesResponse ...
func (DirectoryForceCloseHandlesResponse) Date ¶
func (dfchr DirectoryForceCloseHandlesResponse) Date() time.Time
Date returns the value for header Date.
func (DirectoryForceCloseHandlesResponse) ErrorCode ¶
func (dfchr DirectoryForceCloseHandlesResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (DirectoryForceCloseHandlesResponse) Marker ¶
func (dfchr DirectoryForceCloseHandlesResponse) Marker() string
Marker returns the value for header x-ms-marker.
func (DirectoryForceCloseHandlesResponse) NumberOfHandlesClosed ¶
func (dfchr DirectoryForceCloseHandlesResponse) NumberOfHandlesClosed() int32
NumberOfHandlesClosed returns the value for header x-ms-number-of-handles-closed.
func (DirectoryForceCloseHandlesResponse) RequestID ¶
func (dfchr DirectoryForceCloseHandlesResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (DirectoryForceCloseHandlesResponse) Response ¶
func (dfchr DirectoryForceCloseHandlesResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (DirectoryForceCloseHandlesResponse) Status ¶
func (dfchr DirectoryForceCloseHandlesResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (DirectoryForceCloseHandlesResponse) StatusCode ¶
func (dfchr DirectoryForceCloseHandlesResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (DirectoryForceCloseHandlesResponse) Version ¶
func (dfchr DirectoryForceCloseHandlesResponse) Version() string
Version returns the value for header x-ms-version.
type DirectoryGetPropertiesResponse ¶
type DirectoryGetPropertiesResponse struct {
// contains filtered or unexported fields
}
DirectoryGetPropertiesResponse ...
func (DirectoryGetPropertiesResponse) Date ¶
func (dgpr DirectoryGetPropertiesResponse) Date() time.Time
Date returns the value for header Date.
func (DirectoryGetPropertiesResponse) ETag ¶
func (dgpr DirectoryGetPropertiesResponse) ETag() ETag
ETag returns the value for header ETag.
func (DirectoryGetPropertiesResponse) ErrorCode ¶
func (dgpr DirectoryGetPropertiesResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (DirectoryGetPropertiesResponse) FileAttributes ¶
func (dgpr DirectoryGetPropertiesResponse) FileAttributes() string
FileAttributes returns the value for header x-ms-file-attributes.
func (DirectoryGetPropertiesResponse) FileChangeTime ¶
func (dgpr DirectoryGetPropertiesResponse) FileChangeTime() string
FileChangeTime returns the value for header x-ms-file-change-time.
func (DirectoryGetPropertiesResponse) FileCreationTime ¶
func (dgpr DirectoryGetPropertiesResponse) FileCreationTime() string
FileCreationTime returns the value for header x-ms-file-creation-time.
func (DirectoryGetPropertiesResponse) FileID ¶
func (dgpr DirectoryGetPropertiesResponse) FileID() string
FileID returns the value for header x-ms-file-id.
func (DirectoryGetPropertiesResponse) FileLastWriteTime ¶
func (dgpr DirectoryGetPropertiesResponse) FileLastWriteTime() string
FileLastWriteTime returns the value for header x-ms-file-last-write-time.
func (DirectoryGetPropertiesResponse) FileParentID ¶
func (dgpr DirectoryGetPropertiesResponse) FileParentID() string
FileParentID returns the value for header x-ms-file-parent-id.
func (DirectoryGetPropertiesResponse) FilePermissionKey ¶
func (dgpr DirectoryGetPropertiesResponse) FilePermissionKey() string
FilePermissionKey returns the value for header x-ms-file-permission-key.
func (DirectoryGetPropertiesResponse) IsServerEncrypted ¶
func (dgpr DirectoryGetPropertiesResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-server-encrypted.
func (DirectoryGetPropertiesResponse) LastModified ¶
func (dgpr DirectoryGetPropertiesResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (DirectoryGetPropertiesResponse) NewMetadata ¶
func (dgpr DirectoryGetPropertiesResponse) NewMetadata() Metadata
NewMetadata returns user-defined key/value pairs.
func (DirectoryGetPropertiesResponse) RequestID ¶
func (dgpr DirectoryGetPropertiesResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (DirectoryGetPropertiesResponse) Response ¶
func (dgpr DirectoryGetPropertiesResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (DirectoryGetPropertiesResponse) Status ¶
func (dgpr DirectoryGetPropertiesResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (DirectoryGetPropertiesResponse) StatusCode ¶
func (dgpr DirectoryGetPropertiesResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (DirectoryGetPropertiesResponse) Version ¶
func (dgpr DirectoryGetPropertiesResponse) Version() string
Version returns the value for header x-ms-version.
type DirectoryItem ¶
type DirectoryItem struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"Directory"` // Name - Name of the entry. Name string `xml:"Name"` }
DirectoryItem - Listed directory item.
type DirectorySetMetadataResponse ¶
type DirectorySetMetadataResponse struct {
// contains filtered or unexported fields
}
DirectorySetMetadataResponse ...
func (DirectorySetMetadataResponse) Date ¶
func (dsmr DirectorySetMetadataResponse) Date() time.Time
Date returns the value for header Date.
func (DirectorySetMetadataResponse) ETag ¶
func (dsmr DirectorySetMetadataResponse) ETag() ETag
ETag returns the value for header ETag.
func (DirectorySetMetadataResponse) ErrorCode ¶
func (dsmr DirectorySetMetadataResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (DirectorySetMetadataResponse) IsServerEncrypted ¶
func (dsmr DirectorySetMetadataResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (DirectorySetMetadataResponse) RequestID ¶
func (dsmr DirectorySetMetadataResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (DirectorySetMetadataResponse) Response ¶
func (dsmr DirectorySetMetadataResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (DirectorySetMetadataResponse) Status ¶
func (dsmr DirectorySetMetadataResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (DirectorySetMetadataResponse) StatusCode ¶
func (dsmr DirectorySetMetadataResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (DirectorySetMetadataResponse) Version ¶
func (dsmr DirectorySetMetadataResponse) Version() string
Version returns the value for header x-ms-version.
type DirectorySetPropertiesResponse ¶
type DirectorySetPropertiesResponse struct {
// contains filtered or unexported fields
}
DirectorySetPropertiesResponse ...
func (DirectorySetPropertiesResponse) Date ¶
func (dspr DirectorySetPropertiesResponse) Date() time.Time
Date returns the value for header Date.
func (DirectorySetPropertiesResponse) ETag ¶
func (dspr DirectorySetPropertiesResponse) ETag() ETag
ETag returns the value for header ETag.
func (DirectorySetPropertiesResponse) ErrorCode ¶
func (dspr DirectorySetPropertiesResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (DirectorySetPropertiesResponse) FileAttributes ¶
func (dspr DirectorySetPropertiesResponse) FileAttributes() string
FileAttributes returns the value for header x-ms-file-attributes.
func (DirectorySetPropertiesResponse) FileChangeTime ¶
func (dspr DirectorySetPropertiesResponse) FileChangeTime() string
FileChangeTime returns the value for header x-ms-file-change-time.
func (DirectorySetPropertiesResponse) FileCreationTime ¶
func (dspr DirectorySetPropertiesResponse) FileCreationTime() string
FileCreationTime returns the value for header x-ms-file-creation-time.
func (DirectorySetPropertiesResponse) FileID ¶
func (dspr DirectorySetPropertiesResponse) FileID() string
FileID returns the value for header x-ms-file-id.
func (DirectorySetPropertiesResponse) FileLastWriteTime ¶
func (dspr DirectorySetPropertiesResponse) FileLastWriteTime() string
FileLastWriteTime returns the value for header x-ms-file-last-write-time.
func (DirectorySetPropertiesResponse) FileParentID ¶
func (dspr DirectorySetPropertiesResponse) FileParentID() string
FileParentID returns the value for header x-ms-file-parent-id.
func (DirectorySetPropertiesResponse) FilePermissionKey ¶
func (dspr DirectorySetPropertiesResponse) FilePermissionKey() string
FilePermissionKey returns the value for header x-ms-file-permission-key.
func (DirectorySetPropertiesResponse) IsServerEncrypted ¶
func (dspr DirectorySetPropertiesResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (DirectorySetPropertiesResponse) LastModified ¶
func (dspr DirectorySetPropertiesResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (DirectorySetPropertiesResponse) RequestID ¶
func (dspr DirectorySetPropertiesResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (DirectorySetPropertiesResponse) Response ¶
func (dspr DirectorySetPropertiesResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (DirectorySetPropertiesResponse) Status ¶
func (dspr DirectorySetPropertiesResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (DirectorySetPropertiesResponse) StatusCode ¶
func (dspr DirectorySetPropertiesResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (DirectorySetPropertiesResponse) Version ¶
func (dspr DirectorySetPropertiesResponse) Version() string
Version returns the value for header x-ms-version.
type DirectoryURL ¶
type DirectoryURL struct {
// contains filtered or unexported fields
}
A DirectoryURL represents a URL to the Azure Storage directory allowing you to manipulate its directories and files.
func NewDirectoryURL ¶
func NewDirectoryURL(url url.URL, p pipeline.Pipeline) DirectoryURL
NewDirectoryURL creates a DirectoryURL object using the specified URL and request policy pipeline. Note: p can't be nil.
func (DirectoryURL) Create ¶
func (d DirectoryURL) Create(ctx context.Context, metadata Metadata, properties SMBProperties) (*DirectoryCreateResponse, error)
Create creates a new directory within a storage account. For more information, see https://docs.microsoft.com/rest/api/storageservices/create-directory. Pass default values for SMB properties (ex: "None" for file attributes). If permissions is empty, the default permission "inherit" is used. For SDDL strings over 9KB, upload using ShareURL.CreatePermission, and supply the permissionKey.
func (DirectoryURL) Delete ¶
func (d DirectoryURL) Delete(ctx context.Context) (*DirectoryDeleteResponse, error)
Delete removes the specified empty directory. Note that the directory must be empty before it can be deleted.. For more information, see https://docs.microsoft.com/rest/api/storageservices/delete-directory.
func (DirectoryURL) GetProperties ¶
func (d DirectoryURL) GetProperties(ctx context.Context) (*DirectoryGetPropertiesResponse, error)
GetProperties returns the directory's metadata and system properties. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/get-directory-properties.
func (DirectoryURL) ListFilesAndDirectoriesSegment ¶
func (d DirectoryURL) ListFilesAndDirectoriesSegment(ctx context.Context, marker Marker, o ListFilesAndDirectoriesOptions) (*ListFilesAndDirectoriesSegmentResponse, error)
ListFilesAndDirectoriesSegment returns a single segment of files and directories starting from the specified Marker. Use an empty Marker to start enumeration from the beginning. File and directory names are returned in lexicographic order. After getting a segment, process it, and then call ListFilesAndDirectoriesSegment again (passing the the previously-returned Marker) to get the next segment. This method lists the contents only for a single level of the directory hierarchy. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/list-directories-and-files.
func (DirectoryURL) NewDirectoryURL ¶
func (d DirectoryURL) NewDirectoryURL(directoryName string) DirectoryURL
NewDirectoryURL creates a new DirectoryURL object by concatenating directoryName to the end of DirectoryURL's URL. The new DirectoryURL uses the same request policy pipeline as the DirectoryURL. To change the pipeline, create the DirectoryURL and then call its WithPipeline method passing in the desired pipeline object. Or, call this package's NewDirectoryURL instead of calling this object's NewDirectoryURL method.
func (DirectoryURL) NewFileURL ¶
func (d DirectoryURL) NewFileURL(fileName string) FileURL
NewFileURL creates a new FileURL object by concatenating fileName to the end of DirectoryURL's URL. The new FileURL uses the same request policy pipeline as the DirectoryURL. To change the pipeline, create the FileURL and then call its WithPipeline method passing in the desired pipeline object. Or, call this package's NewFileURL instead of calling this object's NewFileURL method.
func (DirectoryURL) SetMetadata ¶
func (d DirectoryURL) SetMetadata(ctx context.Context, metadata Metadata) (*DirectorySetMetadataResponse, error)
SetMetadata sets the directory's metadata. For more information, see https://docs.microsoft.com/rest/api/storageservices/set-directory-metadata.
func (DirectoryURL) SetProperties ¶
func (d DirectoryURL) SetProperties(ctx context.Context, properties SMBProperties) (*DirectorySetPropertiesResponse, error)
SetProperties sets the directory's metadata and system properties. Preserves values for SMB properties. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/set-directory-properties.
func (DirectoryURL) String ¶
func (d DirectoryURL) String() string
String returns the URL as a string.
func (DirectoryURL) URL ¶
func (d DirectoryURL) URL() url.URL
URL returns the URL endpoint used by the DirectoryURL object.
func (DirectoryURL) WithPipeline ¶
func (d DirectoryURL) WithPipeline(p pipeline.Pipeline) DirectoryURL
WithPipeline creates a new DirectoryURL object identical to the source but with the specified request policy pipeline.
type DownloadFromAzureFileOptions ¶
type DownloadFromAzureFileOptions struct { // RangeSize specifies the range size to use in each parallel download; the default is FileMaxUploadRangeBytes. RangeSize int64 // Progress is a function that is invoked periodically as bytes are recieved. Progress pipeline.ProgressReceiver // Parallelism indicates the maximum number of ranges to download in parallel. If 0(default) is provided, 5 parallelism will be used by default. Parallelism uint16 // Max retry requests used during reading data for each range. MaxRetryRequestsPerRange int }
DownloadFromAzureFileOptions identifies options used by the DownloadAzureFileToBuffer and DownloadAzureFileToFile functions.
type DownloadResponse ¶
type DownloadResponse struct {
// contains filtered or unexported fields
}
DownloadResponse - Wraps the response from the fileClient.Download method.
func (DownloadResponse) AcceptRanges ¶
func (dr DownloadResponse) AcceptRanges() string
AcceptRanges returns the value for header Accept-Ranges.
func (DownloadResponse) Body ¶
func (dr DownloadResponse) Body() io.ReadCloser
Body returns the raw HTTP response object's Body.
func (DownloadResponse) CacheControl ¶
func (dr DownloadResponse) CacheControl() string
CacheControl returns the value for header Cache-Control.
func (DownloadResponse) ContentDisposition ¶
func (dr DownloadResponse) ContentDisposition() string
ContentDisposition returns the value for header Content-Disposition.
func (DownloadResponse) ContentEncoding ¶
func (dr DownloadResponse) ContentEncoding() string
ContentEncoding returns the value for header Content-Encoding.
func (DownloadResponse) ContentLanguage ¶
func (dr DownloadResponse) ContentLanguage() string
ContentLanguage returns the value for header Content-Language.
func (DownloadResponse) ContentLength ¶
func (dr DownloadResponse) ContentLength() int64
ContentLength returns the value for header Content-Length.
func (DownloadResponse) ContentMD5 ¶
func (dr DownloadResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (DownloadResponse) ContentRange ¶
func (dr DownloadResponse) ContentRange() string
ContentRange returns the value for header Content-Range.
func (DownloadResponse) ContentType ¶
func (dr DownloadResponse) ContentType() string
ContentType returns the value for header Content-Type.
func (DownloadResponse) CopyCompletionTime ¶
func (dr DownloadResponse) CopyCompletionTime() time.Time
CopyCompletionTime returns the value for header x-ms-copy-completion-time.
func (DownloadResponse) CopyID ¶
func (dr DownloadResponse) CopyID() string
CopyID returns the value for header x-ms-copy-id.
func (DownloadResponse) CopyProgress ¶
func (dr DownloadResponse) CopyProgress() string
CopyProgress returns the value for header x-ms-copy-progress.
func (DownloadResponse) CopySource ¶
func (dr DownloadResponse) CopySource() string
CopySource returns the value for header x-ms-copy-source.
func (DownloadResponse) CopyStatus ¶
func (dr DownloadResponse) CopyStatus() CopyStatusType
CopyStatus returns the value for header x-ms-copy-status.
func (DownloadResponse) CopyStatusDescription ¶
func (dr DownloadResponse) CopyStatusDescription() string
CopyStatusDescription returns the value for header x-ms-copy-status-description.
func (DownloadResponse) Date ¶
func (dr DownloadResponse) Date() time.Time
Date returns the value for header Date.
func (DownloadResponse) ETag ¶
func (dr DownloadResponse) ETag() ETag
ETag returns the value for header ETag.
func (DownloadResponse) ErrorCode ¶
func (dr DownloadResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (DownloadResponse) FileAttributes ¶
func (dr DownloadResponse) FileAttributes() string
FileAttributes returns the value for header x-ms-file-attributes.
func (DownloadResponse) FileChangeTime ¶
func (dr DownloadResponse) FileChangeTime() string
FileChangeTime returns the value for header x-ms-file-change-time.
func (DownloadResponse) FileContentMD5 ¶
func (dr DownloadResponse) FileContentMD5() []byte
FileContentMD5 returns the value for header x-ms-content-md5.
func (DownloadResponse) FileCreationTime ¶
func (dr DownloadResponse) FileCreationTime() string
FileCreationTime returns the value for header x-ms-file-creation-time.
func (DownloadResponse) FileID ¶
func (dr DownloadResponse) FileID() string
FileID returns the value for header x-ms-file-id.
func (DownloadResponse) FileLastWriteTime ¶
func (dr DownloadResponse) FileLastWriteTime() string
FileLastWriteTime returns the value for header x-ms-file-last-write-time.
func (DownloadResponse) FileParentID ¶
func (dr DownloadResponse) FileParentID() string
FileParentID returns the value for header x-ms-file-parent-id.
func (DownloadResponse) FilePermissionKey ¶
func (dr DownloadResponse) FilePermissionKey() string
FilePermissionKey returns the value for header x-ms-file-permission-key.
func (DownloadResponse) IsServerEncrypted ¶
func (dr DownloadResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-server-encrypted.
func (DownloadResponse) LastModified ¶
func (dr DownloadResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (DownloadResponse) NewMetadata ¶
func (dr DownloadResponse) NewMetadata() Metadata
NewMetadata returns user-defined key/value pairs.
func (DownloadResponse) RequestID ¶
func (dr DownloadResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (DownloadResponse) Response ¶
func (dr DownloadResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (DownloadResponse) Status ¶
func (dr DownloadResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (DownloadResponse) StatusCode ¶
func (dr DownloadResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (DownloadResponse) Version ¶
func (dr DownloadResponse) Version() string
Version returns the value for header x-ms-version.
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 FileAbortCopyResponse ¶
type FileAbortCopyResponse struct {
// contains filtered or unexported fields
}
FileAbortCopyResponse ...
func (FileAbortCopyResponse) Date ¶
func (facr FileAbortCopyResponse) Date() time.Time
Date returns the value for header Date.
func (FileAbortCopyResponse) ErrorCode ¶
func (facr FileAbortCopyResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (FileAbortCopyResponse) RequestID ¶
func (facr FileAbortCopyResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (FileAbortCopyResponse) Response ¶
func (facr FileAbortCopyResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (FileAbortCopyResponse) Status ¶
func (facr FileAbortCopyResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (FileAbortCopyResponse) StatusCode ¶
func (facr FileAbortCopyResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (FileAbortCopyResponse) Version ¶
func (facr FileAbortCopyResponse) Version() string
Version returns the value for header x-ms-version.
type FileAttributeFlags ¶
type FileAttributeFlags uint32
FileAttributeFlags are a subset of the WinNT.h file attribute bitflags. The uint32 returned from golang.org/x/sys/windows' GetFileAttributes func can be converted directly without worry, since both types are uint32, and the numeric values line up. However, crafting these manually is acceptable via the .Add function. Removing properties is done via .Remove. Checking if one contains another can be done with .Has The subset is listed at: https://docs.microsoft.com/en-us/rest/api/storageservices/set-file-properties#file-system-attributes and the values are listed at: https://www.magnumdb.com/search?q=filename%3Awinnt.h+AND+FILE_ATTRIBUTE_* This is intended for easy conversion from the following function: https://pkg.go.dev/golang.org/x/sys/windows?tab=doc#GetFileAttributes
const ( FileAttributeNone FileAttributeFlags = 0 FileAttributeReadonly FileAttributeFlags = 1 FileAttributeHidden FileAttributeFlags = 2 FileAttributeSystem FileAttributeFlags = 4 FileAttributeArchive FileAttributeFlags = 32 FileAttributeTemporary FileAttributeFlags = 256 FileAttributeOffline FileAttributeFlags = 4096 FileAttributeNotContentIndexed FileAttributeFlags = 8192 FileAttributeNoScrubData FileAttributeFlags = 131072 )
func ParseFileAttributeFlagsString ¶
func ParseFileAttributeFlagsString(input string) (out FileAttributeFlags)
ParseFileAttributeFlagsString parses the service-side file attribute strings that the above enum strongly types.
func (FileAttributeFlags) Add ¶
func (f FileAttributeFlags) Add(new FileAttributeFlags) FileAttributeFlags
func (FileAttributeFlags) Has ¶
func (f FileAttributeFlags) Has(item FileAttributeFlags) bool
func (FileAttributeFlags) Remove ¶
func (f FileAttributeFlags) Remove(old FileAttributeFlags) FileAttributeFlags
func (FileAttributeFlags) String ¶
func (f FileAttributeFlags) String() (out string)
type FileCreateResponse ¶
type FileCreateResponse struct {
// contains filtered or unexported fields
}
FileCreateResponse ...
func (FileCreateResponse) Date ¶
func (fcr FileCreateResponse) Date() time.Time
Date returns the value for header Date.
func (FileCreateResponse) ETag ¶
func (fcr FileCreateResponse) ETag() ETag
ETag returns the value for header ETag.
func (FileCreateResponse) ErrorCode ¶
func (fcr FileCreateResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (FileCreateResponse) FileAttributes ¶
func (fcr FileCreateResponse) FileAttributes() string
FileAttributes returns the value for header x-ms-file-attributes.
func (FileCreateResponse) FileChangeTime ¶
func (fcr FileCreateResponse) FileChangeTime() string
FileChangeTime returns the value for header x-ms-file-change-time.
func (FileCreateResponse) FileCreationTime ¶
func (fcr FileCreateResponse) FileCreationTime() string
FileCreationTime returns the value for header x-ms-file-creation-time.
func (FileCreateResponse) FileID ¶
func (fcr FileCreateResponse) FileID() string
FileID returns the value for header x-ms-file-id.
func (FileCreateResponse) FileLastWriteTime ¶
func (fcr FileCreateResponse) FileLastWriteTime() string
FileLastWriteTime returns the value for header x-ms-file-last-write-time.
func (FileCreateResponse) FileParentID ¶
func (fcr FileCreateResponse) FileParentID() string
FileParentID returns the value for header x-ms-file-parent-id.
func (FileCreateResponse) FilePermissionKey ¶
func (fcr FileCreateResponse) FilePermissionKey() string
FilePermissionKey returns the value for header x-ms-file-permission-key.
func (FileCreateResponse) IsServerEncrypted ¶
func (fcr FileCreateResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (FileCreateResponse) LastModified ¶
func (fcr FileCreateResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (FileCreateResponse) RequestID ¶
func (fcr FileCreateResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (FileCreateResponse) Response ¶
func (fcr FileCreateResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (FileCreateResponse) Status ¶
func (fcr FileCreateResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (FileCreateResponse) StatusCode ¶
func (fcr FileCreateResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (FileCreateResponse) Version ¶
func (fcr FileCreateResponse) Version() string
Version returns the value for header x-ms-version.
type FileDeleteResponse ¶
type FileDeleteResponse struct {
// contains filtered or unexported fields
}
FileDeleteResponse ...
func (FileDeleteResponse) Date ¶
func (fdr FileDeleteResponse) Date() time.Time
Date returns the value for header Date.
func (FileDeleteResponse) ErrorCode ¶
func (fdr FileDeleteResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (FileDeleteResponse) RequestID ¶
func (fdr FileDeleteResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (FileDeleteResponse) Response ¶
func (fdr FileDeleteResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (FileDeleteResponse) Status ¶
func (fdr FileDeleteResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (FileDeleteResponse) StatusCode ¶
func (fdr FileDeleteResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (FileDeleteResponse) Version ¶
func (fdr FileDeleteResponse) Version() string
Version returns the value for header x-ms-version.
type FileForceCloseHandlesResponse ¶
type FileForceCloseHandlesResponse struct {
// contains filtered or unexported fields
}
FileForceCloseHandlesResponse ...
func (FileForceCloseHandlesResponse) Date ¶
func (ffchr FileForceCloseHandlesResponse) Date() time.Time
Date returns the value for header Date.
func (FileForceCloseHandlesResponse) ErrorCode ¶
func (ffchr FileForceCloseHandlesResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (FileForceCloseHandlesResponse) Marker ¶
func (ffchr FileForceCloseHandlesResponse) Marker() string
Marker returns the value for header x-ms-marker.
func (FileForceCloseHandlesResponse) NumberOfHandlesClosed ¶
func (ffchr FileForceCloseHandlesResponse) NumberOfHandlesClosed() int32
NumberOfHandlesClosed returns the value for header x-ms-number-of-handles-closed.
func (FileForceCloseHandlesResponse) RequestID ¶
func (ffchr FileForceCloseHandlesResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (FileForceCloseHandlesResponse) Response ¶
func (ffchr FileForceCloseHandlesResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (FileForceCloseHandlesResponse) Status ¶
func (ffchr FileForceCloseHandlesResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (FileForceCloseHandlesResponse) StatusCode ¶
func (ffchr FileForceCloseHandlesResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (FileForceCloseHandlesResponse) Version ¶
func (ffchr FileForceCloseHandlesResponse) Version() string
Version returns the value for header x-ms-version.
type FileGetPropertiesResponse ¶
type FileGetPropertiesResponse struct {
// contains filtered or unexported fields
}
FileGetPropertiesResponse ...
func DownloadAzureFileToBuffer ¶
func DownloadAzureFileToBuffer(ctx context.Context, fileURL FileURL, b []byte, o DownloadFromAzureFileOptions) (*FileGetPropertiesResponse, error)
DownloadAzureFileToBuffer downloads an Azure file to a buffer with parallel.
func DownloadAzureFileToFile ¶
func DownloadAzureFileToFile(ctx context.Context, fileURL FileURL, file *os.File, o DownloadFromAzureFileOptions) (*FileGetPropertiesResponse, error)
DownloadAzureFileToFile downloads an Azure file to a local file. The file would be created if it doesn't exist, and would be truncated if the size doesn't match. Note: file can't be nil.
func (FileGetPropertiesResponse) CacheControl ¶
func (fgpr FileGetPropertiesResponse) CacheControl() string
CacheControl returns the value for header Cache-Control.
func (FileGetPropertiesResponse) ContentDisposition ¶
func (fgpr FileGetPropertiesResponse) ContentDisposition() string
ContentDisposition returns the value for header Content-Disposition.
func (FileGetPropertiesResponse) ContentEncoding ¶
func (fgpr FileGetPropertiesResponse) ContentEncoding() string
ContentEncoding returns the value for header Content-Encoding.
func (FileGetPropertiesResponse) ContentLanguage ¶
func (fgpr FileGetPropertiesResponse) ContentLanguage() string
ContentLanguage returns the value for header Content-Language.
func (FileGetPropertiesResponse) ContentLength ¶
func (fgpr FileGetPropertiesResponse) ContentLength() int64
ContentLength returns the value for header Content-Length.
func (FileGetPropertiesResponse) ContentMD5 ¶
func (fgpr FileGetPropertiesResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (FileGetPropertiesResponse) ContentType ¶
func (fgpr FileGetPropertiesResponse) ContentType() string
ContentType returns the value for header Content-Type.
func (FileGetPropertiesResponse) CopyCompletionTime ¶
func (fgpr FileGetPropertiesResponse) CopyCompletionTime() time.Time
CopyCompletionTime returns the value for header x-ms-copy-completion-time.
func (FileGetPropertiesResponse) CopyID ¶
func (fgpr FileGetPropertiesResponse) CopyID() string
CopyID returns the value for header x-ms-copy-id.
func (FileGetPropertiesResponse) CopyProgress ¶
func (fgpr FileGetPropertiesResponse) CopyProgress() string
CopyProgress returns the value for header x-ms-copy-progress.
func (FileGetPropertiesResponse) CopySource ¶
func (fgpr FileGetPropertiesResponse) CopySource() string
CopySource returns the value for header x-ms-copy-source.
func (FileGetPropertiesResponse) CopyStatus ¶
func (fgpr FileGetPropertiesResponse) CopyStatus() CopyStatusType
CopyStatus returns the value for header x-ms-copy-status.
func (FileGetPropertiesResponse) CopyStatusDescription ¶
func (fgpr FileGetPropertiesResponse) CopyStatusDescription() string
CopyStatusDescription returns the value for header x-ms-copy-status-description.
func (FileGetPropertiesResponse) Date ¶
func (fgpr FileGetPropertiesResponse) Date() time.Time
Date returns the value for header Date.
func (FileGetPropertiesResponse) ETag ¶
func (fgpr FileGetPropertiesResponse) ETag() ETag
ETag returns the value for header ETag.
func (FileGetPropertiesResponse) ErrorCode ¶
func (fgpr FileGetPropertiesResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (FileGetPropertiesResponse) FileAttributes ¶
func (fgpr FileGetPropertiesResponse) FileAttributes() string
FileAttributes returns the value for header x-ms-file-attributes.
func (FileGetPropertiesResponse) FileChangeTime ¶
func (fgpr FileGetPropertiesResponse) FileChangeTime() string
FileChangeTime returns the value for header x-ms-file-change-time.
func (FileGetPropertiesResponse) FileCreationTime ¶
func (fgpr FileGetPropertiesResponse) FileCreationTime() string
FileCreationTime returns the value for header x-ms-file-creation-time.
func (FileGetPropertiesResponse) FileID ¶
func (fgpr FileGetPropertiesResponse) FileID() string
FileID returns the value for header x-ms-file-id.
func (FileGetPropertiesResponse) FileLastWriteTime ¶
func (fgpr FileGetPropertiesResponse) FileLastWriteTime() string
FileLastWriteTime returns the value for header x-ms-file-last-write-time.
func (FileGetPropertiesResponse) FileParentID ¶
func (fgpr FileGetPropertiesResponse) FileParentID() string
FileParentID returns the value for header x-ms-file-parent-id.
func (FileGetPropertiesResponse) FilePermissionKey ¶
func (fgpr FileGetPropertiesResponse) FilePermissionKey() string
FilePermissionKey returns the value for header x-ms-file-permission-key.
func (FileGetPropertiesResponse) FileType ¶
func (fgpr FileGetPropertiesResponse) FileType() string
FileType returns the value for header x-ms-type.
func (FileGetPropertiesResponse) IsServerEncrypted ¶
func (fgpr FileGetPropertiesResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-server-encrypted.
func (FileGetPropertiesResponse) LastModified ¶
func (fgpr FileGetPropertiesResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (FileGetPropertiesResponse) NewHTTPHeaders ¶
func (fgpr FileGetPropertiesResponse) NewHTTPHeaders() FileHTTPHeaders
NewHTTPHeaders returns the user-modifiable properties for this file.
func (FileGetPropertiesResponse) NewMetadata ¶
func (fgpr FileGetPropertiesResponse) NewMetadata() Metadata
NewMetadata returns user-defined key/value pairs.
func (FileGetPropertiesResponse) RequestID ¶
func (fgpr FileGetPropertiesResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (FileGetPropertiesResponse) Response ¶
func (fgpr FileGetPropertiesResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (FileGetPropertiesResponse) Status ¶
func (fgpr FileGetPropertiesResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (FileGetPropertiesResponse) StatusCode ¶
func (fgpr FileGetPropertiesResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (FileGetPropertiesResponse) Version ¶
func (fgpr FileGetPropertiesResponse) Version() string
Version returns the value for header x-ms-version.
type FileHTTPHeaders ¶
type FileHTTPHeaders struct { ContentType string ContentMD5 []byte ContentEncoding string ContentLanguage string ContentDisposition string CacheControl string SMBProperties }
FileHTTPHeaders contains read/writeable file properties.
type FileItem ¶
type FileItem struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"File"` // Name - Name of the entry. Name string `xml:"Name"` Properties *FileProperty `xml:"Properties"` }
FileItem - Listed file item.
type FileProperty ¶
type FileProperty struct { // ContentLength - Content length of the file. This value may not be up-to-date since an SMB client may have modified the file locally. The value of Content-Length may not reflect that fact until the handle is closed or the op-lock is broken. To retrieve current property values, call Get File Properties. ContentLength int64 `xml:"Content-Length"` }
FileProperty - File properties.
type FileRangeWriteType ¶
type FileRangeWriteType string
FileRangeWriteType enumerates the values for file range write type.
const ( // FileRangeWriteClear ... FileRangeWriteClear FileRangeWriteType = "clear" // FileRangeWriteNone represents an empty FileRangeWriteType. FileRangeWriteNone FileRangeWriteType = "" // FileRangeWriteUpdate ... FileRangeWriteUpdate FileRangeWriteType = "update" )
func PossibleFileRangeWriteTypeValues ¶
func PossibleFileRangeWriteTypeValues() []FileRangeWriteType
PossibleFileRangeWriteTypeValues returns an array of possible values for the FileRangeWriteType const type.
type FileSASPermissions ¶
type FileSASPermissions struct{ Read, Create, Write, Delete bool }
The FileSASPermissions type simplifies creating the permissions string for an Azure Storage file SAS. Initialize an instance of this type and then call its String method to set FileSASSignatureValues's Permissions field.
func (*FileSASPermissions) Parse ¶
func (p *FileSASPermissions) Parse(s string) error
Parse initializes the FileSASPermissions's fields from a string.
func (FileSASPermissions) String ¶
func (p FileSASPermissions) String() string
String produces the SAS permissions string for an Azure Storage file. Call this method to set FileSASSignatureValues's Permissions field.
type FileSASSignatureValues ¶
type FileSASSignatureValues 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 ShareSASPermissions or FileSASPermissions and then call String() IPRange IPRange `param:"sip"` Identifier string `param:"si"` FilePath string // Ex: "directory/FileName" or "FileName". Use "" to create a Share SAS. CacheControl string // rscc ContentDisposition string // rscd ContentEncoding string // rsce ContentLanguage string // rscl ContentType string // rsct }
FileSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage share or file.
func (FileSASSignatureValues) NewSASQueryParameters ¶
func (v FileSASSignatureValues) NewSASQueryParameters(sharedKeyCredential *SharedKeyCredential) (SASQueryParameters, error)
NewSASQueryParameters uses an account's shared key credential to sign this signature values to produce the proper SAS query parameters.
type FileServiceProperties ¶
type FileServiceProperties struct { // HourMetrics - A summary of request statistics grouped by API in hourly aggregates for files. HourMetrics MetricProperties // MinuteMetrics - A summary of request statistics grouped by API in minute aggregates for files. MinuteMetrics MetricProperties // Cors - The set of CORS rules. Cors []CorsRule // contains filtered or unexported fields }
FileServiceProperties defines convenience struct for StorageServiceProperties
func (FileServiceProperties) RequestID ¶
func (fsp FileServiceProperties) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (FileServiceProperties) Response ¶
func (fsp FileServiceProperties) Response() *http.Response
Response returns the raw HTTP response object.
func (FileServiceProperties) Status ¶
func (fsp FileServiceProperties) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (FileServiceProperties) StatusCode ¶
func (fsp FileServiceProperties) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (FileServiceProperties) Version ¶
func (fsp FileServiceProperties) Version() string
Version returns the value for header x-ms-version.
type FileSetHTTPHeadersResponse ¶
type FileSetHTTPHeadersResponse struct {
// contains filtered or unexported fields
}
FileSetHTTPHeadersResponse ...
func (FileSetHTTPHeadersResponse) Date ¶
func (fshhr FileSetHTTPHeadersResponse) Date() time.Time
Date returns the value for header Date.
func (FileSetHTTPHeadersResponse) ETag ¶
func (fshhr FileSetHTTPHeadersResponse) ETag() ETag
ETag returns the value for header ETag.
func (FileSetHTTPHeadersResponse) ErrorCode ¶
func (fshhr FileSetHTTPHeadersResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (FileSetHTTPHeadersResponse) FileAttributes ¶
func (fshhr FileSetHTTPHeadersResponse) FileAttributes() string
FileAttributes returns the value for header x-ms-file-attributes.
func (FileSetHTTPHeadersResponse) FileChangeTime ¶
func (fshhr FileSetHTTPHeadersResponse) FileChangeTime() string
FileChangeTime returns the value for header x-ms-file-change-time.
func (FileSetHTTPHeadersResponse) FileCreationTime ¶
func (fshhr FileSetHTTPHeadersResponse) FileCreationTime() string
FileCreationTime returns the value for header x-ms-file-creation-time.
func (FileSetHTTPHeadersResponse) FileID ¶
func (fshhr FileSetHTTPHeadersResponse) FileID() string
FileID returns the value for header x-ms-file-id.
func (FileSetHTTPHeadersResponse) FileLastWriteTime ¶
func (fshhr FileSetHTTPHeadersResponse) FileLastWriteTime() string
FileLastWriteTime returns the value for header x-ms-file-last-write-time.
func (FileSetHTTPHeadersResponse) FileParentID ¶
func (fshhr FileSetHTTPHeadersResponse) FileParentID() string
FileParentID returns the value for header x-ms-file-parent-id.
func (FileSetHTTPHeadersResponse) FilePermissionKey ¶
func (fshhr FileSetHTTPHeadersResponse) FilePermissionKey() string
FilePermissionKey returns the value for header x-ms-file-permission-key.
func (FileSetHTTPHeadersResponse) IsServerEncrypted ¶
func (fshhr FileSetHTTPHeadersResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (FileSetHTTPHeadersResponse) LastModified ¶
func (fshhr FileSetHTTPHeadersResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (FileSetHTTPHeadersResponse) RequestID ¶
func (fshhr FileSetHTTPHeadersResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (FileSetHTTPHeadersResponse) Response ¶
func (fshhr FileSetHTTPHeadersResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (FileSetHTTPHeadersResponse) Status ¶
func (fshhr FileSetHTTPHeadersResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (FileSetHTTPHeadersResponse) StatusCode ¶
func (fshhr FileSetHTTPHeadersResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (FileSetHTTPHeadersResponse) Version ¶
func (fshhr FileSetHTTPHeadersResponse) Version() string
Version returns the value for header x-ms-version.
type FileSetMetadataResponse ¶
type FileSetMetadataResponse struct {
// contains filtered or unexported fields
}
FileSetMetadataResponse ...
func (FileSetMetadataResponse) Date ¶
func (fsmr FileSetMetadataResponse) Date() time.Time
Date returns the value for header Date.
func (FileSetMetadataResponse) ETag ¶
func (fsmr FileSetMetadataResponse) ETag() ETag
ETag returns the value for header ETag.
func (FileSetMetadataResponse) ErrorCode ¶
func (fsmr FileSetMetadataResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (FileSetMetadataResponse) IsServerEncrypted ¶
func (fsmr FileSetMetadataResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (FileSetMetadataResponse) RequestID ¶
func (fsmr FileSetMetadataResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (FileSetMetadataResponse) Response ¶
func (fsmr FileSetMetadataResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (FileSetMetadataResponse) Status ¶
func (fsmr FileSetMetadataResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (FileSetMetadataResponse) StatusCode ¶
func (fsmr FileSetMetadataResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (FileSetMetadataResponse) Version ¶
func (fsmr FileSetMetadataResponse) Version() string
Version returns the value for header x-ms-version.
type FileStartCopyResponse ¶
type FileStartCopyResponse struct {
// contains filtered or unexported fields
}
FileStartCopyResponse ...
func (FileStartCopyResponse) CopyID ¶
func (fscr FileStartCopyResponse) CopyID() string
CopyID returns the value for header x-ms-copy-id.
func (FileStartCopyResponse) CopyStatus ¶
func (fscr FileStartCopyResponse) CopyStatus() CopyStatusType
CopyStatus returns the value for header x-ms-copy-status.
func (FileStartCopyResponse) Date ¶
func (fscr FileStartCopyResponse) Date() time.Time
Date returns the value for header Date.
func (FileStartCopyResponse) ETag ¶
func (fscr FileStartCopyResponse) ETag() ETag
ETag returns the value for header ETag.
func (FileStartCopyResponse) ErrorCode ¶
func (fscr FileStartCopyResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (FileStartCopyResponse) LastModified ¶
func (fscr FileStartCopyResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (FileStartCopyResponse) RequestID ¶
func (fscr FileStartCopyResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (FileStartCopyResponse) Response ¶
func (fscr FileStartCopyResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (FileStartCopyResponse) Status ¶
func (fscr FileStartCopyResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (FileStartCopyResponse) StatusCode ¶
func (fscr FileStartCopyResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (FileStartCopyResponse) Version ¶
func (fscr FileStartCopyResponse) Version() string
Version returns the value for header x-ms-version.
type FileURL ¶
type FileURL struct {
// contains filtered or unexported fields
}
A FileURL represents a URL to an Azure Storage file.
func NewFileURL ¶
NewFileURL creates a FileURL object using the specified URL and request policy pipeline. Note: p can't be nil.
func (FileURL) AbortCopy ¶
AbortCopy stops a pending copy that was previously started and leaves a destination file with 0 length and metadata. For more information, see https://docs.microsoft.com/rest/api/storageservices/abort-copy-file.
func (FileURL) ClearRange ¶
func (f FileURL) ClearRange(ctx context.Context, offset int64, count int64) (*FileUploadRangeResponse, error)
ClearRange clears the specified range and releases the space used in storage for that range. offset means the start offset of the range to clear. count means count of bytes to clean, it cannot be CountToEnd (0), and must be explictly specified. If the range specified is not 512-byte aligned, the operation will write zeros to the start or end of the range that is not 512-byte aligned and free the rest of the range inside that is 512-byte aligned. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/put-range.
func (FileURL) Create ¶
func (f FileURL) Create(ctx context.Context, size int64, h FileHTTPHeaders, metadata Metadata) (*FileCreateResponse, error)
Create creates a new file or replaces a file. Note that this method only initializes the file. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/create-file. Pass default values for SMB properties (ex: "None" for file attributes).
func (FileURL) Delete ¶
func (f FileURL) Delete(ctx context.Context) (*FileDeleteResponse, error)
Delete immediately removes the file from the storage account. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-file2.
func (FileURL) Download ¶
func (f FileURL) Download(ctx context.Context, offset int64, count int64, rangeGetContentMD5 bool) (*RetryableDownloadResponse, error)
Download downloads count bytes of data from the start offset. The response includes all of the file’s properties. However, passing true for rangeGetContentMD5 returns the range’s MD5 in the ContentMD5 response header/property if the range is <= 4MB; the HTTP request fails with 400 (Bad Request) if the requested range is greater than 4MB. Note: offset must be >=0, count must be >= 0. If count is CountToEnd (0), then data is read from specified offset to the end. rangeGetContentMD5 only works with partial data downloading. For more information, see https://docs.microsoft.com/rest/api/storageservices/get-file.
func (FileURL) GetProperties ¶
func (f FileURL) GetProperties(ctx context.Context) (*FileGetPropertiesResponse, error)
GetProperties returns the file's metadata and properties. For more information, see https://docs.microsoft.com/rest/api/storageservices/get-file-properties.
func (FileURL) GetRangeList ¶
GetRangeList returns the list of valid ranges for a file. Use a count with value CountToEnd (0) to indicate the left part of file start from offset. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/list-ranges.
func (FileURL) Resize ¶
Resize resizes the file to the specified size. For more information, see https://docs.microsoft.com/rest/api/storageservices/set-file-properties.
func (FileURL) SetHTTPHeaders ¶
func (f FileURL) SetHTTPHeaders(ctx context.Context, h FileHTTPHeaders) (*FileSetHTTPHeadersResponse, error)
SetHTTPHeaders sets file's system properties. For more information, see https://docs.microsoft.com/rest/api/storageservices/set-file-properties.
func (FileURL) SetMetadata ¶
func (f FileURL) SetMetadata(ctx context.Context, metadata Metadata) (*FileSetMetadataResponse, error)
SetMetadata sets a file's metadata. https://docs.microsoft.com/rest/api/storageservices/set-file-metadata.
func (FileURL) StartCopy ¶
func (f FileURL) StartCopy(ctx context.Context, source url.URL, metadata Metadata) (*FileStartCopyResponse, error)
StartCopy copies the data at the source URL to a file. For more information, see https://docs.microsoft.com/rest/api/storageservices/copy-file.
func (FileURL) UploadRange ¶
func (f FileURL) UploadRange(ctx context.Context, offset int64, body io.ReadSeeker, transactionalMD5 []byte) (*FileUploadRangeResponse, error)
UploadRange writes bytes to a file. offset indicates the offset at which to begin writing, in bytes. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/put-range.
func (FileURL) UploadRangeFromURL ¶
func (f FileURL) UploadRangeFromURL(ctx context.Context, sourceURL url.URL, sourceOffset int64, destOffset int64, count int64) (*FileUploadRangeFromURLResponse, error)
Update range with bytes from a specific URL. offset indicates the offset at which to begin writing, in bytes.
func (FileURL) WithPipeline ¶
WithPipeline creates a new FileURL object identical to the source but with the specified request policy pipeline.
func (FileURL) WithSnapshot ¶
WithSnapshot creates a new FileURL object identical to the source but with the specified share snapshot timestamp. Pass time.Time{} to remove the share snapshot returning a URL to the base file.
type FileURLParts ¶
type FileURLParts struct { Scheme string // Ex: "https://" Host string // Ex: "account.share.core.windows.net", "10.132.141.33", "10.132.141.33:80" DirectoryOrFilePath string // Path of directory or file, Ex: "mydirectory/myfile" SAS SASQueryParameters UnparsedParams string IPEndpointStyleInfo IPEndpointStyleInfo // Useful Parts for IP endpoint style URL. }
A FileURLParts object represents the components that make up an Azure Storage Share/Directory/File URL. You parse an existing URL into its parts by calling NewFileURLParts(). You construct a URL from parts by calling URL(). NOTE: Changing any SAS-related field requires computing a new SAS signature.
func NewFileURLParts ¶
func NewFileURLParts(u url.URL) FileURLParts
NewFileURLParts parses a URL initializing FileURLParts' fields including any SAS-related & sharesnapshot query parameters. Any other query parameters remain in the UnparsedParams field. This method overwrites all fields in the FileURLParts object.
func (FileURLParts) URL ¶
func (up FileURLParts) URL() url.URL
URL returns a URL object whose fields are initialized from the FileURLParts fields. The URL's RawQuery field contains the SAS, snapshot, and unparsed query parameters.
type FileUploadRangeFromURLResponse ¶
type FileUploadRangeFromURLResponse struct {
// contains filtered or unexported fields
}
FileUploadRangeFromURLResponse ...
func (FileUploadRangeFromURLResponse) Date ¶
func (furfur FileUploadRangeFromURLResponse) Date() time.Time
Date returns the value for header Date.
func (FileUploadRangeFromURLResponse) ETag ¶
func (furfur FileUploadRangeFromURLResponse) ETag() ETag
ETag returns the value for header ETag.
func (FileUploadRangeFromURLResponse) ErrorCode ¶
func (furfur FileUploadRangeFromURLResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (FileUploadRangeFromURLResponse) IsServerEncrypted ¶
func (furfur FileUploadRangeFromURLResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (FileUploadRangeFromURLResponse) LastModified ¶
func (furfur FileUploadRangeFromURLResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (FileUploadRangeFromURLResponse) RequestID ¶
func (furfur FileUploadRangeFromURLResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (FileUploadRangeFromURLResponse) Response ¶
func (furfur FileUploadRangeFromURLResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (FileUploadRangeFromURLResponse) Status ¶
func (furfur FileUploadRangeFromURLResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (FileUploadRangeFromURLResponse) StatusCode ¶
func (furfur FileUploadRangeFromURLResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (FileUploadRangeFromURLResponse) Version ¶
func (furfur FileUploadRangeFromURLResponse) Version() string
Version returns the value for header x-ms-version.
func (FileUploadRangeFromURLResponse) XMsContentCrc64 ¶
func (furfur FileUploadRangeFromURLResponse) XMsContentCrc64() []byte
XMsContentCrc64 returns the value for header x-ms-content-crc64.
type FileUploadRangeResponse ¶
type FileUploadRangeResponse struct {
// contains filtered or unexported fields
}
FileUploadRangeResponse ...
func (FileUploadRangeResponse) ContentMD5 ¶
func (furr FileUploadRangeResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (FileUploadRangeResponse) Date ¶
func (furr FileUploadRangeResponse) Date() time.Time
Date returns the value for header Date.
func (FileUploadRangeResponse) ETag ¶
func (furr FileUploadRangeResponse) ETag() ETag
ETag returns the value for header ETag.
func (FileUploadRangeResponse) ErrorCode ¶
func (furr FileUploadRangeResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (FileUploadRangeResponse) IsServerEncrypted ¶
func (furr FileUploadRangeResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-request-server-encrypted.
func (FileUploadRangeResponse) LastModified ¶
func (furr FileUploadRangeResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (FileUploadRangeResponse) RequestID ¶
func (furr FileUploadRangeResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (FileUploadRangeResponse) Response ¶
func (furr FileUploadRangeResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (FileUploadRangeResponse) Status ¶
func (furr FileUploadRangeResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (FileUploadRangeResponse) StatusCode ¶
func (furr FileUploadRangeResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (FileUploadRangeResponse) Version ¶
func (furr FileUploadRangeResponse) Version() string
Version returns the value for header x-ms-version.
type FilesAndDirectoriesListSegment ¶
type FilesAndDirectoriesListSegment struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"Entries"` DirectoryItems []DirectoryItem `xml:"Directory"` FileItems []FileItem `xml:"File"` }
FilesAndDirectoriesListSegment - Abstract for entries that can be listed from Directory.
type HTTPGetter ¶
HTTPGetter is a function type that refers to a method that performs an HTTP GET operation.
type HTTPGetterInfo ¶
type HTTPGetterInfo struct { // Offset specifies the start offset that should be used when // creating the HTTP GET request's Range header Offset int64 // Count specifies the count of bytes that should be used to calculate // the end offset when creating the HTTP GET request's Range header Count int64 // ETag specifies the resource's etag that should be used when creating // the HTTP GET request's If-Match header ETag ETag }
HTTPGetterInfo is passed to an HTTPGetter function passing it parameters that should be used to make an HTTP GET request.
type HandleItem ¶
type HandleItem struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"Handle"` // HandleID - XSMB service handle ID HandleID string `xml:"HandleId"` // Path - File or directory name including full path starting from share root Path string `xml:"Path"` // FileID - FileId uniquely identifies the file or directory. FileID string `xml:"FileId"` // ParentID - ParentId uniquely identifies the parent directory of the object. ParentID *string `xml:"ParentId"` // SessionID - SMB session ID in context of which the file handle was opened SessionID string `xml:"SessionId"` // ClientIP - Client IP that opened the handle ClientIP string `xml:"ClientIp"` // OpenTime - Time when the session that previously opened the handle has last been reconnected. (UTC) OpenTime time.Time `xml:"OpenTime"` // LastReconnectTime - Time handle was last connected to (UTC) LastReconnectTime *time.Time `xml:"LastReconnectTime"` }
HandleItem - A listed Azure Storage handle item.
func (HandleItem) MarshalXML ¶
func (hi HandleItem) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements the xml.Marshaler interface for HandleItem.
func (*HandleItem) UnmarshalXML ¶
func (hi *HandleItem) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements the xml.Unmarshaler interface for HandleItem.
type IPEndpointStyleInfo ¶
type IPEndpointStyleInfo struct {
AccountName string // "" if not using IP endpoint style
}
IPEndpointStyleInfo is used for IP endpoint style URL. It's commonly used when working with Azure storage emulator or testing environments. Ex: "https://10.132.141.33/accountname/sharename"
type IPRange ¶
type IPRange struct { Start net.IP // Not specified if length = 0 End net.IP // Not specified if length = 0 }
IPRange represents a SAS IP range's start IP and (optionally) end IP.
type ListFilesAndDirectoriesOptions ¶
type ListFilesAndDirectoriesOptions struct { Prefix string // No Prefix header is produced if "" MaxResults int32 // 0 means unspecified }
ListFilesAndDirectoriesOptions defines options available when calling ListFilesAndDirectoriesSegment.
type ListFilesAndDirectoriesSegmentResponse ¶
type ListFilesAndDirectoriesSegmentResponse struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"EnumerationResults"` ServiceEndpoint string `xml:"ServiceEndpoint,attr"` DirectoryPath string `xml:"DirectoryPath,attr"` Prefix string `xml:"Prefix"` Marker *string `xml:"Marker"` MaxResults *int32 `xml:"MaxResults"` FileItems []FileItem `xml:"Entries>File"` DirectoryItems []DirectoryItem `xml:"Entries>Directory"` NextMarker Marker `xml:"NextMarker"` // contains filtered or unexported fields }
ListFilesAndDirectoriesSegmentResponse - An enumeration of directories and files.
func (ListFilesAndDirectoriesSegmentResponse) ContentType ¶
func (ldafr ListFilesAndDirectoriesSegmentResponse) ContentType() string
ContentType returns the value for header Content-Type.
func (ListFilesAndDirectoriesSegmentResponse) Date ¶
func (ldafr ListFilesAndDirectoriesSegmentResponse) Date() time.Time
Date returns the value for header Date.
func (ListFilesAndDirectoriesSegmentResponse) ErrorCode ¶
func (ldafr ListFilesAndDirectoriesSegmentResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ListFilesAndDirectoriesSegmentResponse) RequestID ¶
func (ldafr ListFilesAndDirectoriesSegmentResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ListFilesAndDirectoriesSegmentResponse) Response ¶
func (ldafr ListFilesAndDirectoriesSegmentResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ListFilesAndDirectoriesSegmentResponse) Status ¶
func (ldafr ListFilesAndDirectoriesSegmentResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ListFilesAndDirectoriesSegmentResponse) StatusCode ¶
func (ldafr ListFilesAndDirectoriesSegmentResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ListFilesAndDirectoriesSegmentResponse) Version ¶
func (ldafr ListFilesAndDirectoriesSegmentResponse) Version() string
Version returns the value for header x-ms-version.
type ListHandlesResponse ¶
type ListHandlesResponse struct { // XMLName is used for marshalling and is subject to removal in a future release. XMLName xml.Name `xml:"EnumerationResults"` HandleList []HandleItem `xml:"Entries>Handle"` NextMarker string `xml:"NextMarker"` // contains filtered or unexported fields }
ListHandlesResponse - An enumeration of handles.
func (ListHandlesResponse) ContentType ¶
func (lhr ListHandlesResponse) ContentType() string
ContentType returns the value for header Content-Type.
func (ListHandlesResponse) Date ¶
func (lhr ListHandlesResponse) Date() time.Time
Date returns the value for header Date.
func (ListHandlesResponse) ErrorCode ¶
func (lhr ListHandlesResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ListHandlesResponse) RequestID ¶
func (lhr ListHandlesResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ListHandlesResponse) Response ¶
func (lhr ListHandlesResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ListHandlesResponse) Status ¶
func (lhr ListHandlesResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ListHandlesResponse) StatusCode ¶
func (lhr ListHandlesResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ListHandlesResponse) Version ¶
func (lhr ListHandlesResponse) Version() string
Version returns the value for header x-ms-version.
type ListSharesDetail ¶
type ListSharesDetail struct {
ListSharesDetail indicates what additional information the service should return with each share.
type ListSharesIncludeType ¶
type ListSharesIncludeType string
ListSharesIncludeType enumerates the values for list shares include type.
const ( ListSharesIncludeType = "metadata" ListSharesIncludeNone ListSharesIncludeType = "" ListSharesIncludeSnapshots ListSharesIncludeType = "snapshots" )ListSharesIncludeMetadata
func PossibleListSharesIncludeTypeValues ¶
func PossibleListSharesIncludeTypeValues() []ListSharesIncludeType
PossibleListSharesIncludeTypeValues returns an array of possible values for the ListSharesIncludeType const type.
type ListSharesOptions ¶
type ListSharesOptions struct {}
ListSharesOptions defines options available when calling ListSharesSegment.
type ListSharesResponse ¶
type ListSharesResponse struct { // XMLName is used for marshalling and is subject to removal in a future release. // contains filtered or unexported fields }
ListSharesResponse - An enumeration of shares.
func (ListSharesResponse) ErrorCode ¶
func (lsr ListSharesResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ListSharesResponse) RequestID ¶
func (lsr ListSharesResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ListSharesResponse) Response ¶
func (lsr ListSharesResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ListSharesResponse) Status ¶
func (lsr ListSharesResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ListSharesResponse) StatusCode ¶
func (lsr ListSharesResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ListSharesResponse) Version ¶
func (lsr ListSharesResponse) Version() string
Version returns the value for header x-ms-version.
type Marker ¶
type Marker struct {
Val *string
}
Marker represents an opaque value used in paged responses.
func (Marker) NotDone ¶
NotDone returns true if the list enumeration should be started or is not yet complete. Specifically, NotDone returns true for a just-initialized (zero value) Marker indicating that you should make an initial request to get a result portion from the service. NotDone also returns true whenever the service returns an interim result portion. NotDone returns false only after the service has returned the final result portion.
func (*Marker) UnmarshalXML ¶
UnmarshalXML implements the xml.Unmarshaler interface for Marker.
type Metadata ¶
Metadata contains metadata key/value pairs.
func (*Metadata) UnmarshalXML ¶
UnmarshalXML implements the xml.Unmarshaler interface for Metadata.
type MetricProperties ¶
type MetricProperties struct { // MetricEnabled - Indicates whether metrics are enabled for the File service. MetricEnabled bool // Version - The version of Storage Analytics to configure. // Version string, comment out version, as it's mandatory and should be 1.0 // IncludeAPIs - Indicates whether metrics should generate summary statistics for called API operations. IncludeAPIs bool // RetentionPolicyEnabled - Indicates whether a rentention policy is enabled for the File service. RetentionPolicyEnabled bool // RetentionDays - Indicates the number of days that metrics data should be retained. RetentionDays int32 }
MetricProperties definies convenience struct for Metrics,
type Metrics ¶
type Metrics struct { // Version - The version of Storage Analytics to configure. Version string `xml:"Version"` // Enabled - Indicates whether metrics are enabled for the File service. Enabled bool `xml:"Enabled"` // IncludeAPIs - Indicates whether metrics should generate summary statistics for called API operations. IncludeAPIs *bool `xml:"IncludeAPIs"` RetentionPolicy *RetentionPolicy `xml:"RetentionPolicy"` }
Metrics - Storage Analytics metrics for file service.
type PipelineOptions ¶
type PipelineOptions struct { // Log configures the pipeline's logging infrastructure indicating what information is logged and where. Log pipeline.LogOptions // Retry configures the built-in retry policy behavior. Retry RetryOptions // RequestLog configures the built-in request logging policy. RequestLog RequestLogOptions // Telemetry configures the built-in telemetry policy behavior. Telemetry TelemetryOptions }
PipelineOptions is used to configure a request policy pipeline's retry policy and logging.
type Range ¶
type Range struct { // Start - Start of the range. Start int64 `xml:"Start"` // End - End of the range. End int64 `xml:"End"` }
Range - An Azure Storage file range.
type Ranges ¶
type Ranges struct { Items []Range `xml:"Range"` // contains filtered or unexported fields }
Ranges - Wraps the response from the fileClient.GetRangeList method.
func (Ranges) FileContentLength ¶
FileContentLength returns the value for header x-ms-content-length.
func (Ranges) LastModified ¶
LastModified returns the value for header Last-Modified.
func (Ranges) StatusCode ¶
StatusCode returns the HTTP status code of the response, e.g. 200.
type RequestLogOptions ¶
type RequestLogOptions struct { // LogWarningIfTryOverThreshold logs a warning if a tried operation takes longer than the specified // duration (-1=no logging; 0=default threshold). LogWarningIfTryOverThreshold time.Duration }
RequestLogOptions configures the retry policy's behavior.
type ResponseError ¶
type ResponseError interface { // Error exposes the Error(), Temporary() and Timeout() methods. net.Error // Includes the Go error interface // Response returns the HTTP response. You may examine this but you should not modify it. Response() *http.Response }
ResponseError identifies a responder-generated network or response parsing error.
type RetentionPolicy ¶
type RetentionPolicy struct { // Enabled - Indicates whether a retention policy is enabled for the File service. If false, metrics data is retained, and the user is responsible for deleting it. Enabled bool `xml:"Enabled"` // Days - Indicates the number of days that metrics data should be retained. All data older than this value will be deleted. Metrics data is deleted on a best-effort basis after the retention period expires. Days *int32 `xml:"Days"` }
RetentionPolicy - The retention policy.
type RetryOptions ¶
type RetryOptions struct { // Policy tells the pipeline what kind of retry policy to use. See the RetryPolicy* constants.\ // A value of zero means that you accept our default policy. Policy RetryPolicy // MaxTries specifies the maximum number of attempts an operation will be tried before producing an error (0=default). // A value of zero means that you accept our default policy. A value of 1 means 1 try and no retries. MaxTries int32 // TryTimeout indicates the maximum time allowed for any single try of an HTTP request. // A value of zero means that you accept our default timeout. NOTE: When transferring large amounts // of data, the default TryTimeout will probably not be sufficient. You should override this value // based on the bandwidth available to the host machine and proximity to the Storage service. A good // starting point may be something like (60 seconds per MB of anticipated-payload-size). TryTimeout time.Duration // RetryDelay specifies the amount of delay to use before retrying an operation (0=default). // When RetryPolicy is specified as RetryPolicyExponential, the delay increases exponentially // with each retry up to a maximum specified by MaxRetryDelay. // If you specify 0, then you must also specify 0 for MaxRetryDelay. // If you specify RetryDelay, then you must also specify MaxRetryDelay, and MaxRetryDelay should be // equal to or greater than RetryDelay. RetryDelay time.Duration // MaxRetryDelay specifies the maximum delay allowed before retrying an operation (0=default). // If you specify 0, then you must also specify 0 for RetryDelay. MaxRetryDelay time.Duration }
RetryOptions configures the retry policy's behavior.
type RetryPolicy ¶
type RetryPolicy int32
RetryPolicy tells the pipeline what kind of retry policy to use. See the RetryPolicy* constants.
const ( // RetryPolicyExponential tells the pipeline to use an exponential back-off retry policy RetryPolicyExponential RetryPolicy = 0 // RetryPolicyFixed tells the pipeline to use a fixed back-off retry policy RetryPolicyFixed RetryPolicy = 1 )
type RetryReaderOptions ¶
type RetryReaderOptions struct { // MaxRetryRequests specifies the maximum number of HTTP GET requests that will be made // while reading from a RetryReader. A value of zero means that no additional HTTP // GET requests will be made. MaxRetryRequests int // NotifyFailedRead is called, if non-nil, after any failure to read. Expected usage is diagnostic logging. NotifyFailedRead FailedReadNotifier // TreatEarlyCloseAsError can be set to true to prevent retries after "read on closed response body". By default, // retryReader has the following special behaviour: closing the response body before it is all read is treated as a // retryable error. This is to allow callers to force a retry by closing the body from another goroutine (e.g. if the = // read is too slow, caller may want to force a retry in the hope that the retry will be quicker). If // TreatEarlyCloseAsError is true, then retryReader's special behaviour is suppressed, and "read on closed body" is instead // treated as a fatal (non-retryable) error. // Note that setting TreatEarlyCloseAsError only guarantees that Closing will produce a fatal error if the Close happens // from the same "thread" (goroutine) as Read. Concurrent Close calls from other goroutines may instead produce network errors // which will be retried. TreatEarlyCloseAsError bool // contains filtered or unexported fields }
RetryReaderOptions contains properties which can help to decide when to do retry.
type RetryableDownloadResponse ¶
type RetryableDownloadResponse struct {
// contains filtered or unexported fields
}
RetryableDownloadResponse wraps AutoRest generated DownloadResponse and helps to provide info for retry.
func (RetryableDownloadResponse) AcceptRanges ¶
func (dr RetryableDownloadResponse) AcceptRanges() string
AcceptRanges returns the value for header Accept-Ranges.
func (*RetryableDownloadResponse) Body ¶
func (dr *RetryableDownloadResponse) Body(o RetryReaderOptions) io.ReadCloser
Body constructs a stream to read data from with a resilient reader option. A zero-value option means to get a raw stream.
func (RetryableDownloadResponse) CacheControl ¶
func (dr RetryableDownloadResponse) CacheControl() string
CacheControl returns the value for header Cache-Control.
func (RetryableDownloadResponse) ContentDisposition ¶
func (dr RetryableDownloadResponse) ContentDisposition() string
ContentDisposition returns the value for header Content-Disposition.
func (RetryableDownloadResponse) ContentEncoding ¶
func (dr RetryableDownloadResponse) ContentEncoding() string
ContentEncoding returns the value for header Content-Encoding.
func (RetryableDownloadResponse) ContentLanguage ¶
func (dr RetryableDownloadResponse) ContentLanguage() string
ContentLanguage returns the value for header Content-Language.
func (RetryableDownloadResponse) ContentLength ¶
func (dr RetryableDownloadResponse) ContentLength() int64
ContentLength returns the value for header Content-Length.
func (RetryableDownloadResponse) ContentMD5 ¶
func (dr RetryableDownloadResponse) ContentMD5() []byte
ContentMD5 returns the value for header Content-MD5.
func (RetryableDownloadResponse) ContentRange ¶
func (dr RetryableDownloadResponse) ContentRange() string
ContentRange returns the value for header Content-Range.
func (RetryableDownloadResponse) ContentType ¶
func (dr RetryableDownloadResponse) ContentType() string
ContentType returns the value for header Content-Type.
func (RetryableDownloadResponse) CopyCompletionTime ¶
func (dr RetryableDownloadResponse) CopyCompletionTime() time.Time
CopyCompletionTime returns the value for header x-ms-copy-completion-time.
func (RetryableDownloadResponse) CopyID ¶
func (dr RetryableDownloadResponse) CopyID() string
CopyID returns the value for header x-ms-copy-id.
func (RetryableDownloadResponse) CopyProgress ¶
func (dr RetryableDownloadResponse) CopyProgress() string
CopyProgress returns the value for header x-ms-copy-progress.
func (RetryableDownloadResponse) CopySource ¶
func (dr RetryableDownloadResponse) CopySource() string
CopySource returns the value for header x-ms-copy-source.
func (RetryableDownloadResponse) CopyStatus ¶
func (dr RetryableDownloadResponse) CopyStatus() CopyStatusType
CopyStatus returns the value for header x-ms-copy-status.
func (RetryableDownloadResponse) CopyStatusDescription ¶
func (dr RetryableDownloadResponse) CopyStatusDescription() string
CopyStatusDescription returns the value for header x-ms-copy-status-description.
func (RetryableDownloadResponse) Date ¶
func (dr RetryableDownloadResponse) Date() time.Time
Date returns the value for header Date.
func (RetryableDownloadResponse) ETag ¶
func (dr RetryableDownloadResponse) ETag() ETag
ETag returns the value for header ETag.
func (RetryableDownloadResponse) FileContentMD5 ¶
func (dr RetryableDownloadResponse) FileContentMD5() []byte
FileContentMD5 returns the value for header x-ms-content-md5.
func (RetryableDownloadResponse) IsServerEncrypted ¶
func (dr RetryableDownloadResponse) IsServerEncrypted() string
IsServerEncrypted returns the value for header x-ms-server-encrypted.
func (RetryableDownloadResponse) LastModified ¶
func (dr RetryableDownloadResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (RetryableDownloadResponse) NewHTTPHeaders ¶
func (dr RetryableDownloadResponse) NewHTTPHeaders() FileHTTPHeaders
NewHTTPHeaders returns the user-modifiable properties for this file.
func (RetryableDownloadResponse) NewMetadata ¶
func (dr RetryableDownloadResponse) NewMetadata() Metadata
NewMetadata returns user-defined key/value pairs.
func (RetryableDownloadResponse) RequestID ¶
func (dr RetryableDownloadResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (RetryableDownloadResponse) Response ¶
func (dr RetryableDownloadResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (RetryableDownloadResponse) Status ¶
func (dr RetryableDownloadResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (RetryableDownloadResponse) StatusCode ¶
func (dr RetryableDownloadResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (RetryableDownloadResponse) Version ¶
func (dr RetryableDownloadResponse) Version() string
Version returns the value for header x-ms-version.
type SASProtocol ¶
type SASProtocol string
const ( // SASProtocolHTTPS can be specified for a SAS protocol SASProtocolHTTPS SASProtocol = "https" // SASProtocolHTTPSandHTTP can be specified for a SAS protocol SASProtocolHTTPSandHTTP SASProtocol = "https,http" )
type SASQueryParameters ¶
type SASQueryParameters struct {
// contains filtered or unexported fields
}
A SASQueryParameters object represents the components that make up an Azure Storage SAS' query parameters. You parse a map of query parameters into its fields by calling NewSASQueryParameters(). You add the components to a query parameter map by calling AddToValues(). NOTE: Changing any field requires computing a new SAS signature using a XxxSASSignatureValues type.
This type defines the components used by all Azure Storage resources (Containers, Blobs, Files, & Queues).
func (*SASQueryParameters) CacheControl ¶
func (p *SASQueryParameters) CacheControl() string
func (*SASQueryParameters) ContentDisposition ¶
func (p *SASQueryParameters) ContentDisposition() string
func (*SASQueryParameters) ContentEncoding ¶
func (p *SASQueryParameters) ContentEncoding() string
func (*SASQueryParameters) ContentLanguage ¶
func (p *SASQueryParameters) ContentLanguage() string
func (*SASQueryParameters) ContentType ¶
func (p *SASQueryParameters) ContentType() string
func (*SASQueryParameters) Encode ¶
func (p *SASQueryParameters) Encode() string
Encode encodes the SAS query parameters into URL encoded form sorted by key.
func (*SASQueryParameters) ExpiryTime ¶
func (p *SASQueryParameters) ExpiryTime() time.Time
func (*SASQueryParameters) IPRange ¶
func (p *SASQueryParameters) IPRange() IPRange
func (*SASQueryParameters) Identifier ¶
func (p *SASQueryParameters) Identifier() string
func (*SASQueryParameters) Permissions ¶
func (p *SASQueryParameters) Permissions() string
func (*SASQueryParameters) Protocol ¶
func (p *SASQueryParameters) Protocol() SASProtocol
func (*SASQueryParameters) Resource ¶
func (p *SASQueryParameters) Resource() string
func (*SASQueryParameters) ResourceTypes ¶
func (p *SASQueryParameters) ResourceTypes() string
func (*SASQueryParameters) Services ¶
func (p *SASQueryParameters) Services() string
func (*SASQueryParameters) Signature ¶
func (p *SASQueryParameters) Signature() string
func (*SASQueryParameters) StartTime ¶
func (p *SASQueryParameters) StartTime() time.Time
func (*SASQueryParameters) Version ¶
func (p *SASQueryParameters) Version() string
type SMBProperties ¶
type SMBProperties struct { // NOTE: If pointers are nil, we infer that you wish to preserve these properties. To clear them, point to an empty string. // NOTE: Permission strings are required to be sub-9KB. Please upload the permission to the share, and submit a key instead if yours exceeds this limit. PermissionString *string PermissionKey *string // In Windows, a 32 bit file attributes integer exists. This is that. FileAttributes *FileAttributeFlags // A UTC time-date string is specified below. A value of 'now' defaults to now. 'preserve' defaults to preserving the old case. FileCreationTime *time.Time FileLastWriteTime *time.Time }
SMBProperties defines a struct that takes in optional parameters regarding SMB/NTFS properties. When you pass this into another function (Either literally or via FileHTTPHeaders), the response will probably fit inside SMBPropertyAdapter. Nil values of the properties are inferred to be preserved (or when creating, use defaults). Clearing a value can be done by supplying an empty item instead of nil.
func (*SMBProperties) SetISO8601CreationTime ¶
func (sp *SMBProperties) SetISO8601CreationTime(input string) error
SetISO8601CreationTime sets the file creation time with a string formatted as ISO8601
func (*SMBProperties) SetISO8601WriteTime ¶
func (sp *SMBProperties) SetISO8601WriteTime(input string) error
SetISO8601WriteTime sets the file last write time with a string formatted as ISO8601
type SMBPropertyAdapter ¶
type SMBPropertyAdapter struct {
PropertySource SMBPropertyHolder
}
SMBPropertyAdapter is a wrapper struct that automatically converts the string outputs of FileAttributes, FileCreationTime and FileLastWrite time to time.Time. It is _not_ error resistant. It is expected that the response you're inserting into this is a valid response. File and directory calls that return such properties are: GetProperties, SetProperties, Create File Downloads also return such properties. Insert other response types at your peril.
func (*SMBPropertyAdapter) FileAttributes ¶
func (s *SMBPropertyAdapter) FileAttributes() FileAttributeFlags
func (*SMBPropertyAdapter) FileCreationTime ¶
func (s *SMBPropertyAdapter) FileCreationTime() time.Time
func (*SMBPropertyAdapter) FileLastWriteTime ¶
func (s *SMBPropertyAdapter) FileLastWriteTime() time.Time
type SMBPropertyHolder ¶
type SMBPropertyHolder interface { FileCreationTime() string FileLastWriteTime() string FileAttributes() string }
SMBPropertyHolder is an interface designed for SMBPropertyAdapter, to identify valid response types for adapting.
type ServiceCodeType ¶
type ServiceCodeType string
ServiceCodeType is a string identifying a storage service error. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/status-and-error-codes2
const ( // The file or directory could not be deleted because it is in use by an SMB client (409). ServiceCodeCannotDeleteFileOrDirectory ServiceCodeType = "CannotDeleteFileOrDirectory" // The specified resource state could not be flushed from an SMB client in the specified time (500). ServiceCodeClientCacheFlushDelay ServiceCodeType = "ClientCacheFlushDelay" // The specified resource is marked for deletion by an SMB client (409). ServiceCodeDeletePending ServiceCodeType = "DeletePending" // The specified directory is not empty (409). ServiceCodeDirectoryNotEmpty ServiceCodeType = "DirectoryNotEmpty" // A portion of the specified file is locked by an SMB client (409). ServiceCodeFileLockConflict ServiceCodeType = "FileLockConflict" // File or directory path is too long (400). // Or File or directory path has too many subdirectories (400). ServiceCodeInvalidFileOrDirectoryPathName ServiceCodeType = "InvalidFileOrDirectoryPathName" // The specified parent path does not exist (404). ServiceCodeParentNotFound ServiceCodeType = "ParentNotFound" // The specified resource is read-only and cannot be modified at this time (409). ServiceCodeReadOnlyAttribute ServiceCodeType = "ReadOnlyAttribute" ServiceCodeShareAlreadyExists ServiceCodeType = "ShareAlreadyExists" ServiceCodeShareBeingDeleted ServiceCodeType = "ShareBeingDeleted" ServiceCodeShareDisabled ServiceCodeType = "ShareDisabled" ServiceCodeShareNotFound ServiceCodeType = "ShareNotFound" // The specified resource may be in use by an SMB client (409). ServiceCodeSharingViolation ServiceCodeType = "SharingViolation" ServiceCodeShareSnapshotInProgress ServiceCodeType = "ShareSnapshotInProgress" ServiceCodeShareSnapshotCountExceeded ServiceCodeType = "ShareSnapshotCountExceeded" ServiceCodeShareSnapshotOperationNotSupported ServiceCodeType = "ShareSnapshotOperationNotSupported" ServiceCodeShareHasSnapshots ServiceCodeType = "ShareHasSnapshots" )
ServiceCode values indicate a service failure.
const ( // ServiceCodeNone is the default value. It indicates that the error was related to the service or that the service didn't return a code. ServiceCodeNone ServiceCodeType = "" // ServiceCodeAccountAlreadyExists means the specified account already exists. ServiceCodeAccountAlreadyExists ServiceCodeType = "AccountAlreadyExists" // ServiceCodeAccountBeingCreated means the specified account is in the process of being created (403). ServiceCodeAccountBeingCreated ServiceCodeType = "AccountBeingCreated" // ServiceCodeAccountIsDisabled means the specified account is disabled (403). ServiceCodeAccountIsDisabled ServiceCodeType = "AccountIsDisabled" // ServiceCodeAuthenticationFailed means the server failed to authenticate the request. Make sure the value of the Authorization header is formed correctly including the signature (403). ServiceCodeAuthenticationFailed ServiceCodeType = "AuthenticationFailed" // ServiceCodeConditionHeadersNotSupported means the condition headers are not supported (400). ServiceCodeConditionHeadersNotSupported ServiceCodeType = "ConditionHeadersNotSupported" // ServiceCodeConditionNotMet means the condition specified in the conditional header(s) was not met for a read/write operation (304/412). ServiceCodeConditionNotMet ServiceCodeType = "ConditionNotMet" // ServiceCodeEmptyMetadataKey means the key for one of the metadata key-value pairs is empty (400). ServiceCodeEmptyMetadataKey ServiceCodeType = "EmptyMetadataKey" // ServiceCodeInsufficientAccountPermissions means read operations are currently disabled or Write operations are not allowed or The account being accessed does not have sufficient permissions to execute this operation (403). ServiceCodeInsufficientAccountPermissions ServiceCodeType = "InsufficientAccountPermissions" // ServiceCodeInternalError means the server encountered an internal error. Please retry the request (500). ServiceCodeInternalError ServiceCodeType = "InternalError" // ServiceCodeInvalidAuthenticationInfo means the authentication information was not provided in the correct format. Verify the value of Authorization header (400). ServiceCodeInvalidAuthenticationInfo ServiceCodeType = "InvalidAuthenticationInfo" // ServiceCodeInvalidHeaderValue means the value provided for one of the HTTP headers was not in the correct format (400). ServiceCodeInvalidHeaderValue ServiceCodeType = "InvalidHeaderValue" // ServiceCodeInvalidHTTPVerb means the HTTP verb specified was not recognized by the server (400). ServiceCodeInvalidHTTPVerb ServiceCodeType = "InvalidHttpVerb" // ServiceCodeInvalidInput means one of the request inputs is not valid (400). ServiceCodeInvalidInput ServiceCodeType = "InvalidInput" // ServiceCodeInvalidMd5 means the MD5 value specified in the request is invalid. The MD5 value must be 128 bits and Base64-encoded (400). ServiceCodeInvalidMd5 ServiceCodeType = "InvalidMd5" // ServiceCodeInvalidMetadata means the specified metadata is invalid. It includes characters that are not permitted (400). ServiceCodeInvalidMetadata ServiceCodeType = "InvalidMetadata" // ServiceCodeInvalidQueryParameterValue means an invalid value was specified for one of the query parameters in the request URI (400). ServiceCodeInvalidQueryParameterValue ServiceCodeType = "InvalidQueryParameterValue" // ServiceCodeInvalidRange means the range specified is invalid for the current size of the resource (416). ServiceCodeInvalidRange ServiceCodeType = "InvalidRange" // ServiceCodeInvalidResourceName means the specified resource name contains invalid characters (400). ServiceCodeInvalidResourceName ServiceCodeType = "InvalidResourceName" // ServiceCodeInvalidURI means the requested URI does not represent any resource on the server (400). ServiceCodeInvalidURI ServiceCodeType = "InvalidUri" // ServiceCodeInvalidXMLDocument means the specified XML is not syntactically valid (400). ServiceCodeInvalidXMLDocument ServiceCodeType = "InvalidXmlDocument" // ServiceCodeInvalidXMLNodeValue means the value provided for one of the XML nodes in the request body was not in the correct format (400). ServiceCodeInvalidXMLNodeValue ServiceCodeType = "InvalidXmlNodeValue" // ServiceCodeMd5Mismatch means the MD5 value specified in the request did not match the MD5 value calculated by the server (400). ServiceCodeMd5Mismatch ServiceCodeType = "Md5Mismatch" // ServiceCodeMetadataTooLarge means the size of the specified metadata exceeds the maximum size permitted (400). ServiceCodeMetadataTooLarge ServiceCodeType = "MetadataTooLarge" // ServiceCodeMissingContentLengthHeader means the Content-Length header was not specified (411). ServiceCodeMissingContentLengthHeader ServiceCodeType = "MissingContentLengthHeader" // ServiceCodeMissingRequiredQueryParameter means a required query parameter was not specified for this request (400). ServiceCodeMissingRequiredQueryParameter ServiceCodeType = "MissingRequiredQueryParameter" // ServiceCodeMissingRequiredHeader means a required HTTP header was not specified (400). ServiceCodeMissingRequiredHeader ServiceCodeType = "MissingRequiredHeader" // ServiceCodeMissingRequiredXMLNode means a required XML node was not specified in the request body (400). ServiceCodeMissingRequiredXMLNode ServiceCodeType = "MissingRequiredXmlNode" // ServiceCodeMultipleConditionHeadersNotSupported means multiple condition headers are not supported (400). ServiceCodeMultipleConditionHeadersNotSupported ServiceCodeType = "MultipleConditionHeadersNotSupported" // ServiceCodeOperationTimedOut means the operation could not be completed within the permitted time (500). ServiceCodeOperationTimedOut ServiceCodeType = "OperationTimedOut" // ServiceCodeOutOfRangeInput means one of the request inputs is out of range (400). ServiceCodeOutOfRangeInput ServiceCodeType = "OutOfRangeInput" // ServiceCodeOutOfRangeQueryParameterValue means a query parameter specified in the request URI is outside the permissible range (400). ServiceCodeOutOfRangeQueryParameterValue ServiceCodeType = "OutOfRangeQueryParameterValue" // ServiceCodeRequestBodyTooLarge means the size of the request body exceeds the maximum size permitted (413). ServiceCodeRequestBodyTooLarge ServiceCodeType = "RequestBodyTooLarge" // ServiceCodeResourceTypeMismatch means the specified resource type does not match the type of the existing resource (409). ServiceCodeResourceTypeMismatch ServiceCodeType = "ResourceTypeMismatch" // ServiceCodeRequestURLFailedToParse means the url in the request could not be parsed (400). ServiceCodeRequestURLFailedToParse ServiceCodeType = "RequestUrlFailedToParse" // ServiceCodeResourceAlreadyExists means the specified resource already exists (409). ServiceCodeResourceAlreadyExists ServiceCodeType = "ResourceAlreadyExists" // ServiceCodeResourceNotFound means the specified resource does not exist (404). ServiceCodeResourceNotFound ServiceCodeType = "ResourceNotFound" // ServiceCodeServerBusy means the server is currently unable to receive requests. Please retry your request or Ingress/egress is over the account limit or operations per second is over the account limit (503). ServiceCodeServerBusy ServiceCodeType = "ServerBusy" // ServiceCodeUnsupportedHeader means one of the HTTP headers specified in the request is not supported (400). ServiceCodeUnsupportedHeader ServiceCodeType = "UnsupportedHeader" // ServiceCodeUnsupportedXMLNode means one of the XML nodes specified in the request body is not supported (400). ServiceCodeUnsupportedXMLNode ServiceCodeType = "UnsupportedXmlNode" // ServiceCodeUnsupportedQueryParameter means one of the query parameters specified in the request URI is not supported (400). ServiceCodeUnsupportedQueryParameter ServiceCodeType = "UnsupportedQueryParameter" // ServiceCodeUnsupportedHTTPVerb means the resource doesn't support the specified HTTP verb (405). ServiceCodeUnsupportedHTTPVerb ServiceCodeType = "UnsupportedHttpVerb" )
type ServiceSetPropertiesResponse ¶
type ServiceSetPropertiesResponse struct {
// contains filtered or unexported fields
}
ServiceSetPropertiesResponse ...
func (ServiceSetPropertiesResponse) ErrorCode ¶
func (sspr ServiceSetPropertiesResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ServiceSetPropertiesResponse) RequestID ¶
func (sspr ServiceSetPropertiesResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ServiceSetPropertiesResponse) Response ¶
func (sspr ServiceSetPropertiesResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ServiceSetPropertiesResponse) Status ¶
func (sspr ServiceSetPropertiesResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ServiceSetPropertiesResponse) StatusCode ¶
func (sspr ServiceSetPropertiesResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ServiceSetPropertiesResponse) Version ¶
func (sspr ServiceSetPropertiesResponse) Version() string
Version returns the value for header x-ms-version.
type ServiceURL ¶
type ServiceURL struct {
// contains filtered or unexported fields
}
A ServiceURL represents a URL to the Azure Storage File service allowing you to manipulate file shares.
func NewServiceURL ¶
func NewServiceURL(url url.URL, p pipeline.Pipeline) ServiceURL
NewServiceURL creates a ServiceURL object using the specified URL and request policy pipeline. Note: p can't be nil.
func (ServiceURL) GetProperties ¶
func (s ServiceURL) GetProperties(ctx context.Context) (*FileServiceProperties, error)
GetProperties returns the properties of the File service. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/get-file-service-properties.
func (ServiceURL) ListSharesSegment ¶
func (s ServiceURL) ListSharesSegment(ctx context.Context, marker Marker, o ListSharesOptions) (*ListSharesResponse, error)
ListSharesSegment returns a single segment of shares starting from the specified Marker. Use an empty Marker to start enumeration from the beginning. Share names are returned in lexicographic order. After getting a segment, process it, and then call ListSharesSegment again (passing the the previously-returned Marker) to get the next segment. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/list-shares.
func (ServiceURL) NewShareURL ¶
func (s ServiceURL) NewShareURL(shareName string) ShareURL
NewShareURL creates a new ShareURL object by concatenating shareName to the end of ServiceURL's URL. The new ShareURL uses the same request policy pipeline as the ServiceURL. To change the pipeline, create the ShareURL and then call its WithPipeline method passing in the desired pipeline object. Or, call this package's NewShareURL instead of calling this object's NewShareURL method.
func (ServiceURL) SetProperties ¶
func (s ServiceURL) SetProperties(ctx context.Context, properties FileServiceProperties) (*ServiceSetPropertiesResponse, error)
SetProperties sets the properties of the File service. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/set-file-service-properties.
func (ServiceURL) URL ¶
func (s ServiceURL) URL() url.URL
URL returns the URL endpoint used by the ServiceURL object.
func (ServiceURL) WithPipeline ¶
func (s ServiceURL) WithPipeline(p pipeline.Pipeline) ServiceURL
WithPipeline creates a new ServiceURL object identical to the source but with the specified request policy pipeline.
type ShareCreatePermissionResponse ¶
type ShareCreatePermissionResponse struct {
// contains filtered or unexported fields
}
ShareCreatePermissionResponse ...
func (ShareCreatePermissionResponse) Date ¶
func (scpr ShareCreatePermissionResponse) Date() time.Time
Date returns the value for header Date.
func (ShareCreatePermissionResponse) ErrorCode ¶
func (scpr ShareCreatePermissionResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ShareCreatePermissionResponse) FilePermissionKey ¶
func (scpr ShareCreatePermissionResponse) FilePermissionKey() string
FilePermissionKey returns the value for header x-ms-file-permission-key.
func (ShareCreatePermissionResponse) RequestID ¶
func (scpr ShareCreatePermissionResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ShareCreatePermissionResponse) Response ¶
func (scpr ShareCreatePermissionResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ShareCreatePermissionResponse) Status ¶
func (scpr ShareCreatePermissionResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ShareCreatePermissionResponse) StatusCode ¶
func (scpr ShareCreatePermissionResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ShareCreatePermissionResponse) Version ¶
func (scpr ShareCreatePermissionResponse) Version() string
Version returns the value for header x-ms-version.
type ShareCreateResponse ¶
type ShareCreateResponse struct {
// contains filtered or unexported fields
}
ShareCreateResponse ...
func (ShareCreateResponse) Date ¶
func (scr ShareCreateResponse) Date() time.Time
Date returns the value for header Date.
func (ShareCreateResponse) ETag ¶
func (scr ShareCreateResponse) ETag() ETag
ETag returns the value for header ETag.
func (ShareCreateResponse) ErrorCode ¶
func (scr ShareCreateResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ShareCreateResponse) LastModified ¶
func (scr ShareCreateResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (ShareCreateResponse) RequestID ¶
func (scr ShareCreateResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ShareCreateResponse) Response ¶
func (scr ShareCreateResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ShareCreateResponse) Status ¶
func (scr ShareCreateResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ShareCreateResponse) StatusCode ¶
func (scr ShareCreateResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ShareCreateResponse) Version ¶
func (scr ShareCreateResponse) Version() string
Version returns the value for header x-ms-version.
type ShareCreateSnapshotResponse ¶
type ShareCreateSnapshotResponse struct {
// contains filtered or unexported fields
}
ShareCreateSnapshotResponse ...
func (ShareCreateSnapshotResponse) Date ¶
func (scsr ShareCreateSnapshotResponse) Date() time.Time
Date returns the value for header Date.
func (ShareCreateSnapshotResponse) ETag ¶
func (scsr ShareCreateSnapshotResponse) ETag() ETag
ETag returns the value for header ETag.
func (ShareCreateSnapshotResponse) ErrorCode ¶
func (scsr ShareCreateSnapshotResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ShareCreateSnapshotResponse) LastModified ¶
func (scsr ShareCreateSnapshotResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (ShareCreateSnapshotResponse) RequestID ¶
func (scsr ShareCreateSnapshotResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ShareCreateSnapshotResponse) Response ¶
func (scsr ShareCreateSnapshotResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ShareCreateSnapshotResponse) Snapshot ¶
func (scsr ShareCreateSnapshotResponse) Snapshot() string
Snapshot returns the value for header x-ms-snapshot.
func (ShareCreateSnapshotResponse) Status ¶
func (scsr ShareCreateSnapshotResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ShareCreateSnapshotResponse) StatusCode ¶
func (scsr ShareCreateSnapshotResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ShareCreateSnapshotResponse) Version ¶
func (scsr ShareCreateSnapshotResponse) Version() string
Version returns the value for header x-ms-version.
type ShareDeleteResponse ¶
type ShareDeleteResponse struct {
// contains filtered or unexported fields
}
ShareDeleteResponse ...
func (ShareDeleteResponse) Date ¶
func (sdr ShareDeleteResponse) Date() time.Time
Date returns the value for header Date.
func (ShareDeleteResponse) ErrorCode ¶
func (sdr ShareDeleteResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ShareDeleteResponse) RequestID ¶
func (sdr ShareDeleteResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ShareDeleteResponse) Response ¶
func (sdr ShareDeleteResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ShareDeleteResponse) Status ¶
func (sdr ShareDeleteResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ShareDeleteResponse) StatusCode ¶
func (sdr ShareDeleteResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ShareDeleteResponse) Version ¶
func (sdr ShareDeleteResponse) Version() string
Version returns the value for header x-ms-version.
type ShareGetPropertiesResponse ¶
type ShareGetPropertiesResponse struct {
// contains filtered or unexported fields
}
ShareGetPropertiesResponse ...
func (ShareGetPropertiesResponse) Date ¶
func (sgpr ShareGetPropertiesResponse) Date() time.Time
Date returns the value for header Date.
func (ShareGetPropertiesResponse) ETag ¶
func (sgpr ShareGetPropertiesResponse) ETag() ETag
ETag returns the value for header ETag.
func (ShareGetPropertiesResponse) ErrorCode ¶
func (sgpr ShareGetPropertiesResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ShareGetPropertiesResponse) LastModified ¶
func (sgpr ShareGetPropertiesResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (ShareGetPropertiesResponse) NewMetadata ¶
func (sgpr ShareGetPropertiesResponse) NewMetadata() Metadata
NewMetadata returns user-defined key/value pairs.
func (ShareGetPropertiesResponse) Quota ¶
func (sgpr ShareGetPropertiesResponse) Quota() int32
Quota returns the value for header x-ms-share-quota.
func (ShareGetPropertiesResponse) RequestID ¶
func (sgpr ShareGetPropertiesResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ShareGetPropertiesResponse) Response ¶
func (sgpr ShareGetPropertiesResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ShareGetPropertiesResponse) Status ¶
func (sgpr ShareGetPropertiesResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ShareGetPropertiesResponse) StatusCode ¶
func (sgpr ShareGetPropertiesResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ShareGetPropertiesResponse) Version ¶
func (sgpr ShareGetPropertiesResponse) Version() string
Version returns the value for header x-ms-version.
type ShareItem ¶
type ShareItem struct { // XMLName is used for marshalling and is subject to removal in a future release. }
ShareItem - A listed Azure Storage share item.
type SharePermission ¶
type SharePermission struct { string // contains filtered or unexported fields }Permission
SharePermission - A permission (a security descriptor) at the share level.
func (SharePermission) Date ¶
func (sp SharePermission) Date() time.Time
Date returns the value for header Date.
func (SharePermission) ErrorCode ¶
func (sp SharePermission) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (SharePermission) RequestID ¶
func (sp SharePermission) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (SharePermission) Response ¶
func (sp SharePermission) Response() *http.Response
Response returns the raw HTTP response object.
func (SharePermission) Status ¶
func (sp SharePermission) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (SharePermission) StatusCode ¶
func (sp SharePermission) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (SharePermission) Version ¶
func (sp SharePermission) Version() string
Version returns the value for header x-ms-version.
type ShareProperties ¶
type ShareProperties struct {}
ShareProperties - Properties of a share.
func (ShareProperties) MarshalXML ¶
func (sp ShareProperties) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML implements the xml.Marshaler interface for ShareProperties.
func (*ShareProperties) UnmarshalXML ¶
func (sp *ShareProperties) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML implements the xml.Unmarshaler interface for ShareProperties.
type ShareSASPermissions ¶
type ShareSASPermissions struct {
The ShareSASPermissions type simplifies creating the permissions string for an Azure Storage share SAS. Initialize an instance of this type and then call its String method to set FileSASSignatureValues's Permissions field.
func (*ShareSASPermissions) Parse ¶
func (p *ShareSASPermissions) Parse(s string) error
Parse initializes the ShareSASPermissions's fields from a string.
func (ShareSASPermissions) String ¶
func (p ShareSASPermissions) String() string
String produces the SAS permissions string for an Azure Storage share. Call this method to set FileSASSignatureValues's Permissions field.
type ShareSetAccessPolicyResponse ¶
type ShareSetAccessPolicyResponse struct {
// contains filtered or unexported fields
}
ShareSetAccessPolicyResponse ...
func (ShareSetAccessPolicyResponse) Date ¶
func (ssapr ShareSetAccessPolicyResponse) Date() time.Time
Date returns the value for header Date.
func (ShareSetAccessPolicyResponse) ETag ¶
func (ssapr ShareSetAccessPolicyResponse) ETag() ETag
ETag returns the value for header ETag.
func (ShareSetAccessPolicyResponse) ErrorCode ¶
func (ssapr ShareSetAccessPolicyResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ShareSetAccessPolicyResponse) LastModified ¶
func (ssapr ShareSetAccessPolicyResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (ShareSetAccessPolicyResponse) RequestID ¶
func (ssapr ShareSetAccessPolicyResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ShareSetAccessPolicyResponse) Response ¶
func (ssapr ShareSetAccessPolicyResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ShareSetAccessPolicyResponse) Status ¶
func (ssapr ShareSetAccessPolicyResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ShareSetAccessPolicyResponse) StatusCode ¶
func (ssapr ShareSetAccessPolicyResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ShareSetAccessPolicyResponse) Version ¶
func (ssapr ShareSetAccessPolicyResponse) Version() string
Version returns the value for header x-ms-version.
type ShareSetMetadataResponse ¶
type ShareSetMetadataResponse struct {
// contains filtered or unexported fields
}
ShareSetMetadataResponse ...
func (ShareSetMetadataResponse) Date ¶
func (ssmr ShareSetMetadataResponse) Date() time.Time
Date returns the value for header Date.
func (ShareSetMetadataResponse) ETag ¶
func (ssmr ShareSetMetadataResponse) ETag() ETag
ETag returns the value for header ETag.
func (ShareSetMetadataResponse) ErrorCode ¶
func (ssmr ShareSetMetadataResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ShareSetMetadataResponse) LastModified ¶
func (ssmr ShareSetMetadataResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (ShareSetMetadataResponse) RequestID ¶
func (ssmr ShareSetMetadataResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ShareSetMetadataResponse) Response ¶
func (ssmr ShareSetMetadataResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ShareSetMetadataResponse) Status ¶
func (ssmr ShareSetMetadataResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ShareSetMetadataResponse) StatusCode ¶
func (ssmr ShareSetMetadataResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ShareSetMetadataResponse) Version ¶
func (ssmr ShareSetMetadataResponse) Version() string
Version returns the value for header x-ms-version.
type ShareSetQuotaResponse ¶
type ShareSetQuotaResponse struct {
// contains filtered or unexported fields
}
ShareSetQuotaResponse ...
func (ShareSetQuotaResponse) Date ¶
func (ssqr ShareSetQuotaResponse) Date() time.Time
Date returns the value for header Date.
func (ShareSetQuotaResponse) ETag ¶
func (ssqr ShareSetQuotaResponse) ETag() ETag
ETag returns the value for header ETag.
func (ShareSetQuotaResponse) ErrorCode ¶
func (ssqr ShareSetQuotaResponse) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ShareSetQuotaResponse) LastModified ¶
func (ssqr ShareSetQuotaResponse) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (ShareSetQuotaResponse) RequestID ¶
func (ssqr ShareSetQuotaResponse) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ShareSetQuotaResponse) Response ¶
func (ssqr ShareSetQuotaResponse) Response() *http.Response
Response returns the raw HTTP response object.
func (ShareSetQuotaResponse) Status ¶
func (ssqr ShareSetQuotaResponse) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ShareSetQuotaResponse) StatusCode ¶
func (ssqr ShareSetQuotaResponse) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ShareSetQuotaResponse) Version ¶
func (ssqr ShareSetQuotaResponse) Version() string
Version returns the value for header x-ms-version.
type ShareStats ¶
type ShareStats struct { int32 `xml:"ShareUsageBytes"` // contains filtered or unexported fields }ShareUsageBytes
ShareStats - Stats for the share.
func (ShareStats) Date ¶
func (ss ShareStats) Date() time.Time
Date returns the value for header Date.
func (ShareStats) ErrorCode ¶
func (ss ShareStats) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (ShareStats) LastModified ¶
func (ss ShareStats) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (ShareStats) RequestID ¶
func (ss ShareStats) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (ShareStats) Response ¶
func (ss ShareStats) Response() *http.Response
Response returns the raw HTTP response object.
func (ShareStats) Status ¶
func (ss ShareStats) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (ShareStats) StatusCode ¶
func (ss ShareStats) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (ShareStats) Version ¶
func (ss ShareStats) Version() string
Version returns the value for header x-ms-version.
type ShareURL ¶
type ShareURL struct {
// contains filtered or unexported fields
}
A ShareURL represents a URL to the Azure Storage share allowing you to manipulate its directories and files.
func NewShareURL ¶
NewShareURL creates a ShareURL object using the specified URL and request policy pipeline. Note: p can't be nil.
func (ShareURL) Create ¶
func (s ShareURL) Create(ctx context.Context, metadata Metadata, quotaInGB int32) (*ShareCreateResponse, error)
Create creates a new share within a storage account. If a share with the same name already exists, the operation fails. quotaInGB specifies the maximum size of the share in gigabytes, 0 means you accept service's default quota. For more information, see https://docs.microsoft.com/rest/api/storageservices/create-share.
func (ShareURL) CreatePermission ¶
func (s ShareURL) CreatePermission(ctx context.Context, permission string) (*ShareCreatePermissionResponse, error)
CreatePermission uploads a SDDL permission string, and returns a permission key to use in conjunction with a file or folder. Note that this is only required for 9KB or larger permission strings. Furthermore, note that SDDL strings should be converted to a portable format before being uploaded. In order to make a SDDL portable, please replace well-known SIDs with their domain specific counterpart. Well-known SIDs are listed here: https://docs.microsoft.com/en-us/windows/win32/secauthz/sid-strings More info about SDDL strings can be located at: https://docs.microsoft.com/en-us/windows/win32/secauthz/security-descriptor-string-format
func (ShareURL) CreateSnapshot ¶
func (s ShareURL) CreateSnapshot(ctx context.Context, metadata Metadata) (*ShareCreateSnapshotResponse, error)
CreateSnapshot creates a read-only snapshot of a share. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-share.
func (ShareURL) Delete ¶
func (s ShareURL) Delete(ctx context.Context, deleteSnapshotsOption DeleteSnapshotsOptionType) (*ShareDeleteResponse, error)
Delete marks the specified share or share snapshot for deletion. The share or share snapshot and any files contained within it are later deleted during garbage collection. For more information, see https://docs.microsoft.com/rest/api/storageservices/delete-share.
func (ShareURL) GetPermission ¶
func (s ShareURL) GetPermission(ctx context.Context, permissionKey string) (*SharePermission, error)
GetPermission obtains a SDDL permission string from the service using a known permission key.
func (ShareURL) GetPermissions ¶
func (s ShareURL) GetPermissions(ctx context.Context) (*SignedIdentifiers, error)
GetPermissions returns information about stored access policies specified on the share. For more information, see https://docs.microsoft.com/rest/api/storageservices/get-share-acl.
func (ShareURL) GetProperties ¶
func (s ShareURL) GetProperties(ctx context.Context) (*ShareGetPropertiesResponse, error)
GetProperties returns all user-defined metadata and system properties for the specified share or share snapshot. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/get-share-properties.
func (ShareURL) GetStatistics ¶
func (s ShareURL) GetStatistics(ctx context.Context) (*ShareStats, error)
GetStatistics retrieves statistics related to the share. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/get-share-stats.
func (ShareURL) NewDirectoryURL ¶
func (s ShareURL) NewDirectoryURL(directoryName string) DirectoryURL
NewDirectoryURL creates a new DirectoryURL object by concatenating directoryName to the end of ShareURL's URL. The new DirectoryURL uses the same request policy pipeline as the ShareURL. To change the pipeline, create the DirectoryURL and then call its WithPipeline method passing in the desired pipeline object. Or, call this package's NewDirectoryURL instead of calling this object's NewDirectoryURL method.
func (ShareURL) NewRootDirectoryURL ¶
func (s ShareURL) NewRootDirectoryURL() DirectoryURL
NewRootDirectoryURL creates a new DirectoryURL object using ShareURL's URL. The new DirectoryURL uses the same request policy pipeline as the ShareURL. To change the pipeline, create the DirectoryURL and then call its WithPipeline method passing in the desired pipeline object. Or, call NewDirectoryURL instead of calling the NewDirectoryURL method.
func (ShareURL) SetMetadata ¶
func (s ShareURL) SetMetadata(ctx context.Context, metadata Metadata) (*ShareSetMetadataResponse, error)
SetMetadata sets the share's metadata. For more information, see https://docs.microsoft.com/rest/api/storageservices/set-share-metadata.
func (ShareURL) SetPermissions ¶
func (s ShareURL) SetPermissions(ctx context.Context, permissions []SignedIdentifier) (*ShareSetAccessPolicyResponse, error)
SetPermissions sets a stored access policy for use with shared access signatures. For more information, see https://docs.microsoft.com/rest/api/storageservices/set-share-acl.
func (ShareURL) SetQuota ¶
SetQuota sets service-defined properties for the specified share. quotaInGB specifies the maximum size of the share in gigabytes, 0 means no quote and uses service's default value. For more information, see https://docs.microsoft.com/en-us/rest/api/storageservices/set-share-properties.
func (ShareURL) WithPipeline ¶
WithPipeline creates a new ShareURL object identical to the source but with the specified request policy pipeline.
func (ShareURL) WithSnapshot ¶
WithSnapshot creates a new ShareURL object identical to the source but with the specified snapshot timestamp. Pass time.Time{} to remove the snapshot returning a URL to the base share.
type SharedKeyCredential ¶
type SharedKeyCredential struct {
// contains filtered or unexported fields
}
SharedKeyCredential contains an account's name and its primary or secondary key. It is immutable making it shareable and goroutine-safe.
func NewSharedKeyCredential ¶
func NewSharedKeyCredential(accountName, accountKey string) (*SharedKeyCredential, error)
NewSharedKeyCredential creates an immutable SharedKeyCredential containing the storage account's name and either its primary or secondary key.
func (SharedKeyCredential) AccountName ¶
func (f SharedKeyCredential) AccountName() string
AccountName returns the Storage account's name.
func (*SharedKeyCredential) ComputeHMACSHA256 ¶
func (f *SharedKeyCredential) ComputeHMACSHA256(message string) (base64String string)
ComputeHMACSHA256 generates a hash signature for an HTTP request or for a SAS.
func (*SharedKeyCredential) New ¶
func (f *SharedKeyCredential) New(next pipeline.Policy, po *pipeline.PolicyOptions) pipeline.Policy
New creates a credential policy object.
type SignedIdentifier ¶
type SignedIdentifier struct { // ID - A unique id. ID string `xml:"Id"` // AccessPolicy - The access policy. AccessPolicy *AccessPolicy `xml:"AccessPolicy"` }
SignedIdentifier - Signed identifier.
type SignedIdentifiers ¶
type SignedIdentifiers struct { Items []SignedIdentifier `xml:"SignedIdentifier"` // contains filtered or unexported fields }
SignedIdentifiers - Wraps the response from the shareClient.GetAccessPolicy method.
func (SignedIdentifiers) Date ¶
func (si SignedIdentifiers) Date() time.Time
Date returns the value for header Date.
func (SignedIdentifiers) ETag ¶
func (si SignedIdentifiers) ETag() ETag
ETag returns the value for header ETag.
func (SignedIdentifiers) ErrorCode ¶
func (si SignedIdentifiers) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (SignedIdentifiers) LastModified ¶
func (si SignedIdentifiers) LastModified() time.Time
LastModified returns the value for header Last-Modified.
func (SignedIdentifiers) RequestID ¶
func (si SignedIdentifiers) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (SignedIdentifiers) Response ¶
func (si SignedIdentifiers) Response() *http.Response
Response returns the raw HTTP response object.
func (SignedIdentifiers) Status ¶
func (si SignedIdentifiers) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (SignedIdentifiers) StatusCode ¶
func (si SignedIdentifiers) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (SignedIdentifiers) Version ¶
func (si SignedIdentifiers) Version() string
Version returns the value for header x-ms-version.
type StorageError ¶
type StorageError interface { // ResponseError implements error's Error(), net.Error's Temporary() and Timeout() methods & Response(). ResponseError // ServiceCode returns a service error code. Your code can use this to make error recovery decisions. ServiceCode() ServiceCodeType }
StorageError identifies a responder-generated network or response parsing error.
type StorageErrorCodeType ¶
type StorageErrorCodeType string
StorageErrorCodeType enumerates the values for storage error code type.
const ( // StorageErrorCodeAccountAlreadyExists ... StorageErrorCodeAccountAlreadyExists StorageErrorCodeType = "AccountAlreadyExists" // StorageErrorCodeAccountBeingCreated ... StorageErrorCodeAccountBeingCreated StorageErrorCodeType = "AccountBeingCreated" // StorageErrorCodeAccountIsDisabled ... StorageErrorCodeAccountIsDisabled StorageErrorCodeType = "AccountIsDisabled" // StorageErrorCodeAuthenticationFailed ... StorageErrorCodeAuthenticationFailed StorageErrorCodeType = "AuthenticationFailed" // StorageErrorCodeAuthorizationFailure ... StorageErrorCodeAuthorizationFailure StorageErrorCodeType = "AuthorizationFailure" // StorageErrorCodeAuthorizationPermissionMismatch ... StorageErrorCodeAuthorizationPermissionMismatch StorageErrorCodeType = "AuthorizationPermissionMismatch" // StorageErrorCodeAuthorizationProtocolMismatch ... StorageErrorCodeAuthorizationProtocolMismatch StorageErrorCodeType = "AuthorizationProtocolMismatch" // StorageErrorCodeAuthorizationResourceTypeMismatch ... StorageErrorCodeAuthorizationResourceTypeMismatch StorageErrorCodeType = "AuthorizationResourceTypeMismatch" // StorageErrorCodeAuthorizationServiceMismatch ... StorageErrorCodeAuthorizationServiceMismatch StorageErrorCodeType = "AuthorizationServiceMismatch" // StorageErrorCodeAuthorizationSourceIPMismatch ... StorageErrorCodeAuthorizationSourceIPMismatch StorageErrorCodeType = "AuthorizationSourceIPMismatch" // StorageErrorCodeCannotDeleteFileOrDirectory ... StorageErrorCodeCannotDeleteFileOrDirectory StorageErrorCodeType = "CannotDeleteFileOrDirectory" // StorageErrorCodeClientCacheFlushDelay ... StorageErrorCodeClientCacheFlushDelay StorageErrorCodeType = "ClientCacheFlushDelay" // StorageErrorCodeConditionHeadersNotSupported ... StorageErrorCodeConditionHeadersNotSupported StorageErrorCodeType = "ConditionHeadersNotSupported" // StorageErrorCodeConditionNotMet ... StorageErrorCodeConditionNotMet StorageErrorCodeType = "ConditionNotMet" // StorageErrorCodeContainerQuotaDowngradeNotAllowed ... StorageErrorCodeContainerQuotaDowngradeNotAllowed StorageErrorCodeType = "ContainerQuotaDowngradeNotAllowed" // StorageErrorCodeDeletePending ... StorageErrorCodeDeletePending StorageErrorCodeType = "DeletePending" // StorageErrorCodeDirectoryNotEmpty ... StorageErrorCodeDirectoryNotEmpty StorageErrorCodeType = "DirectoryNotEmpty" // StorageErrorCodeEmptyMetadataKey ... StorageErrorCodeEmptyMetadataKey StorageErrorCodeType = "EmptyMetadataKey" // StorageErrorCodeFeatureVersionMismatch ... StorageErrorCodeFeatureVersionMismatch StorageErrorCodeType = "FeatureVersionMismatch" // StorageErrorCodeFileLockConflict ... StorageErrorCodeFileLockConflict StorageErrorCodeType = "FileLockConflict" // StorageErrorCodeInsufficientAccountPermissions ... StorageErrorCodeInsufficientAccountPermissions StorageErrorCodeType = "InsufficientAccountPermissions" // StorageErrorCodeInternalError ... StorageErrorCodeInternalError StorageErrorCodeType = "InternalError" // StorageErrorCodeInvalidAuthenticationInfo ... StorageErrorCodeInvalidAuthenticationInfo StorageErrorCodeType = "InvalidAuthenticationInfo" // StorageErrorCodeInvalidFileOrDirectoryPathName ... StorageErrorCodeInvalidFileOrDirectoryPathName StorageErrorCodeType = "InvalidFileOrDirectoryPathName" // StorageErrorCodeInvalidHeaderValue ... StorageErrorCodeInvalidHeaderValue StorageErrorCodeType = "InvalidHeaderValue" // StorageErrorCodeInvalidHTTPVerb ... StorageErrorCodeInvalidHTTPVerb StorageErrorCodeType = "InvalidHttpVerb" // StorageErrorCodeInvalidInput ... StorageErrorCodeInvalidInput StorageErrorCodeType = "InvalidInput" // StorageErrorCodeInvalidMd5 ... StorageErrorCodeInvalidMd5 StorageErrorCodeType = "InvalidMd5" // StorageErrorCodeInvalidMetadata ... StorageErrorCodeInvalidMetadata StorageErrorCodeType = "InvalidMetadata" // StorageErrorCodeInvalidQueryParameterValue ... StorageErrorCodeInvalidQueryParameterValue StorageErrorCodeType = "InvalidQueryParameterValue" // StorageErrorCodeInvalidRange ... StorageErrorCodeInvalidRange StorageErrorCodeType = "InvalidRange" // StorageErrorCodeInvalidResourceName ... StorageErrorCodeInvalidResourceName StorageErrorCodeType = "InvalidResourceName" // StorageErrorCodeInvalidURI ... StorageErrorCodeInvalidURI StorageErrorCodeType = "InvalidUri" // StorageErrorCodeInvalidXMLDocument ... StorageErrorCodeInvalidXMLDocument StorageErrorCodeType = "InvalidXmlDocument" // StorageErrorCodeInvalidXMLNodeValue ... StorageErrorCodeInvalidXMLNodeValue StorageErrorCodeType = "InvalidXmlNodeValue" // StorageErrorCodeMd5Mismatch ... StorageErrorCodeMd5Mismatch StorageErrorCodeType = "Md5Mismatch" // StorageErrorCodeMetadataTooLarge ... StorageErrorCodeMetadataTooLarge StorageErrorCodeType = "MetadataTooLarge" // StorageErrorCodeMissingContentLengthHeader ... StorageErrorCodeMissingContentLengthHeader StorageErrorCodeType = "MissingContentLengthHeader" // StorageErrorCodeMissingRequiredHeader ... StorageErrorCodeMissingRequiredHeader StorageErrorCodeType = "MissingRequiredHeader" // StorageErrorCodeMissingRequiredQueryParameter ... StorageErrorCodeMissingRequiredQueryParameter StorageErrorCodeType = "MissingRequiredQueryParameter" // StorageErrorCodeMissingRequiredXMLNode ... StorageErrorCodeMissingRequiredXMLNode StorageErrorCodeType = "MissingRequiredXmlNode" // StorageErrorCodeMultipleConditionHeadersNotSupported ... StorageErrorCodeMultipleConditionHeadersNotSupported StorageErrorCodeType = "MultipleConditionHeadersNotSupported" // StorageErrorCodeNone represents an empty StorageErrorCodeType. StorageErrorCodeNone StorageErrorCodeType = "" // StorageErrorCodeOperationTimedOut ... StorageErrorCodeOperationTimedOut StorageErrorCodeType = "OperationTimedOut" // StorageErrorCodeOutOfRangeInput ... StorageErrorCodeOutOfRangeInput StorageErrorCodeType = "OutOfRangeInput" // StorageErrorCodeOutOfRangeQueryParameterValue ... StorageErrorCodeOutOfRangeQueryParameterValue StorageErrorCodeType = "OutOfRangeQueryParameterValue" // StorageErrorCodeParentNotFound ... StorageErrorCodeParentNotFound StorageErrorCodeType = "ParentNotFound" // StorageErrorCodeReadOnlyAttribute ... StorageErrorCodeReadOnlyAttribute StorageErrorCodeType = "ReadOnlyAttribute" // StorageErrorCodeRequestBodyTooLarge ... StorageErrorCodeRequestBodyTooLarge StorageErrorCodeType = "RequestBodyTooLarge" // StorageErrorCodeRequestURLFailedToParse ... StorageErrorCodeRequestURLFailedToParse StorageErrorCodeType = "RequestUrlFailedToParse" // StorageErrorCodeResourceAlreadyExists ... StorageErrorCodeResourceAlreadyExists StorageErrorCodeType = "ResourceAlreadyExists" // StorageErrorCodeResourceNotFound ... StorageErrorCodeResourceNotFound StorageErrorCodeType = "ResourceNotFound" // StorageErrorCodeResourceTypeMismatch ... StorageErrorCodeResourceTypeMismatch StorageErrorCodeType = "ResourceTypeMismatch" // StorageErrorCodeServerBusy ... StorageErrorCodeServerBusy StorageErrorCodeType = "ServerBusy" StorageErrorCodeShareAlreadyExists StorageErrorCodeType = "ShareAlreadyExists" StorageErrorCodeShareBeingDeleted StorageErrorCodeType = "ShareBeingDeleted" StorageErrorCodeShareDisabled StorageErrorCodeType = "ShareDisabled" StorageErrorCodeShareHasSnapshots StorageErrorCodeType = "ShareHasSnapshots" StorageErrorCodeShareNotFound StorageErrorCodeType = "ShareNotFound" StorageErrorCodeShareSnapshotCountExceeded StorageErrorCodeType = "ShareSnapshotCountExceeded" StorageErrorCodeShareSnapshotInProgress StorageErrorCodeType = "ShareSnapshotInProgress" StorageErrorCodeShareSnapshotOperationNotSupported StorageErrorCodeType = "ShareSnapshotOperationNotSupported" // StorageErrorCodeSharingViolation ... StorageErrorCodeSharingViolation StorageErrorCodeType = "SharingViolation" // StorageErrorCodeUnsupportedHeader ... StorageErrorCodeUnsupportedHeader StorageErrorCodeType = "UnsupportedHeader" // StorageErrorCodeUnsupportedHTTPVerb ... StorageErrorCodeUnsupportedHTTPVerb StorageErrorCodeType = "UnsupportedHttpVerb" // StorageErrorCodeUnsupportedQueryParameter ... StorageErrorCodeUnsupportedQueryParameter StorageErrorCodeType = "UnsupportedQueryParameter" // StorageErrorCodeUnsupportedXMLNode ... StorageErrorCodeUnsupportedXMLNode StorageErrorCodeType = "UnsupportedXmlNode" )
func PossibleStorageErrorCodeTypeValues ¶
func PossibleStorageErrorCodeTypeValues() []StorageErrorCodeType
PossibleStorageErrorCodeTypeValues returns an array of possible values for the StorageErrorCodeType const type.
type StorageServiceProperties ¶
type StorageServiceProperties struct { // HourMetrics - A summary of request statistics grouped by API in hourly aggregates for files. HourMetrics *Metrics `xml:"HourMetrics"` // MinuteMetrics - A summary of request statistics grouped by API in minute aggregates for files. MinuteMetrics *Metrics `xml:"MinuteMetrics"` // Cors - The set of CORS rules. Cors []CorsRule `xml:"Cors>CorsRule"` // contains filtered or unexported fields }
StorageServiceProperties - Storage service properties.
func (StorageServiceProperties) ErrorCode ¶
func (ssp StorageServiceProperties) ErrorCode() string
ErrorCode returns the value for header x-ms-error-code.
func (StorageServiceProperties) RequestID ¶
func (ssp StorageServiceProperties) RequestID() string
RequestID returns the value for header x-ms-request-id.
func (StorageServiceProperties) Response ¶
func (ssp StorageServiceProperties) Response() *http.Response
Response returns the raw HTTP response object.
func (StorageServiceProperties) Status ¶
func (ssp StorageServiceProperties) Status() string
Status returns the HTTP status message of the response, e.g. "200 OK".
func (StorageServiceProperties) StatusCode ¶
func (ssp StorageServiceProperties) StatusCode() int
StatusCode returns the HTTP status code of the response, e.g. 200.
func (StorageServiceProperties) Version ¶
func (ssp StorageServiceProperties) Version() string
Version returns the value for header x-ms-version.
type TelemetryOptions ¶
type TelemetryOptions struct { // Value is a string prepended to each request's User-Agent and sent to the service. // The service records the user-agent in logs for diagnostics and tracking of client requests. Value string }
TelemetryOptions configures the telemetry policy's behavior.
type TokenCredential ¶
type TokenCredential interface { Credential Token() string SetToken(newToken string) }
TokenCredential represents a token credential (which is also a pipeline.Factory).
func NewTokenCredential ¶
func NewTokenCredential(initialToken string, tokenRefresher TokenRefresher) TokenCredential
NewTokenCredential creates a token credential for use with role-based access control (RBAC) access to Azure Storage resources. You initialize the TokenCredential with an initial token value. If you pass a non-nil value for tokenRefresher, then the function you pass will be called immediately so it can refresh and change the TokenCredential's token value by calling SetToken. Your tokenRefresher function must return a time.Duration indicating how long the TokenCredential object should wait before calling your tokenRefresher function again. If your tokenRefresher callback fails to refresh the token, you can return a duration of 0 to stop your TokenCredential object from ever invoking tokenRefresher again. Also, one way to deal with failing to refresh a token is to cancel a context.Context object used by requests that have the TokenCredential object in their pipeline.
type TokenRefresher ¶
type TokenRefresher func(credential TokenCredential) time.Duration
TokenRefresher represents a callback method that you write; this method is called periodically so you can refresh the token credential's value.
type UploadToAzureFileOptions ¶
type UploadToAzureFileOptions struct { // RangeSize specifies the range size to use in each parallel upload; the default (and maximum size) is FileMaxUploadRangeBytes. RangeSize int64 // Progress is a function that is invoked periodically as bytes are send in a UploadRange call to the FileURL. Progress pipeline.ProgressReceiver // Parallelism indicates the maximum number of ranges to upload in parallel. If 0(default) is provided, 5 parallelism will be used by default. Parallelism uint16 // FileHTTPHeaders contains read/writeable file properties. FileHTTPHeaders FileHTTPHeaders // Metadata contains metadata key/value pairs. Metadata Metadata }
UploadToAzureFileOptions identifies options used by the UploadBufferToAzureFile and UploadFileToAzureFile functions.
Source Files ¶
- highlevel.go
- parsing_urls.go
- sas_service.go
- service_codes_file.go
- smb_property_bitflags.go
- url_directory.go
- url_file.go
- url_service.go
- url_share.go
- version.go
- zc_credential_anonymous.go
- zc_credential_shared_key.go
- zc_credential_token.go
- zc_mmf_unix.go
- zc_pipeline.go
- zc_policy_request_log.go
- zc_policy_retry.go
- zc_policy_telemetry.go
- zc_policy_unique_request_id.go
- zc_retry_reader.go
- zc_sas_account.go
- zc_sas_query_params.go
- zc_service_codes_common.go
- zc_storage_error.go
- zc_util_validate.go
- zc_uuid.go
- zt_doc.go
- zz_generated_client.go
- zz_generated_directory.go
- zz_generated_file.go
- zz_generated_models.go
- zz_generated_responder_policy.go
- zz_generated_response_error.go
- zz_generated_service.go
- zz_generated_share.go
- zz_generated_validation.go
- zz_generated_version.go
- zz_response_helpers.go