ui

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Display

type Display interface {
	Initialize() error
	WriteLog(text string)
	UpdateStatus(spinner, progressBar, percentage, elapsed, eta, message string)
	Run() error
	Stop()
	Escape(text string) string
}

Display abstracts the TUI layer

type TUI added in v0.1.5

type TUI struct {
	Display Display
	Tracker *progress.Tracker
}

func New added in v0.1.5

func New(display Display, tracker *progress.Tracker) TUI

type TViewDisplay

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

TViewDisplay implements Display using tview library

func NewTViewDisplay

func NewTViewDisplay() *TViewDisplay

NewTViewDisplay creates a new tview-based display

func (*TViewDisplay) Escape added in v0.1.8

func (d *TViewDisplay) Escape(test string) string

func (*TViewDisplay) Initialize

func (d *TViewDisplay) Initialize() error

Initialize sets up the TUI layout

func (*TViewDisplay) QueueUpdate

func (d *TViewDisplay) QueueUpdate(fn func())

QueueUpdate queues a function to run on the UI thread

func (*TViewDisplay) Run

func (d *TViewDisplay) Run() error

Run starts the tview event loop (blocking)

func (*TViewDisplay) SetTitle

func (d *TViewDisplay) SetTitle(title string)

SetTitle sets the main view title

func (*TViewDisplay) Stop

func (d *TViewDisplay) Stop()

Stop gracefully stops the application

func (*TViewDisplay) UpdateStatus

func (d *TViewDisplay) UpdateStatus(spinner, progressBar, percentage, elapsed, eta, message string)

UpdateStatus updates the status bar with progress information

func (*TViewDisplay) WriteLog

func (d *TViewDisplay) WriteLog(text string)

WriteLog appends text to the main scrollable view

Jump to

Keyboard shortcuts

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