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"`
|
2022-08-26 15:08:31 +08:00
|
|
|
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
|
|
|
|
2022-09-04 13:07:53 +08:00
|
|
|
type IRootPath interface {
|
|
|
|
GetRootPath() string
|
2022-06-11 14:43:03 +08:00
|
|
|
}
|
|
|
|
|
2022-09-04 13:07:53 +08:00
|
|
|
type IRootId interface {
|
|
|
|
GetRootId() string
|
2022-06-10 20:20:45 +08:00
|
|
|
}
|
|
|
|
|
2022-09-04 13:07:53 +08:00
|
|
|
type RootPath struct {
|
2022-09-11 16:23:46 +08:00
|
|
|
RootFolderPath string `json:"root_folder_path"`
|
2022-06-10 20:20:45 +08:00
|
|
|
}
|
|
|
|
|
2022-09-04 13:07:53 +08:00
|
|
|
type RootID struct {
|
2022-09-11 16:23:46 +08:00
|
|
|
RootFolderID string `json:"root_folder_id"`
|
2022-06-11 14:43:03 +08:00
|
|
|
}
|
|
|
|
|
2022-09-04 13:07:53 +08:00
|
|
|
func (r RootPath) GetRootPath() string {
|
|
|
|
return r.RootFolderPath
|
2022-06-11 14:43:03 +08:00
|
|
|
}
|
|
|
|
|
2022-09-04 13:07:53 +08:00
|
|
|
func (r *RootPath) SetRootPath(path string) {
|
|
|
|
r.RootFolderPath = path
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r RootID) GetRootId() string {
|
|
|
|
return r.RootFolderID
|
2022-06-10 20:20:45 +08:00
|
|
|
}
|