Documentation
¶
Index ¶
- func ActionTitle(action types.Action) string
- type ActionList
- func (al *ActionList) Blur()
- func (al *ActionList) Clear()
- func (al *ActionList) Focus() tea.Cmd
- func (al ActionList) Focused() bool
- func (al *ActionList) SetActions(actions ...types.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 CmdGenerator
- type CommandOutput
- type CommandRunner
- type ContentMsg
- type Detail
- type DetailMsg
- type DropDown
- func (d *DropDown) Blur()
- func (d *DropDown) Focus() tea.Cmd
- func (dd DropDown) HasMatch() bool
- func (dd *DropDown) Height() int
- func (dd *DropDown) SetWidth(width int)
- func (d DropDown) Title() string
- func (d *DropDown) Update(msg tea.Msg) (FormInput, tea.Cmd)
- func (d DropDown) Value() string
- func (dd DropDown) View() string
- type DropDownItem
- 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) Select(id string)
- 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 IsLoadingMsg
- type List
- func (c *List) Init() tea.Cmd
- func (c List) Query() string
- func (c *List) RefreshDetail()
- func (c List) Selection() *ListItem
- func (list *List) SetActions(actions []types.Action)
- func (c *List) SetIsLoading(isLoading bool) tea.Cmd
- func (c *List) SetItems(items []ListItem, selectedId string) tea.Cmd
- func (c *List) SetQuery(query string)
- func (c *List) SetSize(width, height int)
- func (c *List) SetTitle(title string)
- func (c *List) Update(msg tea.Msg) (Page, tea.Cmd)
- func (c List) View() string
- type ListItem
- type Match
- type Page
- type PageGenerator
- type PageValidator
- type Paginator
- type PopPageMsg
- type PushPageMsg
- type RunnerView
- type SelectionChangeMsg
- type SubmitFormMsg
- type SunbeamOptions
- type TextArea
- type TextInput
- type UpdateQueryMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActionTitle ¶ added in v0.7.0
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) Clear ¶ added in v0.0.9
func (al *ActionList) Clear()
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 ...types.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 CmdGenerator ¶ added in v0.6.1
type CommandOutput ¶
type CommandOutput []byte
type CommandRunner ¶ added in v0.1.0
type CommandRunner struct {
Generator PageGenerator
Validator PageValidator
// contains filtered or unexported fields
}
func NewRunner ¶ added in v0.6.1
func NewRunner(generator PageGenerator, validator PageValidator, url *url.URL) *CommandRunner
func (*CommandRunner) Init ¶ added in v0.1.0
func (c *CommandRunner) Init() tea.Cmd
func (*CommandRunner) Refresh ¶ added in v0.6.1
func (c *CommandRunner) Refresh() tea.Msg
func (*CommandRunner) SetIsloading ¶ added in v0.1.0
func (c *CommandRunner) SetIsloading(isLoading bool) tea.Cmd
func (*CommandRunner) SetSize ¶ added in v0.1.0
func (c *CommandRunner) SetSize(width, height int)
func (*CommandRunner) View ¶ added in v0.1.0
func (c *CommandRunner) View() string
type ContentMsg ¶ added in v0.6.1
type ContentMsg string
type Detail ¶
type Detail struct {
Style lipgloss.Style
Language string
ContentCmd func() string
// contains filtered or unexported fields
}
func (*Detail) RefreshContent ¶ added in v0.6.1
func (c *Detail) RefreshContent()
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 Filter ¶
type Filter struct {
Width, Height int
Query string
Less func(i, j FilterItem) bool
EmptyText string
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 Form ¶
type Form struct {
// contains filtered or unexported fields
}
func (*Form) CurrentItem ¶ added in v0.0.9
func (*Form) ScrollViewport ¶ added in v0.0.9
func (c *Form) ScrollViewport()
type IsLoadingMsg ¶ added in v0.0.9
type IsLoadingMsg struct{}
type List ¶
type List struct {
DetailFunc func(types.ListItem) string
Aliases map[string]types.Action
GenerateItems bool
ShowDetail bool
// contains filtered or unexported fields
}
func (*List) RefreshDetail ¶ added in v0.6.1
func (c *List) RefreshDetail()
func (*List) SetActions ¶ added in v0.4.1
type ListItem ¶
Probably not necessary, need to be refactored
func ParseScriptItem ¶
func (ListItem) FilterValue ¶
type PageGenerator ¶ added in v0.6.1
func NewCommandGenerator ¶ added in v0.6.1
func NewCommandGenerator(command string, args []string, dir string) PageGenerator
func NewFileGenerator ¶ added in v0.6.1
func NewFileGenerator(name string) PageGenerator
func NewHttpGenerator ¶ added in v0.7.0
func NewHttpGenerator(req *http.Request) PageGenerator
type PageValidator ¶ added in v0.6.1
type Paginator ¶ added in v0.7.0
type Paginator struct {
// contains filtered or unexported fields
}
func NewPaginator ¶ added in v0.7.0
type PopPageMsg ¶ added in v0.1.0
type PopPageMsg struct{}
type PushPageMsg ¶ added in v0.1.0
type PushPageMsg struct {
// contains filtered or unexported fields
}
type RunnerView ¶ added in v0.6.1
type RunnerView int
const ( RunnerViewList RunnerView = iota RunnerViewDetail RunnerViewLoading )
type SelectionChangeMsg ¶ added in v0.1.0
type SelectionChangeMsg struct {
SelectionId string
}
type SubmitFormMsg ¶ added in v0.1.0
type SunbeamOptions ¶ added in v0.1.0
type TextArea ¶
func NewTextArea ¶
type TextInput ¶
func NewTextInput ¶
type UpdateQueryMsg ¶ added in v0.1.0
type UpdateQueryMsg struct {
Query string
}
Click to show internal directories.
Click to hide internal directories.