2022-09-01 22:13:37 +08:00
|
|
|
package template
|
2022-08-31 16:32:51 +08:00
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/alist-org/alist/v3/internal/driver"
|
2022-08-31 21:01:15 +08:00
|
|
|
"github.com/alist-org/alist/v3/internal/op"
|
2022-08-31 16:32:51 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
type Addition struct {
|
|
|
|
// Usually one of two
|
|
|
|
driver.RootFolderPath
|
2022-09-02 18:24:14 +08:00
|
|
|
driver.RootFolderID
|
2022-08-31 16:32:51 +08:00
|
|
|
// define other
|
|
|
|
Field string `json:"field" type:"select" required:"true" options:"a,b,c" default:"a"`
|
|
|
|
}
|
|
|
|
|
|
|
|
var config = driver.Config{
|
2022-09-01 22:13:37 +08:00
|
|
|
Name: "Template",
|
2022-08-31 16:32:51 +08:00
|
|
|
LocalSort: false,
|
|
|
|
OnlyLocal: false,
|
|
|
|
OnlyProxy: false,
|
|
|
|
NoCache: false,
|
|
|
|
NoUpload: false,
|
|
|
|
NeedMs: false,
|
|
|
|
DefaultRoot: "root, / or other",
|
|
|
|
}
|
|
|
|
|
|
|
|
func New() driver.Driver {
|
|
|
|
return &Template{}
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
2022-08-31 21:01:15 +08:00
|
|
|
op.RegisterDriver(config, New)
|
2022-08-31 16:32:51 +08:00
|
|
|
}
|