Documentation ¶
Index ¶
- Variables
- type AccountConfig
- type AccountConn
- func (a *AccountConn) AppendBlob(ctx context.Context, container string, reader io.Reader, blobName string) error
- func (a *AccountConn) BlobBytes(ctx context.Context, container string, blob string) ([]byte, error)
- func (a *AccountConn) BlobReader(ctx context.Context, container string, blob string) (io.ReadCloser, error)
- func (a *AccountConn) GetBlobSASURI(ctx context.Context, container string, blobName string, opts SASOptions) (string, error)
- func (a *AccountConn) GetContainerSASURI(ctx context.Context, container string, opts SASOptions) (string, error)
- func (a *AccountConn) ListBlobs(ctx context.Context, container string, prefix string) ([]string, error)
- func (a *AccountConn) ListBlobsByPattern(ctx context.Context, container string, pattern string) ([]string, error)
- func (a *AccountConn) NewContainer(containerName string) (*ContainerConn, error)
- func (a *AccountConn) TruncateBlob(ctx context.Context, container string, reader io.Reader, blobName string) error
- type BlobStorage
- func (bs *BlobStorage) AppendBlob(ctx context.Context, account string, container string, reader io.Reader, ...) error
- func (bs *BlobStorage) BlobBytes(ctx context.Context, account string, container string, blob string) ([]byte, error)
- func (bs *BlobStorage) BlobReader(ctx context.Context, account string, container string, blob string) (io.ReadCloser, error)
- func (bs *BlobStorage) GetBlobSASURI(ctx context.Context, account string, container string, blobName string, ...) (string, error)
- func (bs *BlobStorage) GetContainerSASURI(ctx context.Context, account string, container string, opts SASOptions) (string, error)
- func (bs *BlobStorage) ListBlobs(ctx context.Context, account string, container string, prefix string) ([]string, error)
- func (bs *BlobStorage) ListBlobsByPattern(ctx context.Context, account string, container string, pattern string) ([]string, error)
- func (bs *BlobStorage) TruncateBlob(ctx context.Context, account string, container string, reader io.Reader, ...) error
- type ContainerConfig
- type ContainerConn
- func (c *ContainerConn) AppendBlob(ctx context.Context, reader io.Reader, blobName string) error
- func (c *ContainerConn) BlobBytes(ctx context.Context, blob string) ([]byte, error)
- func (c *ContainerConn) BlobReader(ctx context.Context, blobName string) (io.ReadCloser, error)
- func (c *ContainerConn) GetBlobSASURI(ctx context.Context, blobName string, opts SASOptions) (string, error)
- func (c *ContainerConn) GetContainerSASURI(ctx context.Context, opts SASOptions) (string, error)
- func (c *ContainerConn) ListBlobs(ctx context.Context, prefix string) ([]string, error)
- func (c *ContainerConn) ListBlobsByPattern(ctx context.Context, pattern string) ([]string, error)
- func (c *ContainerConn) TruncateBlob(ctx context.Context, reader io.Reader, blobName string) error
- type SASOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownStorageAccount = errors.New("unknown storage account") ErrUploadFailed = errors.New("blob upload failed") )
Functions ¶
This section is empty.
Types ¶
type AccountConfig ¶
type AccountConn ¶ added in v0.1.8
type AccountConn struct {
// contains filtered or unexported fields
}
func NewAccount ¶
func NewAccount(config *AccountConfig) (*AccountConn, error)
NewAccount returns an Azure implementation of a Storage account
func (*AccountConn) AppendBlob ¶ added in v0.1.8
func (*AccountConn) BlobReader ¶ added in v0.1.8
func (a *AccountConn) BlobReader(ctx context.Context, container string, blob string) (io.ReadCloser, error)
func (*AccountConn) GetBlobSASURI ¶ added in v0.1.8
func (a *AccountConn) GetBlobSASURI(ctx context.Context, container string, blobName string, opts SASOptions) (string, error)
func (*AccountConn) GetContainerSASURI ¶ added in v0.1.8
func (a *AccountConn) GetContainerSASURI(ctx context.Context, container string, opts SASOptions) (string, error)
func (*AccountConn) ListBlobsByPattern ¶ added in v0.1.8
func (*AccountConn) NewContainer ¶ added in v0.1.8
func (a *AccountConn) NewContainer(containerName string) (*ContainerConn, error)
Get the connection to a container in the storage account.
func (*AccountConn) TruncateBlob ¶ added in v0.1.8
type BlobStorage ¶ added in v0.1.8
type BlobStorage struct {
// contains filtered or unexported fields
}
func New ¶
func New(confs []*AccountConfig) (*BlobStorage, error)
A collection of storage accounts Send in confs for all blob storage accounts you want to connect to
func (*BlobStorage) AppendBlob ¶ added in v0.1.8
func (*BlobStorage) BlobReader ¶ added in v0.1.8
func (bs *BlobStorage) BlobReader(ctx context.Context, account string, container string, blob string) (io.ReadCloser, error)
func (*BlobStorage) GetBlobSASURI ¶ added in v0.1.8
func (bs *BlobStorage) GetBlobSASURI(ctx context.Context, account string, container string, blobName string, opts SASOptions) (string, error)
func (*BlobStorage) GetContainerSASURI ¶ added in v0.1.8
func (bs *BlobStorage) GetContainerSASURI(ctx context.Context, account string, container string, opts SASOptions) (string, error)
func (*BlobStorage) ListBlobsByPattern ¶ added in v0.1.8
type ContainerConfig ¶ added in v0.1.8
type ContainerConn ¶ added in v0.1.8
type ContainerConn struct {
// contains filtered or unexported fields
}
func NewAccountContainerConn ¶ added in v0.1.8
func NewAccountContainerConn(conf ContainerConfig) (*ContainerConn, error)
Get a connection to a container in an azure storage account. Use this func if you don't have a connection to an Azure account already.
func NewContainerConn ¶ added in v0.1.8
func NewContainerConn(storage storage.BlobStorageClient, containerName string) (*ContainerConn, error)
Get a connection to a container in an azure storage account. Use this func if you already have a connection to an Azure storage account.
func (*ContainerConn) AppendBlob ¶ added in v0.1.8
func (*ContainerConn) BlobReader ¶ added in v0.1.8
func (c *ContainerConn) BlobReader(ctx context.Context, blobName string) (io.ReadCloser, error)
func (*ContainerConn) GetBlobSASURI ¶ added in v0.1.8
func (c *ContainerConn) GetBlobSASURI(ctx context.Context, blobName string, opts SASOptions) (string, error)
func (*ContainerConn) GetContainerSASURI ¶ added in v0.1.8
func (c *ContainerConn) GetContainerSASURI(ctx context.Context, opts SASOptions) (string, error)
func (*ContainerConn) ListBlobsByPattern ¶ added in v0.1.8
func (*ContainerConn) TruncateBlob ¶ added in v0.1.8
Click to show internal directories.
Click to hide internal directories.