Documentation
¶
Index ¶
- Variables
- func ClipboardWrite(data []byte)
- func ClipboardWriteString(data string)
- func Run(ctx context.Context, opts Options) error
- type Content
- func (c Content) ActiveResultData() ResultData
- func (c Content) ActiveText() string
- func (c *Content) AddTab()
- func (c *Content) Blur()
- func (c *Content) BlurResults()
- func (c *Content) ClearActive()
- func (c *Content) CloseTab()
- func (c Content) CurrentRow() (headers []string, values []string, ok bool)
- func (c *Content) Focus()
- func (c *Content) FocusResults()
- func (c *Content) GoToTab(n int)
- func (c Content) HasResults() bool
- func (c *Content) NextTab()
- func (c *Content) PrevTab()
- func (c *Content) Resize(width, height int)
- func (c *Content) ResultsEnsureVisible(height int)
- func (c *Content) ResultsMoveDown()
- func (c *Content) ResultsMoveUp()
- func (c *Content) ResultsScrollLeft()
- func (c *Content) ResultsScrollRight()
- func (c *Content) SetActiveText(text string)
- func (c *Content) SetResult(data ResultData)
- func (c *Content) SetTabs(tabs []TabItem)
- func (c *Content) Update(msg tea.Msg) tea.Cmd
- func (c Content) View(width, height int) string
- type ExplainView
- func (e *ExplainView) Clear()
- func (e ExplainView) HasContent() bool
- func (e *ExplainView) ScrollDown(height, width int)
- func (e *ExplainView) ScrollUp()
- func (e *ExplainView) SetError(msg string)
- func (e *ExplainView) SetResult(result plugin.BrowserExplainResult)
- func (e ExplainView) View(width, height int) string
- type FocusArea
- type Footer
- type Help
- type NavItem
- type Navbar
- type Options
- type ResultData
- type Results
- func (r Results) CurrentRow() (headers []string, values []string, ok bool)
- func (r *Results) EnsureVisible(height int)
- func (r Results) HasData() bool
- func (r *Results) MoveDown()
- func (r *Results) MoveUp()
- func (r *Results) Resize(width, height int)
- func (r *Results) ScrollLeft()
- func (r *Results) ScrollRight()
- func (r *Results) SetData(data ResultData)
- func (r Results) View(width, height int, focused bool) string
- type RowDetail
- func (r *RowDetail) Close()
- func (r *RowDetail) Copy()
- func (r *RowDetail) JumpNext()
- func (r *RowDetail) JumpPrev()
- func (r *RowDetail) Open(headers, values []string)
- func (r *RowDetail) ScrollDown(totalLines, visible int)
- func (r *RowDetail) ScrollLeft()
- func (r *RowDetail) ScrollRight()
- func (r *RowDetail) ScrollUp()
- func (r RowDetail) View(width, height int) string
- type Sidebar
- type TUI
- type TabItem
- type Tabs
- type Theme
- type Tree
- func (t *Tree) AdvanceSpinner()
- func (t *Tree) Collapse()
- func (t *Tree) CursorExpandable() bool
- func (t *Tree) CursorIDPath() []string
- func (t *Tree) CursorLabel() string
- func (t Tree) CursorPath() ([]string, bool)
- func (t *Tree) EnsureVisible(height int)
- func (t *Tree) Expand()
- func (t *Tree) IsLoading() bool
- func (t *Tree) MoveDown()
- func (t *Tree) MoveUp()
- func (t *Tree) SetLoaded(ids []string, children []TreeItem)
- func (t *Tree) StartLoading() ([]string, bool)
- func (t Tree) View(width, height int) string
- type TreeItem
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Accent = lipgloss.Color("37") AccentInactive = lipgloss.Color("245") Black = lipgloss.Color("234") )
View Source
var DefaultTheme = Theme{ Bg: lipgloss.Color("235"), Fg: lipgloss.Color("252"), Muted: lipgloss.Color("243"), Accent: Accent, AccentInactive: AccentInactive, Success: lipgloss.Color("2"), Danger: lipgloss.Color("1"), Warning: lipgloss.Color("3"), FooterBg: Accent, FooterFg: Black, SidebarBg: lipgloss.Color("236"), NavBg: lipgloss.Color("235"), NavFg: Accent, NavActiveBg: Accent, NavActiveFg: Black, SidebarHeaderBg: lipgloss.Color("237"), SidebarHeaderFg: lipgloss.Color("252"), }
Functions ¶
func ClipboardWrite ¶
func ClipboardWrite(data []byte)
func ClipboardWriteString ¶
func ClipboardWriteString(data string)
Types ¶
type Content ¶
type Content struct {
Tabs Tabs
// contains filtered or unexported fields
}
func NewContent ¶
func (Content) ActiveResultData ¶
func (c Content) ActiveResultData() ResultData
func (Content) ActiveText ¶
func (*Content) BlurResults ¶
func (c *Content) BlurResults()
func (*Content) ClearActive ¶
func (c *Content) ClearActive()
func (Content) CurrentRow ¶
func (*Content) FocusResults ¶
func (c *Content) FocusResults()
func (Content) HasResults ¶
func (*Content) ResultsEnsureVisible ¶
func (*Content) ResultsMoveDown ¶
func (c *Content) ResultsMoveDown()
func (*Content) ResultsMoveUp ¶
func (c *Content) ResultsMoveUp()
func (*Content) ResultsScrollLeft ¶
func (c *Content) ResultsScrollLeft()
func (*Content) ResultsScrollRight ¶
func (c *Content) ResultsScrollRight()
func (*Content) SetActiveText ¶
func (*Content) SetResult ¶
func (c *Content) SetResult(data ResultData)
type ExplainView ¶
type ExplainView struct {
// contains filtered or unexported fields
}
func NewExplainView ¶
func NewExplainView(theme Theme) ExplainView
func (*ExplainView) Clear ¶
func (e *ExplainView) Clear()
func (ExplainView) HasContent ¶
func (e ExplainView) HasContent() bool
func (*ExplainView) ScrollDown ¶
func (e *ExplainView) ScrollDown(height, width int)
func (*ExplainView) ScrollUp ¶
func (e *ExplainView) ScrollUp()
func (*ExplainView) SetError ¶
func (e *ExplainView) SetError(msg string)
func (*ExplainView) SetResult ¶
func (e *ExplainView) SetResult(result plugin.BrowserExplainResult)
func (ExplainView) View ¶
func (e ExplainView) View(width, height int) string
type Navbar ¶
type Navbar struct {
// contains filtered or unexported fields
}
func (Navbar) ActiveTitle ¶
type ResultData ¶
type Results ¶
type Results struct {
// contains filtered or unexported fields
}
func NewResults ¶
func (Results) CurrentRow ¶
func (*Results) EnsureVisible ¶
func (*Results) ScrollLeft ¶
func (r *Results) ScrollLeft()
func (*Results) ScrollRight ¶
func (r *Results) ScrollRight()
func (*Results) SetData ¶
func (r *Results) SetData(data ResultData)
type RowDetail ¶
type RowDetail struct {
Visible bool
// contains filtered or unexported fields
}
func NewRowDetail ¶
func (*RowDetail) JumpNext ¶
func (r *RowDetail) JumpNext()
JumpNext jumps to the next column header.
func (*RowDetail) JumpPrev ¶
func (r *RowDetail) JumpPrev()
JumpPrev jumps to the previous column header.
func (*RowDetail) ScrollDown ¶
ScrollDown scrolls one line down and updates colCursor.
func (*RowDetail) ScrollLeft ¶
func (r *RowDetail) ScrollLeft()
func (*RowDetail) ScrollRight ¶
func (r *RowDetail) ScrollRight()
type Sidebar ¶
type Sidebar struct {
Title string
Version string
Tree Tree
// contains filtered or unexported fields
}
func NewSidebar ¶
type Tabs ¶
type Tree ¶
type Tree struct {
Items []TreeItem
Cursor int
Focused bool
// contains filtered or unexported fields
}
func (*Tree) AdvanceSpinner ¶
func (t *Tree) AdvanceSpinner()
func (*Tree) CursorExpandable ¶
func (*Tree) CursorIDPath ¶
func (*Tree) CursorLabel ¶
func (Tree) CursorPath ¶
CursorPath returns the full path of labels from root to the currently selected item.
func (*Tree) EnsureVisible ¶
func (*Tree) StartLoading ¶
StartLoading marks the cursor item as loading if it is expandable and not yet loaded. Returns the full path of IDs from root to the item, and true if loading was started.
Click to show internal directories.
Click to hide internal directories.