feat: add alist v3 driver (close #1833 pr #2129)

* feat: add alist v3 driver (close #1833)

* chore: use generics

Co-authored-by: Noah Hsu <i@nn.ci>
This commit is contained in:
BoYanZh
2022-10-27 10:54:49 +08:00
committed by GitHub
parent f0cc0a76a9
commit 5f79d665d9
7 changed files with 165 additions and 8 deletions

26
drivers/alist_v3/meta.go Normal file
View File

@ -0,0 +1,26 @@
package alist_v3
import (
"github.com/alist-org/alist/v3/internal/driver"
"github.com/alist-org/alist/v3/internal/op"
)
type Addition struct {
driver.RootPath
Address string `json:"url" required:"true"`
Password string `json:"password"`
AccessToken string `json:"access_token"`
}
var config = driver.Config{
Name: "AList V3",
LocalSort: true,
NoUpload: true,
DefaultRoot: "/",
}
func init() {
op.RegisterDriver(config, func() driver.Driver {
return &AListV3{}
})
}