components

package
v0.0.0-...-eefbc77 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2025 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileChangedMsg

type FileChangedMsg struct {
	Path string
}

FileChangedMsg indicates a log file has been modified.

type LogViewer

type LogViewer struct {
	// contains filtered or unexported fields
}

LogViewer displays log files with automatic file watching.

func NewLogViewer

func NewLogViewer() *LogViewer

NewLogViewer creates a new log viewer.

func (*LogViewer) Init

func (lv *LogViewer) Init() tea.Cmd

Init initializes the log viewer.

func (*LogViewer) Refresh

func (lv *LogViewer) Refresh()

Refresh reloads the log content.

func (*LogViewer) SetLogPath

func (lv *LogViewer) SetLogPath(path string)

SetLogPath sets the log file path and starts watching it.

func (*LogViewer) SetSize

func (lv *LogViewer) SetSize(width, height int)

SetSize sets the log viewer size.

func (*LogViewer) StartWatching

func (lv *LogViewer) StartWatching() tea.Cmd

StartWatching begins watching the current log file for changes.

func (*LogViewer) StopWatching

func (lv *LogViewer) StopWatching()

StopWatching stops watching the current log file.

func (*LogViewer) Update

func (lv *LogViewer) Update(msg tea.Msg) (*LogViewer, tea.Cmd)

Update handles messages.

func (*LogViewer) View

func (lv *LogViewer) View() string

View renders the log viewer.

type ProgressBar

type ProgressBar struct {
	// contains filtered or unexported fields
}

ProgressBar represents a simple progress bar.

func NewProgressBar

func NewProgressBar(total int64, title string) *ProgressBar

NewProgressBar creates a new progress bar component.

func (*ProgressBar) GetPercentage

func (pb *ProgressBar) GetPercentage() float64

GetPercentage returns the current percentage.

func (*ProgressBar) GetProgress

func (pb *ProgressBar) GetProgress() (current, total int64, message string)

GetProgress returns the current progress values.

func (*ProgressBar) Increment

func (pb *ProgressBar) Increment(n int64)

Increment adds to the current progress value.

func (*ProgressBar) Reset

func (pb *ProgressBar) Reset()

Reset prepares the bar for a new operation.

func (*ProgressBar) SetCurrent

func (pb *ProgressBar) SetCurrent(current int64)

SetCurrent sets the current progress value.

func (*ProgressBar) SetMessage

func (pb *ProgressBar) SetMessage(message string)

SetMessage sets the overall progress message.

func (*ProgressBar) SetSize

func (pb *ProgressBar) SetSize(width int)

SetSize sets the progress bar width.

func (*ProgressBar) SetStatus

func (pb *ProgressBar) SetStatus(status string, healthy bool)

SetStatus updates the progress bar status.

func (*ProgressBar) SetStepMessage

func (pb *ProgressBar) SetStepMessage(message string, progress int64)

SetStepMessage sets the current step message and updates progress.

func (*ProgressBar) SetTotal

func (pb *ProgressBar) SetTotal(total int64)

SetTotal sets the total progress value.

func (*ProgressBar) View

func (pb *ProgressBar) View() string

View renders the progress bar.

type Tabs

type Tabs struct {
	// contains filtered or unexported fields
}

Tabs represents a tab navigation component.

func NewTabs

func NewTabs() *Tabs

NewTabs creates a new tabs component.

func (*Tabs) GetActive

func (t *Tabs) GetActive() int

GetActive returns the active tab index.

func (*Tabs) NextTab

func (t *Tabs) NextTab()

NextTab moves to the next tab.

func (*Tabs) PrevTab

func (t *Tabs) PrevTab()

PrevTab moves to the previous tab.

func (*Tabs) SetActive

func (t *Tabs) SetActive(index int)

SetActive sets the active tab index.

func (*Tabs) SetTabs

func (t *Tabs) SetTabs(tabs []string)

SetTabs sets the tab names.

func (*Tabs) SetWidth

func (t *Tabs) SetWidth(width int)

SetWidth sets the total width available for tabs.

func (*Tabs) View

func (t *Tabs) View() string

View renders the tabs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL