Documentation
¶
Index ¶
- Constants
- type Addition
- type AzureBlob
- func (d *AzureBlob) Config() driver.Config
- func (d *AzureBlob) Copy(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)
- func (d *AzureBlob) Drop(ctx context.Context) error
- func (d *AzureBlob) GetAddition() driver.Additional
- func (d *AzureBlob) Init(ctx context.Context) error
- func (d *AzureBlob) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *AzureBlob) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *AzureBlob) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) (model.Obj, error)
- func (d *AzureBlob) Move(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)
- func (d *AzureBlob) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, ...) (model.Obj, error)
- func (d *AzureBlob) Remove(ctx context.Context, obj model.Obj) error
- func (d *AzureBlob) Rename(ctx context.Context, srcObj model.Obj, newName string) (model.Obj, error)
Constants ¶
View Source
const ( // MaxRetries defines the maximum number of retry attempts for Azure operations MaxRetries = 3 // RetryDelay defines the base delay between retries RetryDelay = 3 * time.Second // MaxBatchSize defines the maximum number of operations in a single batch request MaxBatchSize = 128 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addition ¶
type Addition struct { Endpoint string `` /* 270-byte string literal not displayed */ AccessKey string `` /* 176-byte string literal not displayed */ ContainerName string `` /* 189-byte string literal not displayed */ SignURLExpire int `json:"sign_url_expire" type:"number" default:"4" help:"The expiration time for SAS URLs, in hours."` }
type AzureBlob ¶
Azure Blob Storage based on the blob APIs Link: https://learn.microsoft.com/rest/api/storageservices/blob-service-rest-api
func (*AzureBlob) Copy ¶
Copy duplicates an object (file or directory) to a specified destination directory.
func (*AzureBlob) GetAddition ¶
func (d *AzureBlob) GetAddition() driver.Additional
GetAddition returns additional settings specific to Azure Blob Storage.
func (*AzureBlob) Init ¶
Init initializes the Azure Blob Storage client using shared key authentication.
func (*AzureBlob) Link ¶
func (d *AzureBlob) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
Link generates a temporary SAS URL for accessing a blob.
func (*AzureBlob) List ¶
func (d *AzureBlob) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
List retrieves blobs and directories under the specified path.
func (*AzureBlob) MakeDir ¶
func (d *AzureBlob) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) (model.Obj, error)
MakeDir creates a virtual directory by uploading an empty blob as a marker.
func (*AzureBlob) Put ¶
func (d *AzureBlob) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) (model.Obj, error)
Put uploads a file stream to Azure Blob Storage with progress tracking.
Click to show internal directories.
Click to hide internal directories.