Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alist-org
GitHub Repository: alist-org/alist
Path: blob/main/drivers/azure_blob/meta.go
1987 views
1
package azure_blob
2
3
import (
4
"github.com/alist-org/alist/v3/internal/driver"
5
"github.com/alist-org/alist/v3/internal/op"
6
)
7
8
type Addition struct {
9
Endpoint string `json:"endpoint" required:"true" default:"https://<accountname>.blob.core.windows.net/" help:"e.g. https://accountname.blob.core.windows.net/. The full endpoint URL for Azure Storage, including the unique storage account name (3 ~ 24 numbers and lowercase letters only)."`
10
AccessKey string `json:"access_key" required:"true" help:"The access key for Azure Storage, used for authentication. https://learn.microsoft.com/azure/storage/common/storage-account-keys-manage"`
11
ContainerName string `json:"container_name" required:"true" help:"The name of the container in Azure Storage (created in the Azure portal). https://learn.microsoft.com/azure/storage/blobs/blob-containers-portal"`
12
SignURLExpire int `json:"sign_url_expire" type:"number" default:"4" help:"The expiration time for SAS URLs, in hours."`
13
}
14
15
// implement GetRootId interface
16
func (r Addition) GetRootId() string {
17
return r.ContainerName
18
}
19
20
var config = driver.Config{
21
Name: "Azure Blob Storage",
22
LocalSort: true,
23
CheckStatus: true,
24
}
25
26
func init() {
27
op.RegisterDriver(func() driver.Driver {
28
return &AzureBlob{
29
config: config,
30
}
31
})
32
}
33
34