Documentation
¶
Index ¶
- func Draw(model *Model) (err error)
- func GetPreferenceId(extension string, script string, name string) string
- func NewCopyTextCmd(text string) tea.Cmd
- func NewEditCmd(path string) tea.Cmd
- func NewErrorCmd(err error) func() tea.Msg
- func NewExecCmd(command string) tea.Cmd
- func NewOpenPathCmd(path string) tea.Cmd
- func NewOpenUrlCmd(url string) tea.Cmd
- func NewPushCmd(c Container) tea.Cmd
- func NewReloadPageCmd(with map[string]app.ScriptInput) tea.Cmd
- func NewRunScriptCmd(extension string, script string, with map[string]app.ScriptInput) tea.Cmd
- func PopCmd() tea.Msg
- type Action
- type ActionList
- func (al *ActionList) Blur()
- func (al *ActionList) Focus() tea.Cmd
- func (al ActionList) Focused() bool
- func (al *ActionList) SetActions(actions ...Action)
- func (al *ActionList) SetSize(w, h int)
- func (al *ActionList) SetTitle(title string)
- func (al ActionList) Update(msg tea.Msg) (ActionList, tea.Cmd)
- func (al ActionList) View() string
- type Checkbox
- type CommandOutput
- type Container
- type CopyTextMsg
- type Detail
- func (d *Detail) Init() tea.Cmd
- func (c *Detail) SetActions(actions ...Action)
- func (d *Detail) SetContent(content string)
- func (d *Detail) SetDetail(detail app.Detail) tea.Cmd
- func (d *Detail) SetIsLoading(isLoading bool) tea.Cmd
- func (c *Detail) SetSize(width, height int)
- func (c Detail) SideBarVisible() bool
- func (c Detail) Update(msg tea.Msg) (Container, tea.Cmd)
- func (c *Detail) View() string
- type DetailMsg
- type DropDown
- type DropDownItem
- type ExecCommandMsg
- type Filter
- func (m *Filter) CursorDown()
- func (m *Filter) CursorUp()
- func (f *Filter) FilterItems(query string)
- func (m Filter) Init() tea.Cmd
- func (f Filter) Selection() FilterItem
- func (f *Filter) SetItems(items []FilterItem)
- func (f *Filter) SetSize(width, height int)
- func (f Filter) Update(msg tea.Msg) (Filter, tea.Cmd)
- func (m Filter) View() string
- type FilterItem
- type Footer
- type Form
- type FormInput
- type FormItem
- type Header
- type KeyStore
- type List
- func (c *List) FilterItems(query string) tea.Cmd
- func (c *List) Init() tea.Cmd
- func (c List) Query() string
- func (c *List) SetIsLoading(isLoading bool) tea.Cmd
- func (c *List) SetItems(items []ListItem) tea.Cmd
- func (c *List) SetSize(width, height int)
- func (c *List) Update(msg tea.Msg) (Container, tea.Cmd)
- func (c List) View() string
- type ListItem
- type Model
- type OpenPathMsg
- type OpenUrlMsg
- type PreviewContentMsg
- type PreviewUpdateMsg
- type ReloadPageMsg
- type RunScriptMsg
- type ScriptPreference
- type ScriptRunner
- func (c *ScriptRunner) CheckMissingParameters() []FormItem
- func (c *ScriptRunner) Init() tea.Cmd
- func (c ScriptRunner) Preferences() map[string]app.ScriptInput
- func (c *ScriptRunner) Run() tea.Cmd
- func (c ScriptRunner) ScriptCmd() tea.Msg
- func (c *ScriptRunner) SetSize(width, height int)
- func (c *ScriptRunner) Update(msg tea.Msg) (Container, tea.Cmd)
- func (c *ScriptRunner) View() string
- type Styles
- type SubmitMsg
- type SunbeamConfig
- type TextArea
- type TextInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCopyTextCmd ¶
func NewEditCmd ¶
func NewErrorCmd ¶
func NewExecCmd ¶
func NewOpenPathCmd ¶
func NewOpenUrlCmd ¶
func NewPushCmd ¶
func NewReloadPageCmd ¶
func NewReloadPageCmd(with map[string]app.ScriptInput) tea.Cmd
func NewRunScriptCmd ¶
Types ¶
type ActionList ¶
type ActionList struct {
// contains filtered or unexported fields
}
func NewActionList ¶
func NewActionList() ActionList
func (*ActionList) Blur ¶
func (al *ActionList) Blur()
func (*ActionList) Focus ¶
func (al *ActionList) Focus() tea.Cmd
func (ActionList) Focused ¶
func (al ActionList) Focused() bool
func (*ActionList) SetActions ¶
func (al *ActionList) SetActions(actions ...Action)
func (*ActionList) SetSize ¶
func (al *ActionList) SetSize(w, h int)
func (*ActionList) SetTitle ¶
func (al *ActionList) SetTitle(title string)
func (ActionList) Update ¶
func (al ActionList) Update(msg tea.Msg) (ActionList, tea.Cmd)
func (ActionList) View ¶
func (al ActionList) View() string
type Checkbox ¶
func NewCheckbox ¶
type CommandOutput ¶
type CommandOutput string
type Container ¶
type CopyTextMsg ¶
type CopyTextMsg struct {
Text string
}
type Detail ¶
func (*Detail) SetActions ¶
func (*Detail) SetContent ¶
func (Detail) SideBarVisible ¶
type DropDown ¶
type DropDown struct {
// contains filtered or unexported fields
}
func NewDropDown ¶
type DropDownItem ¶
type DropDownItem struct {
// contains filtered or unexported fields
}
func (DropDownItem) FilterValue ¶
func (d DropDownItem) FilterValue() string
func (DropDownItem) ID ¶
func (d DropDownItem) ID() string
type ExecCommandMsg ¶
func (ExecCommandMsg) OnSuccessCmd ¶
func (msg ExecCommandMsg) OnSuccessCmd() tea.Cmd
type Filter ¶
type Filter struct {
Width, Height int
Query string
Background lipgloss.TerminalColor
DrawLines bool
// contains filtered or unexported fields
}
func (*Filter) CursorDown ¶
func (m *Filter) CursorDown()
func (*Filter) FilterItems ¶
func (Filter) Selection ¶
func (f Filter) Selection() FilterItem
func (*Filter) SetItems ¶
func (f *Filter) SetItems(items []FilterItem)
type FilterItem ¶
type Footer ¶
type Footer struct {
// contains filtered or unexported fields
}
func (*Footer) SetBindings ¶
type KeyStore ¶
type KeyStore struct {
// contains filtered or unexported fields
}
func (KeyStore) GetPreference ¶
func (*KeyStore) SetPreference ¶
func (k *KeyStore) SetPreference(preferences ...ScriptPreference) error
type ListItem ¶
type ListItem struct {
Id string
Title string
Subtitle string
Preview string
PreviewCmd func() string
Accessories []string
Actions []Action
}
func ParseScriptItem ¶
func ParseScriptItem(scriptItem app.ScriptItem) ListItem
func (ListItem) FilterValue ¶
type OpenPathMsg ¶
type OpenPathMsg struct {
Path string
}
type OpenUrlMsg ¶
type OpenUrlMsg struct {
Url string
}
type PreviewContentMsg ¶
type PreviewContentMsg string
type PreviewUpdateMsg ¶
type PreviewUpdateMsg struct {
// contains filtered or unexported fields
}
type ReloadPageMsg ¶
type ReloadPageMsg struct {
With map[string]app.ScriptInput
}
type RunScriptMsg ¶
type RunScriptMsg struct {
Extension string
Script string
With map[string]app.ScriptInput
OnSuccess string
}
func (RunScriptMsg) OnSuccessCmd ¶
func (msg RunScriptMsg) OnSuccessCmd() tea.Cmd
type ScriptPreference ¶
type ScriptRunner ¶
func NewScriptRunner ¶
func NewScriptRunner(extension app.Extension, script app.Script, with map[string]app.ScriptInput) *ScriptRunner
func (*ScriptRunner) CheckMissingParameters ¶
func (c *ScriptRunner) CheckMissingParameters() []FormItem
func (*ScriptRunner) Init ¶
func (c *ScriptRunner) Init() tea.Cmd
func (ScriptRunner) Preferences ¶
func (c ScriptRunner) Preferences() map[string]app.ScriptInput
func (*ScriptRunner) Run ¶
func (c *ScriptRunner) Run() tea.Cmd
func (ScriptRunner) ScriptCmd ¶
func (c ScriptRunner) ScriptCmd() tea.Msg
func (*ScriptRunner) SetSize ¶
func (c *ScriptRunner) SetSize(width, height int)
func (*ScriptRunner) View ¶
func (c *ScriptRunner) View() string
type SunbeamConfig ¶
type SunbeamConfig struct {
Height int
Width int
FullScreen bool
AccentColor string
CopyCommand string
OpenUrlCommand string
RootItems []app.RootItem `yaml:"rootItems"`
}
var Config SunbeamConfig = SunbeamConfig{ Height: 0, Width: 0, AccentColor: "13", FullScreen: true, }
type TextArea ¶
func NewTextArea ¶
type TextInput ¶
func NewTextInput ¶
Click to show internal directories.
Click to hide internal directories.