alist/internal/driver/addition.go

52 lines
972 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
const (
TypeString = "string"
TypeSelect = "select"
TypeBool = "bool"
TypeText = "text"
2022-06-08 08:42:06 +00:00
TypeNumber = "number"
2022-06-08 08:32:20 +00:00
)
2022-06-07 10:13:55 +00:00
type Item struct {
Name string `json:"name"`
Type string `json:"type"`
Default string `json:"default"`
Values string `json:"values"`
Required bool `json:"required"`
2022-06-08 08:20:58 +00:00
Help string `json:"help"`
}
type Items struct {
Main []Item `json:"main"`
Additional []Item `json:"additional"`
2022-06-06 14:31:56 +00:00
}
2022-06-10 12:20:45 +00:00
type IRootFolderPath interface {
2022-06-11 06:43:03 +00:00
GetRootFolderPath() string
}
type IRootFolderId interface {
GetRootFolderId() string
2022-06-10 12:20:45 +00:00
}
type RootFolderPath struct {
RootFolder string `json:"root_folder" help:"root folder path" default:"/"`
}
2022-06-11 06:43:03 +00:00
type RootFolderId struct {
RootFolder string `json:"root_folder" help:"root folder id"`
}
func (r RootFolderPath) GetRootFolderPath() string {
return r.RootFolder
}
func (r RootFolderId) GetRootFolderId() string {
2022-06-10 12:20:45 +00:00
return r.RootFolder
}