Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alist-org
GitHub Repository: alist-org/alist
Path: blob/main/drivers/lanzou/meta.go
1988 views
1
package lanzou
2
3
import (
4
"github.com/alist-org/alist/v3/internal/driver"
5
"github.com/alist-org/alist/v3/internal/op"
6
)
7
8
type Addition struct {
9
Type string `json:"type" type:"select" options:"account,cookie,url" default:"cookie"`
10
11
Account string `json:"account"`
12
Password string `json:"password"`
13
14
Cookie string `json:"cookie" help:"about 15 days valid, ignore if shareUrl is used"`
15
16
driver.RootID
17
SharePassword string `json:"share_password"`
18
BaseUrl string `json:"baseUrl" required:"true" default:"https://pc.woozooo.com" help:"basic URL for file operation"`
19
ShareUrl string `json:"shareUrl" required:"true" default:"https://pan.lanzoui.com" help:"used to get the sharing page"`
20
UserAgent string `json:"user_agent" required:"true" default:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.39 (KHTML, like Gecko) Chrome/89.0.4389.111 Safari/537.39"`
21
RepairFileInfo bool `json:"repair_file_info" help:"To use webdav, you need to enable it"`
22
}
23
24
func (a *Addition) IsCookie() bool {
25
return a.Type == "cookie"
26
}
27
28
func (a *Addition) IsAccount() bool {
29
return a.Type == "account"
30
}
31
32
var config = driver.Config{
33
Name: "Lanzou",
34
LocalSort: true,
35
DefaultRoot: "-1",
36
}
37
38
func init() {
39
op.RegisterDriver(func() driver.Driver {
40
return &LanZou{}
41
})
42
}
43
44