Documentation
¶
Index ¶
Constants ¶
View Source
const ( CopyAction = "copy" OpenAction = "open" RunAction = "run" PasteAction = "paste" ReloadAction = "reload" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
Title string `json:"title,omitempty"`
Type ActionType `json:"type"`
Key string `json:"key,omitempty"`
// copy
Text string `json:"text,omitempty"`
// open
Target string `json:"target,omitempty"`
// push
Page string `json:"page,omitempty"`
// run
Command *Command `json:"command,omitempty"`
// share
Params Params `json:"params,omitempty"`
}
type ActionType ¶
type ActionType string
type Command ¶ added in v0.9.0
type Command struct {
Name string `json:"name"`
Args []string `json:"args,omitempty"`
Input string `json:"input,omitempty"`
}
func (*Command) UnmarshalJSON ¶ added in v0.9.0
type DropDownItem ¶ added in v0.9.0
type FormInputType ¶
type FormInputType string
const ( TextInput FormInputType = "text" TextAreaInput FormInputType = "textarea" SelectInput FormInputType = "select" CheckboxInput FormInputType = "checkbox" )
type Input ¶ added in v0.7.0
type Input struct {
Name string `json:"name"`
Type FormInputType `json:"type"`
Title string `json:"title"`
Placeholder string `json:"placeholder,omitempty"`
Default any `json:"default,omitempty"`
Optional bool `json:"optional,omitempty"`
// Only for dropdown
Items []DropDownItem `json:"items,omitempty"`
// Only for checkbox
Label string `json:"label,omitempty"`
TrueSubstitution string `json:"trueSubstitution,omitempty"`
FalseSubstitution string `json:"falseSubstitution,omitempty"`
}
func NewDropDown ¶ added in v0.9.23
func NewDropDown(name string, title string, items ...DropDownItem) Input
func NewTextAreaInput ¶ added in v0.9.23
Click to show internal directories.
Click to hide internal directories.