Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alist-org
GitHub Repository: alist-org/alist
Path: blob/main/internal/driver/item.go
1560 views
1
package driver
2
3
type Additional interface{}
4
5
type Select string
6
7
type Item struct {
8
Name string `json:"name"`
9
Type string `json:"type"`
10
Default string `json:"default"`
11
Options string `json:"options"`
12
Required bool `json:"required"`
13
Help string `json:"help"`
14
}
15
16
type Info struct {
17
Common []Item `json:"common"`
18
Additional []Item `json:"additional"`
19
Config Config `json:"config"`
20
}
21
22
type IRootPath interface {
23
GetRootPath() string
24
}
25
26
type IRootId interface {
27
GetRootId() string
28
}
29
30
type RootPath struct {
31
RootFolderPath string `json:"root_folder_path"`
32
}
33
34
type RootID struct {
35
RootFolderID string `json:"root_folder_id"`
36
}
37
38
func (r RootPath) GetRootPath() string {
39
return r.RootFolderPath
40
}
41
42
func (r *RootPath) SetRootPath(path string) {
43
r.RootFolderPath = path
44
}
45
46
func (r RootID) GetRootId() string {
47
return r.RootFolderID
48
}
49
50