Documentation ¶
Index ¶
- Constants
- Variables
- type Blob
- type BlobListResponse
- type BlobProperties
- type BlobStorageClient
- func (b BlobStorageClient) BlobExists(container, name string) (bool, error)
- func (b BlobStorageClient) ContainerExists(container string) (bool, error)
- func (b BlobStorageClient) CopyBlob(container, name, sourceBlob string) error
- func (b BlobStorageClient) CreateContainer(name string, access ContainerAccessType) error
- func (b BlobStorageClient) CreateContainerIfNotExists(name string, access ContainerAccessType) (bool, error)
- func (b BlobStorageClient) DeleteBlob(container, name string) error
- func (b BlobStorageClient) DeleteBlobIfExists(container, name string) (bool, error)
- func (b BlobStorageClient) DeleteContainer(name string) error
- func (b BlobStorageClient) DeleteContainerIfExists(container string) (bool, error)
- func (b BlobStorageClient) GetBlob(container, name string) (io.ReadCloser, error)
- func (b BlobStorageClient) GetBlobProperties(container, name string) (*BlobProperties, error)
- func (b BlobStorageClient) GetBlobRange(container, name, bytesRange string) (io.ReadCloser, error)
- func (b BlobStorageClient) GetBlobSASURI(container, name string, expiry time.Time, permissions string) (string, error)
- func (b BlobStorageClient) GetBlobUrl(container, name string) string
- func (b BlobStorageClient) GetBlockList(container, name string, blockType BlockListType) (BlockListResponse, error)
- func (b BlobStorageClient) ListBlobs(container string, params ListBlobsParameters) (BlobListResponse, error)
- func (b BlobStorageClient) ListContainers(params ListContainersParameters) (ContainerListResponse, error)
- func (b BlobStorageClient) PutBlock(container, name, blockId string, chunk []byte) error
- func (b BlobStorageClient) PutBlockBlob(container, name string, blob io.Reader) error
- func (b BlobStorageClient) PutBlockList(container, name string, blocks []Block) error
- func (b BlobStorageClient) PutBlockWithLength(container, name, blockId string, size uint64, blob io.Reader) error
- type BlobType
- type Block
- type BlockListResponse
- type BlockListType
- type BlockResponse
- type BlockStatus
- type Container
- type ContainerAccessType
- type ContainerListResponse
- type ContainerProperties
- type ListBlobsParameters
- type ListContainersParameters
- type StorageClient
- type StorageServiceError
Constants ¶
View Source
const ( DefaultBaseUrl = "core.windows.net" DefaultApiVersion = "2014-02-14" )
View Source
const MaxBlobBlockSize = 4 * 1024 * 1024
Variables ¶
View Source
var ( ErrNotCreated = errors.New("storage: operation has returned a successful error code other than 201 Created.") ErrNotAccepted = errors.New("storage: operation has returned a successful error code other than 202 Accepted.") )
Functions ¶
This section is empty.
Types ¶
type Blob ¶
type Blob struct { Name string `xml:"Name"` Properties BlobProperties `xml:"Properties"` }
type BlobListResponse ¶
type BlobProperties ¶
type BlobProperties struct { LastModified string `xml:"Last-Modified"` Etag string `xml:"Etag"` ContentMD5 string `xml:"Content-MD5"` ContentLength uint64 `xml:"Content-Length"` ContentType string `xml:"Content-Type"` ContentEncoding string `xml:"Content-Encoding"` SequenceNumber int64 `xml:"x-ms-blob-sequence-number"` CopyId string `xml:"CopyId"` CopyStatus string `xml:"CopyStatus"` CopySource string `xml:"CopySource"` CopyProgress string `xml:"CopyProgress"` CopyCompletionTime string `xml:"CopyCompletionTime"` CopyStatusDescription string `xml:"CopyStatusDescription"` }
type BlobStorageClient ¶
type BlobStorageClient struct {
// contains filtered or unexported fields
}
func (BlobStorageClient) BlobExists ¶
func (b BlobStorageClient) BlobExists(container, name string) (bool, error)
func (BlobStorageClient) ContainerExists ¶
func (b BlobStorageClient) ContainerExists(container string) (bool, error)
func (BlobStorageClient) CopyBlob ¶
func (b BlobStorageClient) CopyBlob(container, name, sourceBlob string) error
func (BlobStorageClient) CreateContainer ¶
func (b BlobStorageClient) CreateContainer(name string, access ContainerAccessType) error
func (BlobStorageClient) CreateContainerIfNotExists ¶
func (b BlobStorageClient) CreateContainerIfNotExists(name string, access ContainerAccessType) (bool, error)
func (BlobStorageClient) DeleteBlob ¶
func (b BlobStorageClient) DeleteBlob(container, name string) error
func (BlobStorageClient) DeleteBlobIfExists ¶
func (b BlobStorageClient) DeleteBlobIfExists(container, name string) (bool, error)
func (BlobStorageClient) DeleteContainer ¶
func (b BlobStorageClient) DeleteContainer(name string) error
func (BlobStorageClient) DeleteContainerIfExists ¶
func (b BlobStorageClient) DeleteContainerIfExists(container string) (bool, error)
func (BlobStorageClient) GetBlob ¶
func (b BlobStorageClient) GetBlob(container, name string) (io.ReadCloser, error)
func (BlobStorageClient) GetBlobProperties ¶
func (b BlobStorageClient) GetBlobProperties(container, name string) (*BlobProperties, error)
func (BlobStorageClient) GetBlobRange ¶
func (b BlobStorageClient) GetBlobRange(container, name, bytesRange string) (io.ReadCloser, error)
func (BlobStorageClient) GetBlobSASURI ¶
func (BlobStorageClient) GetBlobUrl ¶
func (b BlobStorageClient) GetBlobUrl(container, name string) string
func (BlobStorageClient) GetBlockList ¶
func (b BlobStorageClient) GetBlockList(container, name string, blockType BlockListType) (BlockListResponse, error)
func (BlobStorageClient) ListBlobs ¶
func (b BlobStorageClient) ListBlobs(container string, params ListBlobsParameters) (BlobListResponse, error)
func (BlobStorageClient) ListContainers ¶
func (b BlobStorageClient) ListContainers(params ListContainersParameters) (ContainerListResponse, error)
func (BlobStorageClient) PutBlock ¶
func (b BlobStorageClient) PutBlock(container, name, blockId string, chunk []byte) error
func (BlobStorageClient) PutBlockBlob ¶
func (b BlobStorageClient) PutBlockBlob(container, name string, blob io.Reader) error
func (BlobStorageClient) PutBlockList ¶
func (b BlobStorageClient) PutBlockList(container, name string, blocks []Block) error
func (BlobStorageClient) PutBlockWithLength ¶
type Block ¶
type Block struct { Id string Status BlockStatus }
type BlockListResponse ¶
type BlockListResponse struct { XMLName xml.Name `xml:"BlockList"` CommittedBlocks []BlockResponse `xml:"CommittedBlocks>Block"` UncommittedBlocks []BlockResponse `xml:"UncommittedBlocks>Block"` }
type BlockListType ¶
type BlockListType string
const ( BlockListTypeAll BlockListType = "all" BlockListTypeCommitted BlockListType = "committed" BlockListTypeUncommitted BlockListType = "uncommitted" )
type BlockResponse ¶
type BlockStatus ¶
type BlockStatus string
const ( BlockStatusUncommitted BlockStatus = "Uncommitted" BlockStatusCommitted BlockStatus = "Committed" BlockStatusLatest BlockStatus = "Latest" )
type Container ¶
type Container struct { Name string `xml:"Name"` Properties ContainerProperties `xml:"Properties"` }
type ContainerAccessType ¶
type ContainerAccessType string
const ( ContainerAccessTypePrivate ContainerAccessType = "" ContainerAccessTypeBlob ContainerAccessType = "blob" ContainerAccessTypeContainer ContainerAccessType = "container" )
type ContainerListResponse ¶
type ContainerProperties ¶
type ListBlobsParameters ¶
type ListBlobsParameters struct { Prefix string Delimiter string Marker string Include string MaxResults uint Timeout uint }
func (ListBlobsParameters) GetParameters ¶
func (p ListBlobsParameters) GetParameters() url.Values
type ListContainersParameters ¶
type ListContainersParameters struct { Prefix string Marker string Include string MaxResults uint Timeout uint }
func (ListContainersParameters) GetParameters ¶
func (p ListContainersParameters) GetParameters() url.Values
type StorageClient ¶
type StorageClient struct {
// contains filtered or unexported fields
}
func NewBasicClient ¶
func NewBasicClient(accountName, accountKey string) (*StorageClient, error)
func NewClient ¶
func NewClient(accountName, accountKey, blobServiceBaseUrl, apiVersion string, useHttps bool) (*StorageClient, error)
func (StorageClient) GetBlobService ¶
func (c StorageClient) GetBlobService() *BlobStorageClient
type StorageServiceError ¶
type StorageServiceError struct { Code string `xml:"Code"` Message string `xml:"Message"` AuthenticationErrorDetail string `xml:"AuthenticationErrorDetail"` QueryParameterName string `xml:"QueryParameterName"` QueryParameterValue string `xml:"QueryParameterValue"` Reason string `xml:"Reason"` StatusCode int RequestId string }
func (StorageServiceError) Error ¶
func (e StorageServiceError) Error() string
Click to show internal directories.
Click to hide internal directories.