alist/internal/driver/item.go

49 lines
863 B
Go
Raw Normal View History

2022-06-06 14:31:56 +00:00
package driver
2022-06-08 08:20:58 +00:00
type Additional interface{}
2022-06-07 10:13:55 +00:00
2022-06-08 08:32:20 +00:00
type Select string
2022-06-07 10:13:55 +00:00
type Item struct {
Name string `json:"name"`
Type string `json:"type"`
Default string `json:"default"`
Options string `json:"options"`
2022-06-07 10:13:55 +00:00
Required bool `json:"required"`
2022-06-08 08:20:58 +00:00
Help string `json:"help"`
}
2022-08-30 06:39:10 +00:00
type Info struct {
2022-07-27 03:43:49 +00:00
Common []Item `json:"common"`
2022-06-08 08:20:58 +00:00
Additional []Item `json:"additional"`
2022-08-30 06:39:10 +00:00
Config Config `json:"config"`
2022-06-06 14:31:56 +00:00
}
2022-06-10 12:20:45 +00:00
2022-09-04 05:07:53 +00:00
type IRootPath interface {
GetRootPath() string
2022-06-11 06:43:03 +00:00
}
2022-09-04 05:07:53 +00:00
type IRootId interface {
GetRootId() string
2022-06-10 12:20:45 +00:00
}
2022-09-04 05:07:53 +00:00
type RootPath struct {
RootFolderPath string `json:"root_folder_path"`
2022-06-10 12:20:45 +00:00
}
2022-09-04 05:07:53 +00:00
type RootID struct {
RootFolderID string `json:"root_folder_id"`
2022-06-11 06:43:03 +00:00
}
2022-09-04 05:07:53 +00:00
func (r RootPath) GetRootPath() string {
return r.RootFolderPath
2022-06-11 06:43:03 +00:00
}
2022-09-04 05:07:53 +00:00
func (r *RootPath) SetRootPath(path string) {
r.RootFolderPath = path
}
func (r RootID) GetRootId() string {
return r.RootFolderID
2022-06-10 12:20:45 +00:00
}