* feat: add alist v3 driver (close #1833) * chore: use generics Co-authored-by: Noah Hsu <i@nn.ci>
This commit is contained in:
26
drivers/alist_v3/meta.go
Normal file
26
drivers/alist_v3/meta.go
Normal 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{}
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user