tui

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: AGPL-3.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DebugTUI

type DebugTUI struct {
	*tview.Application
	LogView *tview.TextView
}

DebugTUI is the main TUI application.

func Init

func Init() *DebugTUI

Init creates a new TUI application.

func (*DebugTUI) GetLogWriter

func (a *DebugTUI) GetLogWriter() io.Writer

GetLogWriter returns an io.Writer that streams log data into the log view.

func (*DebugTUI) Start

func (a *DebugTUI) Start() error

Start starts the TUI application. (Blocking call)

type Feature

type Feature struct {
	Name        string
	Description string
	Enabled     bool
	Action      func(enabled bool)
}

Feature defines a toggleable feature with its state and action.

type FeatureList

type FeatureList []Feature

func GetFeatureList

func GetFeatureList() *FeatureList

GetFeatureList returns a pointer to the global feature list.

func (*FeatureList) Add

func (list *FeatureList) Add(feature Feature) *FeatureList

AddFeature adds a feature to the global feature list.

func (*FeatureList) Set

func (list *FeatureList) Set(newList []Feature) *FeatureList

SetFeatureList sets the global feature list to a new feature list.

type UI

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

UI represents the user interface of the TUI.

func InitUI

func InitUI(app *DebugTUI) *UI

InitUI creates a new UI.

func (*UI) Run

func (ui *UI) Run() error

Run initializes and runs the UI.

Jump to

Keyboard shortcuts

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