Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Shortcut string `json:"shortcut,omitempty" yaml:"shortcut,omitempty"`
Type ActionType `json:"type" yaml:"type"`
// copy
Text string `json:"text,omitempty" yaml:"text,omitempty"`
// edit
Path string `json:"path,omitempty" yaml:"path,omitempty"`
// open
Url string `json:"url,omitempty" yaml:"url,omitempty"`
// run
Command string `json:"command,omitempty" yaml:"command,omitempty"`
Inputs []FormInput `json:"inputs,omitempty" yaml:"inputs,omitempty"`
OnSuccess OnSuccessType `json:"onSuccess,omitempty" yaml:"onSuccess,omitempty"`
}
type ActionType ¶
type ActionType int
const ( UnknownAction ActionType = iota CopyAction OpenAction ReadAction EditAction RunAction ReloadAction )
func (ActionType) MarshalJSON ¶
func (a ActionType) MarshalJSON() ([]byte, error)
func (ActionType) MarshalYAML ¶
func (a ActionType) MarshalYAML() (interface{}, error)
func (*ActionType) UnmarshalJSON ¶
func (a *ActionType) UnmarshalJSON(bytes []byte) error
func (*ActionType) UnmarshalYAML ¶
func (a *ActionType) UnmarshalYAML(node *yaml.Node) error
type FormInput ¶
type FormInput struct {
Name string `json:"name" yaml:"name"`
Type FormInputType `json:"type" yaml:"type"`
Title string `json:"title" yaml:"title"`
Placeholder string `json:"placeholder,omitempty" yaml:"placeholder,omitempty"`
Default string `json:"default,omitempty" yaml:"default,omitempty"`
// Only for dropdown
Choices []string `json:"choices,omitempty" yaml:"choices,omitempty"`
}
type FormInputType ¶
type FormInputType int
const ( UnknownFormInput FormInputType = iota TextField TextArea DropDown )
func (FormInputType) MarshalJSON ¶
func (input FormInputType) MarshalJSON() ([]byte, error)
func (FormInputType) MarshalYAML ¶
func (input FormInputType) MarshalYAML() (interface{}, error)
func (*FormInputType) UnmarshalJSON ¶
func (input *FormInputType) UnmarshalJSON(bytes []byte) error
func (*FormInputType) UnmarshalYAML ¶
func (input *FormInputType) UnmarshalYAML(value *yaml.Node) error
type ListItem ¶
type ListItem struct {
Id string `json:"id,omitempty" yaml:"id,omitempty"`
Alias string `json:"alias,omitempty" yaml:"alias,omitempty"`
Title string `json:"title" yaml:"title"`
Subtitle string `json:"subtitle,omitempty" yaml:"subtitle,omitempty"`
Detail *Detail `json:"detail,omitempty" yaml:"detail,omitempty"`
Accessories []string `json:"accessories,omitempty" yaml:"accessories,omitempty"`
Actions []Action `json:"actions,omitempty" yaml:"actions,omitempty"`
}
type OnSuccessType ¶
type OnSuccessType int
const ( ExitOnSuccess OnSuccessType = iota PushOnSuccess ReplaceOnSuccess ReloadOnSuccess )
func (OnSuccessType) MarshalJSON ¶
func (o OnSuccessType) MarshalJSON() ([]byte, error)
func (OnSuccessType) MarshalYAML ¶
func (o OnSuccessType) MarshalYAML() (interface{}, error)
func (*OnSuccessType) UnmarshalJSON ¶
func (o *OnSuccessType) UnmarshalJSON(bytes []byte) error
func (*OnSuccessType) UnmarshalYAML ¶
func (o *OnSuccessType) UnmarshalYAML(node *yaml.Node) error
type Page ¶
type Page struct {
Type PageType `json:"type" yaml:"type"`
Title string `json:"title,omitempty" yaml:"title,omitempty"`
Actions []Action `json:"actions,omitempty" yaml:"actions,omitempty"`
// Detail page
Text string `json:"text,omitempty" yaml:"text,omitempty"`
Command string `json:"command,omitempty" yaml:"command,omitempty"`
Language string `json:"language,omitempty" yaml:"language,omitempty"`
// List page
ShowDetail bool `json:"showDetail,omitempty" yaml:"showDetail,omitempty"`
GenerateItems bool `json:"generateItems,omitempty" yaml:"generateItems,omitempty"`
EmptyText string `json:"emptyText,omitempty" yaml:"emptyText,omitempty"`
Items []ListItem `json:"items" yaml:"items"`
}
type PageType ¶
type PageType int
func (PageType) MarshalJSON ¶
func (PageType) MarshalYAML ¶
func (*PageType) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.