alist/drivers/template/meta.go

32 lines
617 B
Go
Raw Normal View History

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