Documentation
¶
Index ¶
- Variables
- func BuildPanelTitle(base, filterPattern, searchPattern string, panelWidth int, inlineInput string) string
- func BuildPanelTitleWithPrefix(prefix, base, filterPattern, searchPattern string, panelWidth int, ...) string
- func HighlightMatches(cell string, re *regexp.Regexp) string
- func HighlightMatchesColor(cell string, re *regexp.Regexp) string
- func LookupTimePreset(label string) (seconds int64, ok bool)
- func PlaceOverlay(bgWidth, bgHeight int, bg, overlay string, opts ...OverlayOption) string
- func RenderButtonBar(buttons []Button, focusedIdx int) string
- type Button
- type ChartInputOverlay
- func (c ChartInputOverlay) Active() bool
- func (c *ChartInputOverlay) Close()
- func (c *ChartInputOverlay) Open(releaseName, namespace, currentRef string)
- func (c *ChartInputOverlay) SetSize(w, h int)
- func (c ChartInputOverlay) Update(msg tea.Msg) (ChartInputOverlay, tea.Cmd)
- func (c ChartInputOverlay) View() string
- type ConfirmDialog
- type ContainerPicker
- type DetailPanel
- type DetailView
- func (d DetailView) AnyActive() bool
- func (d *DetailView) ApplySearch(pattern string, mode msgs.SearchMode) error
- func (d *DetailView) Blur()
- func (d *DetailView) ClearContent()
- func (d *DetailView) ClearFilter()
- func (d *DetailView) ClearSearch()
- func (d DetailView) FilterActive() bool
- func (d *DetailView) Focus()
- func (d *DetailView) GotoBottom()
- func (d *DetailView) GotoTop()
- func (d DetailView) Height() int
- func (d DetailView) LoadErr() string
- func (d DetailView) Loading() bool
- func (d *DetailView) Mode() msgs.DetailMode
- func (d *DetailView) PageDown()
- func (d *DetailView) PageUp()
- func (d *DetailView) ScrollDown()
- func (d *DetailView) ScrollEnd()
- func (d *DetailView) ScrollHome()
- func (d *DetailView) ScrollLeft()
- func (d *DetailView) ScrollRight()
- func (d *DetailView) ScrollUp()
- func (d *DetailView) ScrollWheel(btn tea.MouseButton)
- func (d DetailView) SearchActive() bool
- func (d *DetailView) SearchNext()
- func (d *DetailView) SearchPrev()
- func (d *DetailView) SetBorderless(b bool)
- func (d *DetailView) SetContent(content render.Content, refresh bool)
- func (d *DetailView) SetEnvResolved(v bool)
- func (d *DetailView) SetInlineSearch(s string)
- func (d *DetailView) SetLoadError(msg string)
- func (d *DetailView) SetLoading(v bool) tea.Cmd
- func (d *DetailView) SetMode(mode msgs.DetailMode)
- func (d *DetailView) SetSize(w, h int)
- func (d DetailView) ShowHeader() bool
- func (d *DetailView) ToggleHeader()
- func (d *DetailView) ToggleWrap()
- func (d DetailView) Update(msg tea.Msg) (DetailView, tea.Cmd)
- func (d DetailView) View() string
- func (d DetailView) Width() int
- type DualRingBuffer
- func (d *DualRingBuffer) Append(raw, colored, stripped string, rawWidth int)
- func (d *DualRingBuffer) Cap() int
- func (d *DualRingBuffer) ColoredAll() []string
- func (d *DualRingBuffer) ColoredGet(i int) string
- func (d *DualRingBuffer) ColoredSlice(start, end int) []string
- func (d *DualRingBuffer) Dropped() int
- func (d *DualRingBuffer) Len() int
- func (d *DualRingBuffer) RawAll() []string
- func (d *DualRingBuffer) RawGet(i int) string
- func (d *DualRingBuffer) RawSlice(start, end int) []string
- func (d *DualRingBuffer) Reset()
- func (d *DualRingBuffer) SetColored(i int, s string, width int)
- func (d *DualRingBuffer) SetStripped(i int, s string)
- func (d *DualRingBuffer) StrippedGet(i int) string
- func (d *DualRingBuffer) StrippedSlice(start, end int) []string
- func (d *DualRingBuffer) WidthGet(i int) int
- func (d *DualRingBuffer) WidthSlice(start, end int) []int
- type FuzzyMatch
- type HelmRevisionEntry
- type HelmRollbackOverlay
- func (h HelmRollbackOverlay) Active() bool
- func (h *HelmRollbackOverlay) Open(name, namespace string, revisions []HelmRevisionEntry)
- func (h *HelmRollbackOverlay) OpenLoading(name, namespace string)
- func (h *HelmRollbackOverlay) SetError(msg string)
- func (h *HelmRollbackOverlay) SetRevisions(entries []HelmRevisionEntry)
- func (h *HelmRollbackOverlay) SetSize(w, height int)
- func (h HelmRollbackOverlay) Update(msg tea.Msg) (HelmRollbackOverlay, tea.Cmd)
- func (h HelmRollbackOverlay) View() string
- type HelpOverlay
- func (h HelpOverlay) Active() bool
- func (h *HelpOverlay) Open(groups []config.HintGroup)
- func (h HelpOverlay) ScrollForTest() int
- func (h *HelpOverlay) ScrollWheel(btn tea.MouseButton)
- func (h *HelpOverlay) SetSize(w, height int)
- func (h HelpOverlay) Update(msg tea.Msg) (HelpOverlay, tea.Cmd)
- func (h HelpOverlay) View() string
- type LogView
- func (lv LogView) ActiveContainer() string
- func (lv LogView) AnyActive() bool
- func (lv *LogView) AppendLine(line string)
- func (lv *LogView) ApplySearch(pattern string, mode msgs.SearchMode) error
- func (lv LogView) Autoscroll() bool
- func (lv *LogView) Blur()
- func (lv *LogView) BufferLen() int
- func (lv *LogView) ClearAndRestart()
- func (lv *LogView) ClearFilter()
- func (lv *LogView) ClearSearch()
- func (lv LogView) Containers() []string
- func (lv *LogView) DefaultSinceSeconds() int64
- func (lv LogView) FilterActive() bool
- func (lv *LogView) Focus()
- func (lv *LogView) GotoBottom()
- func (lv *LogView) GotoTop()
- func (lv *LogView) InsertMarker()
- func (lv LogView) IsUnavailable() bool
- func (lv LogView) Mode() msgs.DetailMode
- func (lv *LogView) PageDown()
- func (lv *LogView) PageUp()
- func (lv *LogView) ScrollDown()
- func (lv *LogView) ScrollEnd()
- func (lv *LogView) ScrollHome()
- func (lv *LogView) ScrollLeft()
- func (lv *LogView) ScrollRight()
- func (lv *LogView) ScrollUp()
- func (lv LogView) SearchActive() bool
- func (lv *LogView) SearchNext()
- func (lv *LogView) SearchPrev()
- func (lv *LogView) SetActiveContainer(name string)
- func (lv *LogView) SetBorderless(b bool)
- func (lv *LogView) SetContainers(containers []string)
- func (lv *LogView) SetInlineSearch(s string)
- func (lv *LogView) SetSize(w, h int)
- func (lv *LogView) SetTimeRangeLabel(label string)
- func (lv *LogView) SetUnavailable(v bool)
- func (lv LogView) ShowHeader() bool
- func (lv LogView) SyntaxEnabled() bool
- func (lv *LogView) ToggleAutoscroll()
- func (lv *LogView) ToggleHeader()
- func (lv *LogView) ToggleSyntax()
- func (lv *LogView) ToggleWrap()
- func (lv LogView) Update(msg tea.Msg) (LogView, tea.Cmd)
- func (lv LogView) View() string
- type NavSnapshot
- type NavStack
- type NsPicker
- type Overlay
- func (o Overlay) Active() bool
- func (o *Overlay) AddInput(ti textinput.Model) int
- func (o Overlay) Content() string
- func (o Overlay) Cursor() int
- func (o *Overlay) FocusInput(i int)
- func (o *Overlay) FocusList()
- func (o *Overlay) FocusNextInput()
- func (o *Overlay) FocusPrevInput()
- func (o Overlay) FocusedInput() int
- func (o *Overlay) HandleListKeys(msg tea.KeyPressMsg) bool
- func (o *Overlay) Input(i int) *textinput.Model
- func (o Overlay) InputCount() int
- func (o Overlay) InputValue(i int) string
- func (o Overlay) Items() []string
- func (o *Overlay) Reset()
- func (o Overlay) SelectedItem() string
- func (o *Overlay) SetActive(v bool)
- func (o *Overlay) SetContent(s string)
- func (o *Overlay) SetCursor(pos int)
- func (o *Overlay) SetFixedWidth(w int)
- func (o *Overlay) SetFooter(f string)
- func (o *Overlay) SetItems(items []string)
- func (o *Overlay) SetItemsVisible(v bool)
- func (o *Overlay) SetMaxVisible(n int)
- func (o *Overlay) SetNoItemsMsg(msg string)
- func (o *Overlay) SetPostListInputIdx(idx int)
- func (o *Overlay) SetPromptStyle(s lipgloss.Style)
- func (o *Overlay) SetSize(w, h int)
- func (o *Overlay) SetTitle(t string)
- func (o *Overlay) UpdateInputs(msg tea.Msg) tea.Cmd
- func (o Overlay) View() string
- type OverlayOption
- type OverlayRect
- type Picker
- func (p Picker[T]) Active() bool
- func (p *Picker[T]) Close()
- func (p Picker[T]) Cursor() int
- func (p Picker[T]) Filtered() []T
- func (p *Picker[T]) Open()
- func (p *Picker[T]) ScrollWheel(btn tea.MouseButton)
- func (p *Picker[T]) SetItems(items []T)
- func (p *Picker[T]) SetSize(w, h int)
- func (p Picker[T]) Update(msg tea.Msg) (Picker[T], tea.Cmd)
- func (p Picker[T]) View() string
- type PickerConfig
- type PluginEntry
- type PortForwardOverlay
- func (p PortForwardOverlay) Active() bool
- func (p *PortForwardOverlay) Close()
- func (p PortForwardOverlay) FocusedButton() int
- func (p PortForwardOverlay) InputFocused() bool
- func (p *PortForwardOverlay) Open(podName, podNs string, ports []PortItem)
- func (p *PortForwardOverlay) SetSize(w, h int)
- func (p PortForwardOverlay) Update(msg tea.Msg) (PortForwardOverlay, tea.Cmd)
- func (p PortForwardOverlay) View() string
- type PortItem
- type ResourceList
- func (r *ResourceList) AnyActive() bool
- func (r *ResourceList) ApplySearch(pattern string, mode msgs.SearchMode) error
- func (r *ResourceList) Blur()
- func (r *ResourceList) BlurBorder()
- func (r *ResourceList) ClearFilter()
- func (r *ResourceList) ClearSearch()
- func (r *ResourceList) ClearSelection()
- func (r *ResourceList) Cursor() int
- func (r *ResourceList) CursorDown()
- func (r *ResourceList) CursorUp()
- func (r *ResourceList) EffectiveNamespace() string
- func (r *ResourceList) EnsureCursorVisible()
- func (r *ResourceList) FilterActive() bool
- func (r *ResourceList) Focus()
- func (r *ResourceList) FocusBorder()
- func (r *ResourceList) Focused() bool
- func (r *ResourceList) GotoBottom()
- func (r *ResourceList) GotoTop()
- func (r ResourceList) HasSelection() bool
- func (r ResourceList) Height() int
- func (r *ResourceList) InDrillDown() bool
- func (r *ResourceList) Len() int
- func (r *ResourceList) Namespace() string
- func (r *ResourceList) NavStackHasGVR(gvr schema.GroupVersionResource, namespace string) bool
- func (r *ResourceList) PageDown()
- func (r *ResourceList) PageUp()
- func (r *ResourceList) ParentContext() string
- func (r *ResourceList) ParentSnap() (NavSnapshot, bool)
- func (r *ResourceList) Plugin() plugin.ResourcePlugin
- func (r *ResourceList) PopNav() bool
- func (r *ResourceList) PushNav(childPlugin plugin.ResourcePlugin, children []*unstructured.Unstructured, ...)
- func (r *ResourceList) ResetForReload()
- func (r *ResourceList) ResetNav()
- func (r *ResourceList) RowAtY(y int) int
- func (r *ResourceList) ScrollEnd()
- func (r *ResourceList) ScrollHome()
- func (r *ResourceList) ScrollLeft()
- func (r *ResourceList) ScrollRight()
- func (r *ResourceList) ScrollWheel(btn tea.MouseButton)
- func (r *ResourceList) SearchActive() bool
- func (r *ResourceList) SearchNext()
- func (r *ResourceList) SearchPrev()
- func (r *ResourceList) SelectAll()
- func (r *ResourceList) Selected() *unstructured.Unstructured
- func (r *ResourceList) SelectedObjects() []*unstructured.Unstructured
- func (r ResourceList) SelectionCount() int
- func (r *ResourceList) SetCursor(row int)
- func (r *ResourceList) SetInlineSearch(s string)
- func (r *ResourceList) SetNamespace(ns string)
- func (r *ResourceList) SetObjects(objs []*unstructured.Unstructured)
- func (r *ResourceList) SetPlugin(p plugin.ResourcePlugin)
- func (r *ResourceList) SetSize(w, h int)
- func (r *ResourceList) SetSort(column string)
- func (r *ResourceList) SortState() SortState
- func (r *ResourceList) ToggleSelect()
- func (r ResourceList) Update(msg tea.Msg) (ResourceList, tea.Cmd)
- func (r ResourceList) View() string
- func (r ResourceList) Width() int
- type ResourcePicker
- type ScaleOverlay
- func (s ScaleOverlay) Active() bool
- func (s *ScaleOverlay) Close()
- func (s ScaleOverlay) FocusedButton() int
- func (s ScaleOverlay) InputFocused() bool
- func (s *ScaleOverlay) Open(resourceName, namespace string, gvr schema.GroupVersionResource, ...)
- func (s *ScaleOverlay) SetSize(w, h int)
- func (s ScaleOverlay) Update(msg tea.Msg) (ScaleOverlay, tea.Cmd)
- func (s ScaleOverlay) View() string
- type SearchBar
- func (s SearchBar) Active() bool
- func (s *SearchBar) Close()
- func (s SearchBar) InlineView() string
- func (s *SearchBar) Open(mode msgs.SearchMode)
- func (s *SearchBar) SetError(err string)
- func (s *SearchBar) SetValue(v string)
- func (s *SearchBar) SetWidth(w int)
- func (s SearchBar) Update(msg tea.Msg) (SearchBar, tea.Cmd)
- func (s SearchBar) View() string
- type SearchState
- type Searchable
- type SetImageOverlay
- func (s SetImageOverlay) Active() bool
- func (s *SetImageOverlay) Close()
- func (s SetImageOverlay) FocusedButton() int
- func (s SetImageOverlay) InputFocused() bool
- func (s *SetImageOverlay) Open(resourceName, namespace string, gvr schema.GroupVersionResource, ...)
- func (s *SetImageOverlay) SetSize(w, h int)
- func (s SetImageOverlay) Update(msg tea.Msg) (SetImageOverlay, tea.Cmd)
- func (s SetImageOverlay) View() string
- type SortState
- type StatusBar
- func (s *StatusBar) Busy() bool
- func (s *StatusBar) ClearHints()
- func (s *StatusBar) EndOperation()
- func (s *StatusBar) SetContextName(name string)
- func (s *StatusBar) SetError(err string) tea.Cmd
- func (s *StatusBar) SetHints(hints []config.KeyHint)
- func (s *StatusBar) SetIndicator(ind string)
- func (s *StatusBar) SetOnline(v bool)
- func (s *StatusBar) SetWarning(w string) tea.Cmd
- func (s *StatusBar) SetWidth(w int)
- func (s *StatusBar) StartOperation() tea.Cmd
- func (s *StatusBar) Update(msg tea.Msg) tea.Cmd
- func (s *StatusBar) UpdateSpinner(msg tea.Msg) tea.Cmd
- func (s StatusBar) View() string
- type TimeRangePicker
Constants ¶
This section is empty.
Variables ¶
var ( // Border colors FocusedBorderColor = theme.Accent UnfocusedBorderColor = theme.Muted // Borders FocusedBorderStyle = lipgloss.NewStyle().BorderStyle(lipgloss.RoundedBorder()).BorderForeground(FocusedBorderColor) UnfocusedBorderStyle = lipgloss.NewStyle().BorderStyle(lipgloss.RoundedBorder()).BorderForeground(UnfocusedBorderColor) // Namespace badge in status bar NamespaceStyle = lipgloss.NewStyle().Foreground(theme.TextOnAccent).Background(theme.Accent).Bold(true).Padding(0, 1) // Status bar StatusBarStyle = lipgloss.NewStyle().Foreground(theme.Muted).Padding(0, 1) StatusKeyStyle = lipgloss.NewStyle().Bold(true).Foreground(theme.Highlight) StatusHelpStyle = lipgloss.NewStyle().Foreground(theme.Muted) StatusErrorStyle = lipgloss.NewStyle().Foreground(theme.Error).Bold(true) StatusWarningStyle = lipgloss.NewStyle().Foreground(theme.Warning).Bold(true) // Context badge in status bar ContextBadgeOnlineStyle = lipgloss.NewStyle().Foreground(theme.TextOnAccent).Background(theme.StatusRunning).Bold(true).Padding(0, 1) ContextBadgeOfflineStyle = lipgloss.NewStyle().Foreground(theme.TextOnAccent).Background(theme.Error).Bold(true).Padding(0, 1) // Zoom indicator ZoomIndicatorStyle = lipgloss.NewStyle(). Foreground(theme.TextOnAccent). Background(theme.Accent). Bold(true) // Port-forward indicator PortForwardIndicatorStyle = lipgloss.NewStyle(). Foreground(theme.TextOnAccent). Background(theme.Highlight). Bold(true) // Table TableHeaderStyle = lipgloss.NewStyle().Bold(true).Foreground(theme.Highlight).Padding(0, 1) TableSelectedStyle = lipgloss.NewStyle().Background(theme.Accent).Foreground(theme.TextOnAccent).Bold(true) TableSelectedDimStyle = lipgloss.NewStyle() // Table multi-select TableMarkedStyle = lipgloss.NewStyle().Foreground(theme.Selection).Bold(true) TableMarkedSelectedStyle = lipgloss.NewStyle().Background(theme.Accent).Foreground(theme.Selection).Bold(true) // Detail panel DetailHeaderStyle = lipgloss.NewStyle().Bold(true).Padding(0, 1) // Overlays OverlayStyle = lipgloss.NewStyle().BorderStyle(lipgloss.RoundedBorder()).BorderForeground(theme.Accent).Padding(1, 2) // Title TitleStyle = lipgloss.NewStyle().Bold(true).Foreground(theme.Highlight).Padding(0, 1) TitleIndicatorStyle = lipgloss.NewStyle().Foreground(theme.Subtle) )
Functions ¶
func BuildPanelTitle ¶
func BuildPanelTitle(base, filterPattern, searchPattern string, panelWidth int, inlineInput string) string
BuildPanelTitle assembles the complete rendered panel title from a base title string and optional filter/search patterns. filterPattern and searchPattern are raw pattern strings — empty means inactive. panelWidth is the total rendered width of the panel border including corners.
func BuildPanelTitleWithPrefix ¶
func BuildPanelTitleWithPrefix(prefix, base, filterPattern, searchPattern string, panelWidth int, inlineInput string) string
BuildPanelTitleWithPrefix assembles a panel title with a dimmed prefix (e.g. namespace) followed by a bright base title and optional patterns.
func HighlightMatches ¶
HighlightMatches wraps regex matches with reverse-video ANSI codes (for the active/cursor row).
func HighlightMatchesColor ¶
HighlightMatchesColor wraps regex matches with themed color ANSI codes (for inactive rows).
func LookupTimePreset ¶ added in v0.2.0
LookupTimePreset returns the seconds value for a time range label. Returns ok=false if the label is not a known preset.
func PlaceOverlay ¶
func PlaceOverlay(bgWidth, bgHeight int, bg, overlay string, opts ...OverlayOption) string
PlaceOverlay composites the overlay string centered (by default) over bg, dimming the background content that is not covered by the overlay. bgWidth and bgHeight are the terminal dimensions.
func RenderButtonBar ¶ added in v0.2.0
RenderButtonBar renders a styled button bar for overlay footers. Pass focusedIdx = -1 to render all buttons without highlight.
Types ¶
type ChartInputOverlay ¶
type ChartInputOverlay struct {
// contains filtered or unexported fields
}
ChartInputOverlay prompts for a chart source (OCI ref or local path).
func NewChartInputOverlay ¶
func NewChartInputOverlay(width, height int) ChartInputOverlay
func (ChartInputOverlay) Active ¶
func (c ChartInputOverlay) Active() bool
func (*ChartInputOverlay) Close ¶
func (c *ChartInputOverlay) Close()
func (*ChartInputOverlay) Open ¶
func (c *ChartInputOverlay) Open(releaseName, namespace, currentRef string)
func (*ChartInputOverlay) SetSize ¶
func (c *ChartInputOverlay) SetSize(w, h int)
func (ChartInputOverlay) Update ¶
func (c ChartInputOverlay) Update(msg tea.Msg) (ChartInputOverlay, tea.Cmd)
func (ChartInputOverlay) View ¶
func (c ChartInputOverlay) View() string
type ConfirmDialog ¶
type ConfirmDialog struct {
// contains filtered or unexported fields
}
ConfirmDialog is an overlay that asks the user to confirm, force, or cancel an action.
func NewConfirmDialog ¶
func NewConfirmDialog(message string, width int) ConfirmDialog
NewConfirmDialog creates a new active confirm dialog with the given message and terminal width.
func (ConfirmDialog) Active ¶
func (c ConfirmDialog) Active() bool
Active returns whether the dialog is currently active.
func (ConfirmDialog) Message ¶ added in v0.7.0
func (c ConfirmDialog) Message() string
Message returns the prompt text the dialog was constructed with. Used by tests to assert against the actual stored message rather than re-deriving it.
func (*ConfirmDialog) SetWidth ¶
func (c *ConfirmDialog) SetWidth(w int)
SetWidth updates the dialog width on terminal resize.
func (ConfirmDialog) Update ¶
func (c ConfirmDialog) Update(msg tea.Msg) (ConfirmDialog, tea.Cmd)
Update handles key messages for the confirm dialog.
func (ConfirmDialog) View ¶
func (c ConfirmDialog) View() string
View renders the confirm dialog as a centered bordered box.
type ContainerPicker ¶
ContainerPicker is an overlay that lets the user select a container for log streaming.
func NewContainerPicker ¶
func NewContainerPicker(width, height int) ContainerPicker
NewContainerPicker creates a new container picker with the given dimensions.
func (*ContainerPicker) SetContainers ¶
func (c *ContainerPicker) SetContainers(names []string)
SetContainers stores the list of available containers.
func (ContainerPicker) Update ¶
func (c ContainerPicker) Update(msg tea.Msg) (ContainerPicker, tea.Cmd)
Update handles key messages for the container picker.
type DetailPanel ¶
type DetailPanel interface {
Searchable
ScrollLeft()
ScrollRight()
ScrollHome()
ScrollEnd()
ScrollUp()
ScrollDown()
PageUp()
PageDown()
GotoTop()
GotoBottom()
ToggleWrap()
ToggleHeader()
ShowHeader() bool
Focus()
Blur()
SetSize(w, h int)
SetBorderless(b bool)
SetInlineSearch(s string)
View() string
}
DetailPanel is the shared interface between DetailView and LogView, covering scrolling, focus, sizing, and search operations used by the layout.
type DetailView ¶
type DetailView struct {
// contains filtered or unexported fields
}
DetailView wraps a viewport for displaying YAML, describe, or log content.
func NewDetailView ¶
func NewDetailView(width, height int) DetailView
NewDetailView creates a new detail view with the given dimensions.
func (DetailView) AnyActive ¶
func (d DetailView) AnyActive() bool
AnyActive reports whether either search or filter is active.
func (*DetailView) ApplySearch ¶
func (d *DetailView) ApplySearch(pattern string, mode msgs.SearchMode) error
ApplySearch compiles the pattern and applies the given mode. In search mode, all content remains visible with matches highlighted. In filter mode, non-matching lines are hidden.
func (*DetailView) ClearContent ¶
func (d *DetailView) ClearContent()
ClearContent clears all content.
func (*DetailView) ClearFilter ¶
func (d *DetailView) ClearFilter()
ClearFilter removes the active filter and restores all lines.
func (*DetailView) ClearSearch ¶
func (d *DetailView) ClearSearch()
ClearSearch removes the active search highlights.
func (DetailView) FilterActive ¶
func (d DetailView) FilterActive() bool
FilterActive reports whether a filter is currently active.
func (*DetailView) GotoBottom ¶
func (d *DetailView) GotoBottom()
GotoBottom scrolls to the bottom of the content.
func (*DetailView) GotoTop ¶
func (d *DetailView) GotoTop()
GotoTop scrolls to the top of the content.
func (DetailView) LoadErr ¶ added in v0.3.0
func (d DetailView) LoadErr() string
LoadErr returns the current load error message, if any.
func (DetailView) Loading ¶ added in v0.3.0
func (d DetailView) Loading() bool
Loading reports whether the detail view is in a loading state.
func (*DetailView) Mode ¶
func (d *DetailView) Mode() msgs.DetailMode
Mode returns the current detail mode.
func (*DetailView) PageDown ¶
func (d *DetailView) PageDown()
PageDown scrolls the viewport down by one page.
func (*DetailView) PageUp ¶
func (d *DetailView) PageUp()
PageUp scrolls the viewport up by one page.
func (*DetailView) ScrollDown ¶
func (d *DetailView) ScrollDown()
ScrollDown scrolls the viewport down by one line.
func (*DetailView) ScrollEnd ¶ added in v0.3.6
func (d *DetailView) ScrollEnd()
ScrollEnd scrolls horizontally to show the end of the longest visible line. No-op when soft-wrap is enabled.
func (*DetailView) ScrollHome ¶ added in v0.3.6
func (d *DetailView) ScrollHome()
ScrollHome resets horizontal scroll to the beginning of the line. No-op when soft-wrap is enabled.
func (*DetailView) ScrollLeft ¶
func (d *DetailView) ScrollLeft()
ScrollLeft scrolls the viewport left by hScrollStep columns. No-op when soft-wrap is enabled.
func (*DetailView) ScrollRight ¶
func (d *DetailView) ScrollRight()
ScrollRight scrolls the viewport right by hScrollStep columns. No-op when soft-wrap is enabled.
func (*DetailView) ScrollUp ¶
func (d *DetailView) ScrollUp()
ScrollUp scrolls the viewport up by one line.
func (*DetailView) ScrollWheel ¶ added in v0.5.0
func (d *DetailView) ScrollWheel(btn tea.MouseButton)
ScrollWheel nudges the viewport by one line in response to a mouse wheel event. Up/down delegate to the embedded bubbles/viewport's scroll helpers. Left/right wheel and any other button are dropped.
func (DetailView) SearchActive ¶
func (d DetailView) SearchActive() bool
SearchActive reports whether a search is active (highlights only).
func (*DetailView) SearchNext ¶
func (d *DetailView) SearchNext()
SearchNext navigates to the next search match.
func (*DetailView) SearchPrev ¶
func (d *DetailView) SearchPrev()
SearchPrev navigates to the previous search match.
func (*DetailView) SetBorderless ¶
func (d *DetailView) SetBorderless(b bool)
SetBorderless enables or disables borderless rendering.
func (*DetailView) SetContent ¶
func (d *DetailView) SetContent(content render.Content, refresh bool)
SetContent sets the detail view content from pre-rendered render.Content. When refresh is true, scroll resets to top; when false, scroll position is preserved. Setting content also clears the loading and error states.
func (*DetailView) SetEnvResolved ¶ added in v0.3.3
func (d *DetailView) SetEnvResolved(v bool)
SetEnvResolved sets whether secrets are currently revealed, shown as [S] in the header.
func (*DetailView) SetInlineSearch ¶
func (d *DetailView) SetInlineSearch(s string)
SetInlineSearch sets the inline search input text for rendering in the title.
func (*DetailView) SetLoadError ¶ added in v0.3.0
func (d *DetailView) SetLoadError(msg string)
SetLoadError sets a load error message and clears the loading state.
func (*DetailView) SetLoading ¶ added in v0.3.0
func (d *DetailView) SetLoading(v bool) tea.Cmd
SetLoading enables or disables the loading state. When true, resets any load error but preserves existing viewport content so that scroll position is maintained across async reloads. Returns a tea.Cmd to start the spinner animation (nil when disabling).
func (*DetailView) SetMode ¶
func (d *DetailView) SetMode(mode msgs.DetailMode)
SetMode sets the active detail mode.
func (DetailView) ShowHeader ¶ added in v0.3.2
func (d DetailView) ShowHeader() bool
ShowHeader reports whether the header bar is visible.
func (*DetailView) ToggleHeader ¶ added in v0.3.2
func (d *DetailView) ToggleHeader()
ToggleHeader flips the header visibility and recalculates the viewport size.
func (*DetailView) ToggleWrap ¶
func (d *DetailView) ToggleWrap()
ToggleWrap toggles soft-wrap mode. When enabling wrap, content is pre-wrapped via wrapLines so that continuation rows receive the "↪ " indicator. The viewport's own SoftWrap is never used — we handle wrapping ourselves. When enabling wrap, the horizontal offset is reset since horizontal scroll is a no-op.
func (DetailView) Update ¶
func (d DetailView) Update(msg tea.Msg) (DetailView, tea.Cmd)
Update handles key messages for viewport scrolling.
func (DetailView) View ¶
func (d DetailView) View() string
View renders the detail view with mode label in the border.
type DualRingBuffer ¶ added in v0.2.0
type DualRingBuffer struct {
// contains filtered or unexported fields
}
DualRingBuffer is a fixed-capacity circular buffer storing parallel raw and colored (highlighted) log lines. O(1) append, oldest lines are evicted when full. Not goroutine-safe — only access from the bubbletea Update goroutine.
func NewDualRingBuffer ¶ added in v0.2.0
func NewDualRingBuffer(capacity int) *DualRingBuffer
NewDualRingBuffer creates a dual ring buffer with the given capacity.
func (*DualRingBuffer) Append ¶ added in v0.2.0
func (d *DualRingBuffer) Append(raw, colored, stripped string, rawWidth int)
Append adds a raw, colored, and stripped line triple with a pre-computed display width. If at capacity, the oldest entry is evicted.
func (*DualRingBuffer) Cap ¶ added in v0.3.0
func (d *DualRingBuffer) Cap() int
Cap returns the maximum capacity of the ring buffer.
func (*DualRingBuffer) ColoredAll ¶ added in v0.2.0
func (d *DualRingBuffer) ColoredAll() []string
ColoredAll returns all colored lines in order (oldest to newest) using bulk copy.
func (*DualRingBuffer) ColoredGet ¶ added in v0.2.0
func (d *DualRingBuffer) ColoredGet(i int) string
ColoredGet returns the colored line at logical index i (0 = oldest).
func (*DualRingBuffer) ColoredSlice ¶ added in v0.2.0
func (d *DualRingBuffer) ColoredSlice(start, end int) []string
ColoredSlice returns a copy of colored lines[start:end] in logical order.
func (*DualRingBuffer) Dropped ¶ added in v0.2.0
func (d *DualRingBuffer) Dropped() int
Dropped returns the total number of pairs evicted since creation or last reset.
func (*DualRingBuffer) Len ¶ added in v0.2.0
func (d *DualRingBuffer) Len() int
Len returns the number of line pairs currently stored.
func (*DualRingBuffer) RawAll ¶ added in v0.2.0
func (d *DualRingBuffer) RawAll() []string
RawAll returns all raw lines in order (oldest to newest) using bulk copy.
func (*DualRingBuffer) RawGet ¶ added in v0.2.0
func (d *DualRingBuffer) RawGet(i int) string
RawGet returns the raw line at logical index i (0 = oldest).
func (*DualRingBuffer) RawSlice ¶ added in v0.2.0
func (d *DualRingBuffer) RawSlice(start, end int) []string
RawSlice returns a copy of raw lines[start:end] in logical order.
func (*DualRingBuffer) Reset ¶ added in v0.2.0
func (d *DualRingBuffer) Reset()
Reset clears all state without reallocating.
func (*DualRingBuffer) SetColored ¶ added in v0.2.0
func (d *DualRingBuffer) SetColored(i int, s string, width int)
SetColored overwrites the colored line at logical index i.
func (*DualRingBuffer) SetStripped ¶ added in v0.3.5
func (d *DualRingBuffer) SetStripped(i int, s string)
SetStripped overwrites the stripped line at logical index i.
func (*DualRingBuffer) StrippedGet ¶ added in v0.3.5
func (d *DualRingBuffer) StrippedGet(i int) string
StrippedGet returns the ANSI-stripped line at logical index i (0 = oldest).
func (*DualRingBuffer) StrippedSlice ¶ added in v0.3.5
func (d *DualRingBuffer) StrippedSlice(start, end int) []string
StrippedSlice returns a copy of stripped lines[start:end] in logical order.
func (*DualRingBuffer) WidthGet ¶ added in v0.3.0
func (d *DualRingBuffer) WidthGet(i int) int
WidthGet returns the pre-computed display width at logical index i (0 = oldest). Returns 0 for out-of-bounds indices.
func (*DualRingBuffer) WidthSlice ¶ added in v0.3.0
func (d *DualRingBuffer) WidthSlice(start, end int) []int
WidthSlice returns a copy of widths[start:end] in logical order.
type FuzzyMatch ¶
type FuzzyMatch struct {
Name string // plugin Name() — the goto target
Display string // formatted: "name (short)"
Score int // higher = better match
Index int // index into the original entries slice
}
FuzzyMatch represents a scored match result.
func FuzzyMatchPlugins ¶
func FuzzyMatchPlugins(query string, entries []PluginEntry) []FuzzyMatch
FuzzyMatchPlugins scores all entries against query, returning non-zero matches sorted best-first. Empty query returns all entries.
type HelmRevisionEntry ¶
HelmRevisionEntry holds display data for one revision.
type HelmRollbackOverlay ¶
type HelmRollbackOverlay struct {
// contains filtered or unexported fields
}
HelmRollbackOverlay shows revision history and lets the user pick one.
func NewHelmRollbackOverlay ¶
func NewHelmRollbackOverlay(width, height int) HelmRollbackOverlay
NewHelmRollbackOverlay creates a new rollback overlay with the given dimensions.
func (HelmRollbackOverlay) Active ¶
func (h HelmRollbackOverlay) Active() bool
Active returns whether the overlay is currently active.
func (*HelmRollbackOverlay) Open ¶
func (h *HelmRollbackOverlay) Open(name, namespace string, revisions []HelmRevisionEntry)
Open activates the overlay with the given revision list.
func (*HelmRollbackOverlay) OpenLoading ¶ added in v0.3.0
func (h *HelmRollbackOverlay) OpenLoading(name, namespace string)
OpenLoading activates the overlay in a loading state while history is fetched asynchronously.
func (*HelmRollbackOverlay) SetError ¶ added in v0.3.0
func (h *HelmRollbackOverlay) SetError(msg string)
SetError sets an error message in the overlay, clearing the loading state.
func (*HelmRollbackOverlay) SetRevisions ¶ added in v0.3.0
func (h *HelmRollbackOverlay) SetRevisions(entries []HelmRevisionEntry)
SetRevisions populates the overlay with fetched revision entries, clearing the loading state.
func (*HelmRollbackOverlay) SetSize ¶
func (h *HelmRollbackOverlay) SetSize(w, height int)
SetSize updates the terminal dimensions available to the overlay.
func (HelmRollbackOverlay) Update ¶
func (h HelmRollbackOverlay) Update(msg tea.Msg) (HelmRollbackOverlay, tea.Cmd)
Update handles key events for the rollback overlay.
func (HelmRollbackOverlay) View ¶
func (h HelmRollbackOverlay) View() string
View renders the overlay panel.
type HelpOverlay ¶
type HelpOverlay struct {
// contains filtered or unexported fields
}
HelpOverlay is a full-screen modal displaying all keybindings grouped by scope.
func NewHelpOverlay ¶
func NewHelpOverlay(width, height int) HelpOverlay
NewHelpOverlay creates a new (inactive) help overlay.
func (HelpOverlay) Active ¶
func (h HelpOverlay) Active() bool
Active reports whether the overlay is currently shown.
func (*HelpOverlay) Open ¶
func (h *HelpOverlay) Open(groups []config.HintGroup)
Open activates the overlay with the provided hint groups.
func (HelpOverlay) ScrollForTest ¶ added in v0.5.0
func (h HelpOverlay) ScrollForTest() int
ScrollForTest returns the current scroll offset. Test-only accessor; the production View/Update paths consult the unexported field directly.
func (*HelpOverlay) ScrollWheel ¶ added in v0.5.0
func (h *HelpOverlay) ScrollWheel(btn tea.MouseButton)
ScrollWheel nudges the help overlay's vertical scroll by one line in response to a mouse wheel event. Up/down mirror the j/k/arrow keybindings. Left/right wheel and any other button are dropped.
func (*HelpOverlay) SetSize ¶
func (h *HelpOverlay) SetSize(w, height int)
SetSize updates the terminal dimensions.
func (HelpOverlay) Update ¶
func (h HelpOverlay) Update(msg tea.Msg) (HelpOverlay, tea.Cmd)
Update handles key events for the help overlay.
func (HelpOverlay) View ¶
func (h HelpOverlay) View() string
View renders the help overlay. Returns empty string when inactive.
type LogView ¶
type LogView struct {
// contains filtered or unexported fields
}
LogView is a dedicated component for streaming pod logs with autoscroll, filtering, search, and built-in syntax highlighting.
func NewLogView ¶
func NewLogView(width, height, bufCapacity int, defaultTimeRange string, defaultSinceSeconds int64) LogView
NewLogView creates a new log view with the given dimensions and ring buffer capacity.
func (LogView) ActiveContainer ¶
ActiveContainer returns the currently active container name.
func (*LogView) AppendLine ¶
AppendLine appends a log line to the ring buffer and updates the viewport.
func (*LogView) ApplySearch ¶
func (lv *LogView) ApplySearch(pattern string, mode msgs.SearchMode) error
ApplySearch compiles the pattern and applies the given search mode.
func (LogView) Autoscroll ¶
Autoscroll reports whether autoscroll is enabled.
func (*LogView) BufferLen ¶ added in v0.2.0
BufferLen returns the number of lines in the log buffer.
func (*LogView) ClearAndRestart ¶
func (lv *LogView) ClearAndRestart()
ClearAndRestart resets the ring buffer, clears viewport content, and re-enables autoscroll for a fresh log stream.
func (*LogView) ClearFilter ¶
func (lv *LogView) ClearFilter()
ClearFilter removes the active filter and restores all lines.
func (*LogView) ClearSearch ¶
func (lv *LogView) ClearSearch()
ClearSearch removes the active search highlights.
func (LogView) Containers ¶
Containers returns the list of available containers.
func (*LogView) DefaultSinceSeconds ¶ added in v0.2.0
DefaultSinceSeconds returns the configured default sinceSeconds value for log streams.
func (LogView) FilterActive ¶
FilterActive reports whether a filter is currently active.
func (*LogView) GotoBottom ¶
func (lv *LogView) GotoBottom()
GotoBottom scrolls to the bottom of the content.
func (*LogView) InsertMarker ¶ added in v0.2.0
func (lv *LogView) InsertMarker()
InsertMarker inserts a dimmed timestamp marker line into the log buffer.
func (LogView) IsUnavailable ¶
IsUnavailable reports whether the log view is in the unavailable state.
func (LogView) Mode ¶
func (lv LogView) Mode() msgs.DetailMode
Mode returns DetailLogs, identifying this as a log view component.
func (*LogView) PageDown ¶
func (lv *LogView) PageDown()
PageDown scrolls the viewport down by one page.
func (*LogView) ScrollDown ¶
func (lv *LogView) ScrollDown()
ScrollDown scrolls the viewport down by one line.
func (*LogView) ScrollEnd ¶ added in v0.3.6
func (lv *LogView) ScrollEnd()
ScrollEnd scrolls horizontally to show the end of the longest visible line.
func (*LogView) ScrollHome ¶ added in v0.3.6
func (lv *LogView) ScrollHome()
ScrollHome resets horizontal scroll to the beginning of the line.
func (*LogView) ScrollLeft ¶
func (lv *LogView) ScrollLeft()
ScrollLeft scrolls the viewport left by hScrollStep columns.
func (*LogView) ScrollRight ¶
func (lv *LogView) ScrollRight()
ScrollRight scrolls the viewport right by hScrollStep columns.
func (*LogView) ScrollUp ¶
func (lv *LogView) ScrollUp()
ScrollUp scrolls the viewport up by one line.
func (LogView) SearchActive ¶
SearchActive reports whether a search is active (highlights only).
func (*LogView) SearchNext ¶
func (lv *LogView) SearchNext()
SearchNext navigates to the next search match.
func (*LogView) SearchPrev ¶
func (lv *LogView) SearchPrev()
SearchPrev navigates to the previous search match.
func (*LogView) SetActiveContainer ¶
SetActiveContainer sets the active container for log streaming.
func (*LogView) SetBorderless ¶
SetBorderless enables or disables borderless rendering.
func (*LogView) SetContainers ¶
SetContainers sets the list of available containers for the log view.
func (*LogView) SetInlineSearch ¶
SetInlineSearch sets the inline search input text for rendering in the title.
func (*LogView) SetTimeRangeLabel ¶ added in v0.2.0
SetTimeRangeLabel sets the displayed time range label in the title.
func (*LogView) SetUnavailable ¶
SetUnavailable marks the log view as unavailable (no loggable resource focused).
func (LogView) ShowHeader ¶ added in v0.3.2
ShowHeader reports whether the header bar is visible.
func (LogView) SyntaxEnabled ¶ added in v0.2.0
SyntaxEnabled reports whether built-in syntax highlighting is enabled.
func (*LogView) ToggleAutoscroll ¶
func (lv *LogView) ToggleAutoscroll()
ToggleAutoscroll toggles autoscroll on/off.
func (*LogView) ToggleHeader ¶ added in v0.3.2
func (lv *LogView) ToggleHeader()
ToggleHeader flips the header visibility and recalculates the viewport size.
func (*LogView) ToggleSyntax ¶ added in v0.2.0
func (lv *LogView) ToggleSyntax()
ToggleSyntax toggles built-in syntax highlighting on/off and re-renders.
func (*LogView) ToggleWrap ¶
func (lv *LogView) ToggleWrap()
ToggleWrap toggles soft-wrap on the viewport. When enabling wrap, the horizontal offset is reset since horizontal scroll is a no-op.
type NavSnapshot ¶
type NavSnapshot struct {
}
NavSnapshot captures the full restorable state of a ResourceList pane.
type NavStack ¶
type NavStack struct {
// contains filtered or unexported fields
}
NavStack is a simple LIFO stack for drill-down navigation.
func (*NavStack) HasGVR ¶
func (s *NavStack) HasGVR(gvr schema.GroupVersionResource, namespace string) bool
HasGVR reports whether any snapshot on the stack references the given GVR and namespace.
func (*NavStack) Peek ¶
func (s *NavStack) Peek() (NavSnapshot, bool)
Peek returns the top snapshot without removing it. Returns false if empty.
func (*NavStack) Pop ¶
func (s *NavStack) Pop() (NavSnapshot, bool)
Pop removes and returns the top snapshot. Returns false if empty.
func (*NavStack) Push ¶
func (s *NavStack) Push(snap NavSnapshot)
Push saves a snapshot onto the stack.
type NsPicker ¶
NsPicker is an overlay that lets the user search and select a namespace.
func NewNsPicker ¶
NewNsPicker creates a new namespace picker with the given dimensions.
func (*NsPicker) SetNamespaces ¶
SetNamespaces stores the list of available namespaces, prepending "All Namespaces".
type Overlay ¶
type Overlay struct {
// contains filtered or unexported fields
}
Overlay is a composable building block for modal overlay panels. It manages optional title, text inputs, scrollable item list, and footer.
func NewOverlay ¶
func NewOverlay() Overlay
NewOverlay creates a new inactive overlay with sensible defaults.
func (*Overlay) AddInput ¶
AddInput appends a text input and returns its index. If a prompt style has been set, it is applied to the input.
func (Overlay) Content ¶ added in v0.7.0
Content returns the overlay content text. Used by tests to assert on the stored message without parsing the full View output.
func (*Overlay) FocusInput ¶
FocusInput sets focus to the input at index i, blurring all others.
func (*Overlay) FocusList ¶
func (o *Overlay) FocusList()
FocusList sets focus to the item list, blurring all inputs.
func (*Overlay) FocusNextInput ¶
func (o *Overlay) FocusNextInput()
FocusNextInput cycles focus forward: inputs -> list (-1) -> first input.
func (*Overlay) FocusPrevInput ¶
func (o *Overlay) FocusPrevInput()
FocusPrevInput cycles focus backward: first input -> list (-1) -> last input.
func (Overlay) FocusedInput ¶
FocusedInput returns the index of the currently focused input (-1 = list).
func (*Overlay) HandleListKeys ¶
func (o *Overlay) HandleListKeys(msg tea.KeyPressMsg) bool
HandleListKeys handles Up/Down key presses for list navigation. Returns true if the key was handled.
func (Overlay) InputCount ¶
InputCount returns the number of text inputs.
func (Overlay) InputValue ¶
InputValue returns the current value of the input at index i.
func (*Overlay) Reset ¶
func (o *Overlay) Reset()
Reset clears all dynamic state (inputs, cursor, offset) and deactivates.
func (Overlay) SelectedItem ¶
SelectedItem returns the item at the cursor, or "" if no items.
func (*Overlay) SetContent ¶
SetContent sets the overlay content text rendered inside the box.
func (*Overlay) SetFixedWidth ¶
SetFixedWidth sets a fixed inner width. 0 means auto-size.
func (*Overlay) SetItems ¶
SetItems sets the item list, marks items as configured, and resets the cursor.
func (*Overlay) SetItemsVisible ¶
SetItemsVisible controls whether the item list section is rendered.
func (*Overlay) SetMaxVisible ¶
SetMaxVisible sets the maximum number of visible items in the list.
func (*Overlay) SetNoItemsMsg ¶
SetNoItemsMsg sets the message shown when the item list is empty.
func (*Overlay) SetPostListInputIdx ¶
SetPostListInputIdx configures which inputs render after the list. Inputs with index >= idx render after the list, others render before. Default 0 means all inputs render before the list (backward compatible).
func (*Overlay) SetPromptStyle ¶
SetPromptStyle sets a style applied to all subsequently added input prompts.
func (*Overlay) UpdateInputs ¶
UpdateInputs forwards a message to the focused input and returns any command.
type OverlayOption ¶
type OverlayOption func(*overlayOpts)
OverlayOption configures PlaceOverlay behavior.
func WithDim ¶
func WithDim(d bool) OverlayOption
WithDim controls whether the background is dimmed. Enabled by default.
func WithOverlayPosition ¶
func WithOverlayPosition(h, v float64) OverlayOption
WithOverlayPosition sets the normalized horizontal and vertical anchor. 0.5, 0.5 is center (the default). 0.5, 1.0 pins to bottom-center.
type OverlayRect ¶ added in v0.5.0
type OverlayRect struct {
X, Y, W, H int
}
OverlayRect describes the screen area occupied by a rendered overlay. X,Y are the top-left cell coordinates; W,H are the overlay content width and height in cells.
func PlaceOverlayWithRect ¶ added in v0.5.0
func PlaceOverlayWithRect(bgWidth, bgHeight int, bg, overlay string, opts ...OverlayOption) (string, OverlayRect, bool)
PlaceOverlayWithRect is like PlaceOverlay but also returns the rect that the overlay occupies on screen. Splits and width measurement happen once. When overlay is empty, returns bg and a zero rect with ok=false.
func (OverlayRect) Contains ¶ added in v0.5.0
func (r OverlayRect) Contains(x, y int) bool
Contains reports whether the given cell coordinate lies inside the rect. Returns false for zero-sized rects (W == 0 || H == 0), which is the sentinel for "no active overlay".
type Picker ¶
type Picker[T any] struct { // contains filtered or unexported fields }
Picker is a generic filterable selection overlay.
func NewPicker ¶
func NewPicker[T any](cfg PickerConfig[T], width, height int) Picker[T]
NewPicker creates a new Picker with the given config and dimensions.
func (Picker[T]) Filtered ¶
func (p Picker[T]) Filtered() []T
Filtered returns the current filtered item slice.
func (*Picker[T]) Open ¶
func (p *Picker[T]) Open()
Open activates the picker, resets state, creates the filter input.
func (*Picker[T]) ScrollWheel ¶ added in v0.5.0
func (p *Picker[T]) ScrollWheel(btn tea.MouseButton)
ScrollWheel nudges the picker's selection by one item in response to a mouse wheel event. Up/down reuse the same cursor movement as k/j and the arrow keys. Left/right wheel and any other button are dropped.
func (*Picker[T]) SetItems ¶
func (p *Picker[T]) SetItems(items []T)
SetItems replaces the source data and reapplies the filter.
type PickerConfig ¶
type PickerConfig[T any] struct { Title string NoItemsMsg string MaxVisible int // 0 = auto from terminal height Display func(T) string Filter func(query string, items []T) []T OnSelect func(T) tea.Cmd }
PickerConfig holds construction-time options for a Picker.
type PluginEntry ¶
type PluginEntry struct {
Name string
ShortName string
GVR schema.GroupVersionResource
Qualified bool
}
PluginEntry holds the minimal info needed for fuzzy matching.
func FilterPlugins ¶
func FilterPlugins(query string, entries []PluginEntry) []PluginEntry
FilterPlugins returns PluginEntries matching query, sorted by score (best first).
type PortForwardOverlay ¶
type PortForwardOverlay struct {
// contains filtered or unexported fields
}
PortForwardOverlay is a single-view overlay for setting up port-forwards. It shows a filter input, a scrollable port list, and a local port input.
func NewPortForwardOverlay ¶
func NewPortForwardOverlay(width, height int) PortForwardOverlay
NewPortForwardOverlay creates a new port-forward overlay with the given dimensions.
func (PortForwardOverlay) Active ¶
func (p PortForwardOverlay) Active() bool
Active returns whether the overlay is currently active.
func (*PortForwardOverlay) Close ¶
func (p *PortForwardOverlay) Close()
Close deactivates the overlay.
func (PortForwardOverlay) FocusedButton ¶ added in v0.2.0
func (p PortForwardOverlay) FocusedButton() int
FocusedButton returns the currently focused button index.
func (PortForwardOverlay) InputFocused ¶ added in v0.2.0
func (p PortForwardOverlay) InputFocused() bool
InputFocused returns whether a text input has focus (vs the button bar).
func (*PortForwardOverlay) Open ¶
func (p *PortForwardOverlay) Open(podName, podNs string, ports []PortItem)
Open activates the overlay for a given pod, showing its available ports.
func (*PortForwardOverlay) SetSize ¶
func (p *PortForwardOverlay) SetSize(w, h int)
SetSize updates the terminal dimensions available to the overlay.
func (PortForwardOverlay) Update ¶
func (p PortForwardOverlay) Update(msg tea.Msg) (PortForwardOverlay, tea.Cmd)
Update handles key messages for the port-forward overlay.
func (PortForwardOverlay) View ¶
func (p PortForwardOverlay) View() string
View renders the overlay panel.
type ResourceList ¶
type ResourceList struct {
// contains filtered or unexported fields
}
ResourceList wraps bubbles/table with plugin-driven columns.
func NewResourceList ¶
func NewResourceList(p plugin.ResourcePlugin, width, height int) ResourceList
NewResourceList creates a new resource list for the given plugin.
func (*ResourceList) AnyActive ¶
func (r *ResourceList) AnyActive() bool
AnyActive reports whether either search or filter is active.
func (*ResourceList) ApplySearch ¶
func (r *ResourceList) ApplySearch(pattern string, mode msgs.SearchMode) error
ApplySearch compiles the regex pattern and applies search or filter mode. In search mode, all rows remain visible but matches are highlighted and cursor jumps to the first match. In filter mode, non-matching rows are hidden.
func (*ResourceList) BlurBorder ¶
func (r *ResourceList) BlurBorder()
BlurBorder dims only the border, keeping the selected row style. Used when focus moves to the detail panel so the active selection remains visible.
func (*ResourceList) ClearFilter ¶
func (r *ResourceList) ClearFilter()
ClearFilter removes the active filter and restores all rows.
func (*ResourceList) ClearSearch ¶
func (r *ResourceList) ClearSearch()
ClearSearch removes the active search and restores highlighting.
func (*ResourceList) ClearSelection ¶
func (r *ResourceList) ClearSelection()
ClearSelection removes all selections.
func (*ResourceList) CursorDown ¶
func (r *ResourceList) CursorDown()
CursorDown moves the table cursor down by one row.
func (*ResourceList) CursorUp ¶
func (r *ResourceList) CursorUp()
CursorUp moves the table cursor up by one row.
func (*ResourceList) EffectiveNamespace ¶
func (r *ResourceList) EffectiveNamespace() string
EffectiveNamespace returns the namespace used for store operations. Returns "" for cluster-scoped plugins (they watch all namespaces).
func (*ResourceList) EnsureCursorVisible ¶
func (r *ResourceList) EnsureCursorVisible()
EnsureCursorVisible adjusts cursor location.
func (*ResourceList) FilterActive ¶
func (r *ResourceList) FilterActive() bool
FilterActive reports whether a filter is currently active.
func (*ResourceList) FocusBorder ¶
func (r *ResourceList) FocusBorder()
FocusBorder restores the focused border without changing the selected row style. Pairs with BlurBorder when returning from detail-scroll mode.
func (*ResourceList) Focused ¶
func (r *ResourceList) Focused() bool
Focused returns whether this list has focus.
func (*ResourceList) GotoBottom ¶
func (r *ResourceList) GotoBottom()
GotoBottom moves the cursor to the last row.
func (*ResourceList) GotoTop ¶
func (r *ResourceList) GotoTop()
GotoTop moves the cursor to the first row.
func (ResourceList) HasSelection ¶
func (r ResourceList) HasSelection() bool
HasSelection reports whether any rows are selected.
func (*ResourceList) InDrillDown ¶
func (r *ResourceList) InDrillDown() bool
InDrillDown reports whether this pane is in a drill-down child view.
func (*ResourceList) Len ¶
func (r *ResourceList) Len() int
Len returns the number of displayed items.
func (*ResourceList) Namespace ¶
func (r *ResourceList) Namespace() string
Namespace returns the namespace this list is scoped to.
func (*ResourceList) NavStackHasGVR ¶
func (r *ResourceList) NavStackHasGVR(gvr schema.GroupVersionResource, namespace string) bool
NavStackHasGVR reports whether this pane's nav stack contains a snapshot referencing the given GVR and namespace.
func (*ResourceList) PageDown ¶
func (r *ResourceList) PageDown()
PageDown moves the cursor down by one page.
func (*ResourceList) PageUp ¶
func (r *ResourceList) PageUp()
PageUp moves the cursor up by one page.
func (*ResourceList) ParentContext ¶
func (r *ResourceList) ParentContext() string
ParentContext returns the parent resource name shown in the title during drill-down.
func (*ResourceList) ParentSnap ¶
func (r *ResourceList) ParentSnap() (NavSnapshot, bool)
ParentSnap returns a value copy of the top nav snapshot and an ok flag. The returned snapshot is a one-time copy — callers that mutate the nav stack (PushNav/PopNav) must re-fetch to see the new top.
func (*ResourceList) Plugin ¶
func (r *ResourceList) Plugin() plugin.ResourcePlugin
Plugin returns the current plugin.
func (*ResourceList) PopNav ¶
func (r *ResourceList) PopNav() bool
PopNav restores the previous pane state. Returns false if stack is empty.
func (*ResourceList) PushNav ¶
func (r *ResourceList) PushNav(childPlugin plugin.ResourcePlugin, children []*unstructured.Unstructured, parentName string, parentUID string, parentAPIVersion string, parentKind string)
PushNav saves current state and switches to a drill-down child view.
func (*ResourceList) ResetForReload ¶
func (r *ResourceList) ResetForReload()
ResetForReload unwinds the nav stack to root, restoring the root plugin and namespace. Sort/filter/search state is preserved. Objects are cleared and must be repopulated by the caller.
func (*ResourceList) ResetNav ¶
func (r *ResourceList) ResetNav()
ResetNav clears the drill-down nav stack.
func (*ResourceList) RowAtY ¶ added in v0.5.0
func (r *ResourceList) RowAtY(y int) int
RowAtY maps a y-coordinate (relative to the ResourceList pane's top-left, y=0 = top border line that carries the injected title) to an index into the underlying display objects. Returns -1 for the border/header area or any y past the last data row. Chrome accounted for: 1 line for the top border (the title is injected into that border line via injectBorderTitle, so it shares the same row); the table's own header row is subtracted inside table.RowAtY.
func (*ResourceList) ScrollEnd ¶ added in v0.4.0
func (r *ResourceList) ScrollEnd()
ScrollEnd scrolls horizontally to show the end of the content.
func (*ResourceList) ScrollHome ¶ added in v0.4.0
func (r *ResourceList) ScrollHome()
ScrollHome resets horizontal scroll to the beginning.
func (*ResourceList) ScrollLeft ¶
func (r *ResourceList) ScrollLeft()
ScrollLeft scrolls the resource list left by listScrollStep characters.
func (*ResourceList) ScrollRight ¶
func (r *ResourceList) ScrollRight()
ScrollRight scrolls the resource list right by listScrollStep characters.
func (*ResourceList) ScrollWheel ¶ added in v0.5.0
func (r *ResourceList) ScrollWheel(btn tea.MouseButton)
ScrollWheel advances the cursor by one row in response to a mouse wheel event. Up/down reuse CursorUp/CursorDown (same as k/j). Left/right wheel and any other button are dropped.
func (*ResourceList) SearchActive ¶
func (r *ResourceList) SearchActive() bool
SearchActive reports whether a search is currently active.
func (*ResourceList) SearchNext ¶
func (r *ResourceList) SearchNext()
SearchNext moves the cursor to the next matching row after the current cursor position.
func (*ResourceList) SearchPrev ¶
func (r *ResourceList) SearchPrev()
SearchPrev moves the cursor to the previous matching row before the current cursor position.
func (*ResourceList) SelectAll ¶
func (r *ResourceList) SelectAll()
SelectAll selects all display objects. If all are already selected, deselects all.
func (*ResourceList) Selected ¶
func (r *ResourceList) Selected() *unstructured.Unstructured
Selected returns the currently highlighted unstructured object.
func (*ResourceList) SelectedObjects ¶
func (r *ResourceList) SelectedObjects() []*unstructured.Unstructured
SelectedObjects returns all selected objects in display order.
func (ResourceList) SelectionCount ¶
func (r ResourceList) SelectionCount() int
SelectionCount returns the number of selected rows visible in the current display.
func (*ResourceList) SetCursor ¶ added in v0.5.0
func (r *ResourceList) SetCursor(row int)
SetCursor sets the table cursor to the given row index. Out-of-range values are clamped by the underlying table.
func (*ResourceList) SetInlineSearch ¶
func (r *ResourceList) SetInlineSearch(s string)
SetInlineSearch sets the inline search input text for rendering in the title.
func (*ResourceList) SetNamespace ¶
func (r *ResourceList) SetNamespace(ns string)
SetNamespace updates the namespace this list is scoped to.
func (*ResourceList) SetObjects ¶
func (r *ResourceList) SetObjects(objs []*unstructured.Unstructured)
SetObjects replaces the displayed items with cursor position preservation.
func (*ResourceList) SetPlugin ¶
func (r *ResourceList) SetPlugin(p plugin.ResourcePlugin)
SetPlugin changes the resource plugin and clears the list.
func (*ResourceList) SetSize ¶
func (r *ResourceList) SetSize(w, h int)
SetSize updates the dimensions.
func (*ResourceList) SetSort ¶
func (r *ResourceList) SetSort(column string)
SetSort toggles or changes the sort column and re-renders.
func (*ResourceList) SortState ¶
func (r *ResourceList) SortState() SortState
SortState returns the current sort state.
func (*ResourceList) ToggleSelect ¶
func (r *ResourceList) ToggleSelect()
ToggleSelect toggles the selection of the row under the cursor and advances the cursor.
func (ResourceList) Update ¶
func (r ResourceList) Update(msg tea.Msg) (ResourceList, tea.Cmd)
Update handles key messages for table navigation.
func (ResourceList) View ¶
func (r ResourceList) View() string
View renders the resource list with border and title.
type ResourcePicker ¶
type ResourcePicker struct {
Picker[PluginEntry]
}
ResourcePicker is an overlay that lets the user search and select a resource type.
func NewResourcePicker ¶
func NewResourcePicker(width, height int) ResourcePicker
NewResourcePicker creates a new resource picker with the given dimensions.
func (*ResourcePicker) SetPlugins ¶
func (rp *ResourcePicker) SetPlugins(entries []PluginEntry)
SetPlugins provides the list of available plugins.
func (ResourcePicker) Update ¶
func (rp ResourcePicker) Update(msg tea.Msg) (ResourcePicker, tea.Cmd)
Update handles key messages for the resource picker.
type ScaleOverlay ¶ added in v0.2.0
type ScaleOverlay struct {
// contains filtered or unexported fields
}
ScaleOverlay is an overlay for changing the replica count of a resource.
func NewScaleOverlay ¶ added in v0.2.0
func NewScaleOverlay(width, height int) ScaleOverlay
NewScaleOverlay creates a new scale overlay with the given dimensions.
func (ScaleOverlay) Active ¶ added in v0.2.0
func (s ScaleOverlay) Active() bool
Active returns whether the overlay is currently active.
func (*ScaleOverlay) Close ¶ added in v0.2.0
func (s *ScaleOverlay) Close()
Close deactivates the overlay.
func (ScaleOverlay) FocusedButton ¶ added in v0.2.0
func (s ScaleOverlay) FocusedButton() int
FocusedButton returns the currently focused button index.
func (ScaleOverlay) InputFocused ¶ added in v0.2.0
func (s ScaleOverlay) InputFocused() bool
InputFocused returns whether the text input has focus (vs the button bar).
func (*ScaleOverlay) Open ¶ added in v0.2.0
func (s *ScaleOverlay) Open(resourceName, namespace string, gvr schema.GroupVersionResource, replicas int32)
Open activates the overlay, showing a single text input pre-filled with the current replica count.
func (*ScaleOverlay) SetSize ¶ added in v0.2.0
func (s *ScaleOverlay) SetSize(w, h int)
SetSize updates the terminal dimensions available to the overlay.
func (ScaleOverlay) Update ¶ added in v0.2.0
func (s ScaleOverlay) Update(msg tea.Msg) (ScaleOverlay, tea.Cmd)
Update handles key messages for the scale overlay.
func (ScaleOverlay) View ¶ added in v0.2.0
func (s ScaleOverlay) View() string
View renders the overlay panel.
type SearchBar ¶
type SearchBar struct {
// contains filtered or unexported fields
}
SearchBar is a bottom-anchored overlay for entering search/filter patterns.
func NewSearchBar ¶
NewSearchBar creates a new search bar with the given width.
func (SearchBar) InlineView ¶
InlineView returns a styled string fragment for embedding in a title border. Returns "" when inactive. Includes prompt, text, and cursor. Error styling is applied via textinput styles set in SetError().
func (*SearchBar) Open ¶
func (s *SearchBar) Open(mode msgs.SearchMode)
Open activates the search bar in the given mode.
func (*SearchBar) SetError ¶
SetError sets an error message and toggles the input styling to indicate invalid regex. When err is non-empty, the prompt, text, and cursor turn red.
type SearchState ¶
type SearchState struct {
Pattern string
Mode msgs.SearchMode
Re *regexp.Regexp
MatchCount int
CurrentIdx int
}
SearchState holds compiled regex and navigation cursor for one pane.
func (SearchState) Active ¶
func (s SearchState) Active() bool
Active reports whether a search/filter is compiled and ready.
func (*SearchState) Compile ¶
func (s *SearchState) Compile(pattern string, mode msgs.SearchMode) error
Compile parses pattern as a regex. Empty pattern clears state. On error, the previous search state is preserved (vim-like behavior).
func (SearchState) DisplayPattern ¶
func (s SearchState) DisplayPattern() string
DisplayPattern returns the pattern if active, empty string otherwise.
func (*SearchState) NextIdx ¶
func (s *SearchState) NextIdx() int
NextIdx advances the current index cyclically and returns it.
func (*SearchState) PrevIdx ¶
func (s *SearchState) PrevIdx() int
PrevIdx reverses the current index cyclically and returns it.
type Searchable ¶
type Searchable interface {
ApplySearch(pattern string, mode msgs.SearchMode) error
ClearSearch()
ClearFilter()
SearchActive() bool
FilterActive() bool
AnyActive() bool
SearchNext()
SearchPrev()
}
Searchable is the common interface for components that support search/filter. Both ResourceList and DetailView satisfy this interface.
type SetImageOverlay ¶
type SetImageOverlay struct {
// contains filtered or unexported fields
}
SetImageOverlay is an overlay for changing container images.
func NewSetImageOverlay ¶
func NewSetImageOverlay(width, height int) SetImageOverlay
NewSetImageOverlay creates a new set-image overlay with the given dimensions.
func (SetImageOverlay) Active ¶
func (s SetImageOverlay) Active() bool
Active returns whether the overlay is currently active.
func (SetImageOverlay) FocusedButton ¶ added in v0.2.0
func (s SetImageOverlay) FocusedButton() int
FocusedButton returns the currently focused button index.
func (SetImageOverlay) InputFocused ¶ added in v0.2.0
func (s SetImageOverlay) InputFocused() bool
InputFocused returns whether a text input has focus (vs the button bar).
func (*SetImageOverlay) Open ¶
func (s *SetImageOverlay) Open(resourceName, namespace string, gvr schema.GroupVersionResource, pluginName string, containers []msgs.ContainerImageChange)
Open activates the overlay, showing one text input per container.
func (*SetImageOverlay) SetSize ¶
func (s *SetImageOverlay) SetSize(w, h int)
SetSize updates the terminal dimensions available to the overlay.
func (SetImageOverlay) Update ¶
func (s SetImageOverlay) Update(msg tea.Msg) (SetImageOverlay, tea.Cmd)
Update handles key messages for the set-image overlay.
func (SetImageOverlay) View ¶
func (s SetImageOverlay) View() string
View renders the overlay panel.
type SortState ¶
type SortState struct {
Column string // matches a Column.Title, e.g. "NAME", "AGE", "STATUS"
Ascending bool
}
SortState holds the active sort column and direction for one ResourceList.
func DefaultSortState ¶
func DefaultSortState() SortState
DefaultSortState returns name ascending — the default for all new lists.
func SortStateForPlugin ¶
func SortStateForPlugin(p plugin.ResourcePlugin) SortState
SortStateForPlugin returns the plugin's preferred default sort if it implements DefaultSorter, otherwise NAME ascending.
type StatusBar ¶
type StatusBar struct {
// contains filtered or unexported fields
}
StatusBar displays context-sensitive key help at the bottom.
func NewStatusBar ¶
func (*StatusBar) ClearHints ¶
func (s *StatusBar) ClearHints()
func (*StatusBar) EndOperation ¶ added in v0.3.0
func (s *StatusBar) EndOperation()
func (*StatusBar) SetContextName ¶ added in v0.3.4
func (*StatusBar) SetIndicator ¶
func (*StatusBar) StartOperation ¶ added in v0.3.0
func (*StatusBar) UpdateSpinner ¶ added in v0.3.0
type TimeRangePicker ¶
type TimeRangePicker struct {
Picker[timePreset]
}
TimeRangePicker is an overlay for selecting a log time range.
func NewTimeRangePicker ¶
func NewTimeRangePicker(width, height int) TimeRangePicker
NewTimeRangePicker creates a new time range picker with the given dimensions.
func (*TimeRangePicker) OpenPresets ¶
func (t *TimeRangePicker) OpenPresets()
OpenPresets opens the picker with the predefined time range presets.
func (TimeRangePicker) Update ¶
func (t TimeRangePicker) Update(msg tea.Msg) (TimeRangePicker, tea.Cmd)
Update handles key messages for the time range picker.
Source Files
¶
- ansisplit.go
- buttonbar.go
- chartinput.go
- confirmdialog.go
- containerpicker.go
- detailview.go
- fuzzymatch.go
- helmrollback.go
- helpoverlay.go
- highlight.go
- logview.go
- logviewport.go
- navstack.go
- nspicker.go
- overlay.go
- overlay_panel.go
- picker.go
- portforward.go
- resourcelist.go
- resourcepicker.go
- ringbuffer.go
- scale.go
- searchbar.go
- searchstate.go
- setimage.go
- sort.go
- statusbar.go
- styles.go
- timerangepicker.go
- titlebuild.go