Documentation ¶
Index ¶
- Constants
- type AzBlob
- type AzConfig
- type AzService
- type AzUpload
- func (upload *AzUpload) DeclareLength(ctx context.Context, length int64) error
- func (upload *AzUpload) FinishUpload(ctx context.Context) error
- func (upload *AzUpload) GetInfo(ctx context.Context) (handler.FileInfo, error)
- func (upload *AzUpload) GetReader(ctx context.Context) (io.ReadCloser, error)
- func (upload *AzUpload) Terminate(ctx context.Context) error
- func (upload *AzUpload) WriteChunk(ctx context.Context, offset int64, src io.Reader) (int64, error)
- type AzureStore
- func (store AzureStore) AsLengthDeclarableUpload(upload handler.Upload) handler.LengthDeclarableUpload
- func (store AzureStore) AsTerminatableUpload(upload handler.Upload) handler.TerminatableUpload
- func (store AzureStore) GetUpload(ctx context.Context, id string) (handler.Upload, error)
- func (store AzureStore) NewUpload(ctx context.Context, info handler.FileInfo) (handler.Upload, error)
- func (store AzureStore) UseIn(composer *handler.StoreComposer)
- type BlockBlob
- func (blockBlob *BlockBlob) Commit(ctx context.Context) error
- func (blockBlob *BlockBlob) Delete(ctx context.Context) error
- func (blockBlob *BlockBlob) Download(ctx context.Context) (io.ReadCloser, error)
- func (blockBlob *BlockBlob) GetOffset(ctx context.Context) (int64, error)
- func (blockBlob *BlockBlob) Upload(ctx context.Context, body io.ReadSeeker) error
- type InfoBlob
- func (infoBlob *InfoBlob) Commit(ctx context.Context) error
- func (infoBlob *InfoBlob) Delete(ctx context.Context) error
- func (infoBlob *InfoBlob) Download(ctx context.Context) (io.ReadCloser, error)
- func (infoBlob *InfoBlob) GetOffset(ctx context.Context) (int64, error)
- func (infoBlob *InfoBlob) Upload(ctx context.Context, body io.ReadSeeker) error
Constants ¶
View Source
const ( InfoBlobSuffix string = ".info" MaxBlockBlobSize int64 = azblob.BlockBlobMaxBlocks * azblob.BlockBlobMaxStageBlockBytes MaxBlockBlobChunkSize int64 = azblob.BlockBlobMaxStageBlockBytes )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzBlob ¶
type AzBlob interface { // Delete the blob Delete(ctx context.Context) error // Upload the blob Upload(ctx context.Context, body io.ReadSeeker) error // Download returns a readcloser to download the contents of the blob Download(ctx context.Context) (io.ReadCloser, error) // Get the offset of the blob and its indexes GetOffset(ctx context.Context) (int64, error) // Commit the uploaded blocks to the BlockBlob Commit(ctx context.Context) error }
type AzService ¶
func NewAzureService ¶
New Azure service for communication to Azure BlockBlob Storage API
type AzUpload ¶
func (*AzUpload) DeclareLength ¶
func (*AzUpload) FinishUpload ¶
Finish the file upload and commit the block list
type AzureStore ¶
func New ¶
func New(service AzService) *AzureStore
func (AzureStore) AsLengthDeclarableUpload ¶
func (store AzureStore) AsLengthDeclarableUpload(upload handler.Upload) handler.LengthDeclarableUpload
func (AzureStore) AsTerminatableUpload ¶
func (store AzureStore) AsTerminatableUpload(upload handler.Upload) handler.TerminatableUpload
func (AzureStore) UseIn ¶
func (store AzureStore) UseIn(composer *handler.StoreComposer)
UseIn sets this store as the core data store in the passed composer and adds all possible extension to it.
type BlockBlob ¶
type BlockBlob struct { Blob *azblob.BlockBlobURL AccessTier azblob.AccessTierType Indexes []int }
func (*BlockBlob) Commit ¶
After all the blocks have been uploaded, we commit the unstaged blocks by sending a Block List
type InfoBlob ¶
type InfoBlob struct {
Blob *azblob.BlockBlobURL
}
Click to show internal directories.
Click to hide internal directories.