mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-07-19 01:48:42 +08:00

* Enable blank issue * chore(README.md): update docs (temporally) * Update FUNDING.yml * chore: purge README.md * chore: change module name to OpenListTeam/OpenList * fix: fix link errors * chore: remove v3 in module name * fix: resolve some conficts * fix: resolve conficts * docs: update with latest file --------- Co-authored-by: ShenLin <773933146@qq.com> Co-authored-by: Hantong Chen <cxwdyx620@gmail.com> Co-authored-by: joshua <i@joshua.su> Co-authored-by: Hantong Chen <70561268+cxw620@users.noreply.github.com>
33 lines
1.3 KiB
Go
33 lines
1.3 KiB
Go
package azure_blob
|
|
|
|
import (
|
|
"github.com/OpenListTeam/OpenList/internal/driver"
|
|
"github.com/OpenListTeam/OpenList/internal/op"
|
|
)
|
|
|
|
type Addition struct {
|
|
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)."`
|
|
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"`
|
|
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"`
|
|
SignURLExpire int `json:"sign_url_expire" type:"number" default:"4" help:"The expiration time for SAS URLs, in hours."`
|
|
}
|
|
|
|
// implement GetRootId interface
|
|
func (r Addition) GetRootId() string {
|
|
return r.ContainerName
|
|
}
|
|
|
|
var config = driver.Config{
|
|
Name: "Azure Blob Storage",
|
|
LocalSort: true,
|
|
CheckStatus: true,
|
|
}
|
|
|
|
func init() {
|
|
op.RegisterDriver(func() driver.Driver {
|
|
return &AzureBlob{
|
|
config: config,
|
|
}
|
|
})
|
|
}
|