Files
OpenList/internal/driver/item.go

45 lines
907 B
Go
Raw Normal View History

2022-06-06 22:31:56 +08:00
package driver
2022-06-08 16:20:58 +08:00
type Additional interface{}
2022-06-07 18:13:55 +08:00
2022-06-08 16:32:20 +08:00
type Select string
2022-06-07 18:13:55 +08:00
type Item struct {
Name string `json:"name"`
Type string `json:"type"`
Default string `json:"default"`
Options string `json:"options"`
2022-06-07 18:13:55 +08:00
Required bool `json:"required"`
2022-06-08 16:20:58 +08:00
Help string `json:"help"`
}
2022-08-30 14:39:10 +08:00
type Info struct {
2022-07-27 11:43:49 +08:00
Common []Item `json:"common"`
2022-06-08 16:20:58 +08:00
Additional []Item `json:"additional"`
2022-08-30 14:39:10 +08:00
Config Config `json:"config"`
2022-06-06 22:31:56 +08:00
}
2022-06-10 20:20:45 +08:00
type IRootFolderPath interface {
2022-06-11 14:43:03 +08:00
GetRootFolderPath() string
}
type IRootFolderId interface {
GetRootFolderId() string
2022-06-10 20:20:45 +08:00
}
type RootFolderPath struct {
RootFolder string `json:"root_folder" required:"true" help:"Root folder path"`
2022-06-10 20:20:45 +08:00
}
2022-09-02 18:24:14 +08:00
type RootFolderID struct {
RootFolder string `json:"root_folder" required:"true" help:"Root folder id"`
2022-06-11 14:43:03 +08:00
}
func (r RootFolderPath) GetRootFolderPath() string {
return r.RootFolder
}
2022-09-02 18:24:14 +08:00
func (r RootFolderID) GetRootFolderId() string {
2022-06-10 20:20:45 +08:00
return r.RootFolder
}