reference

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package reference implements the deterministic TUI used to exercise TUICast automation and terminal emulation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

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

Application is one isolated Bubble Tea reference application. Its pages, components, and deterministic scenario data are all compiled into the reference binary.

func New

func New(width, height int) (*Application, error)

New creates a reference application with the requested terminal dimensions.

func (*Application) Init

func (a *Application) Init() tea.Cmd

Init implements tea.Model.

func (*Application) Run

func (a *Application) Run(input io.Reader, output io.Writer) error

Run serves one application session until the user exits or input ends.

func (*Application) RunWithResizes

func (a *Application) RunWithResizes(input io.Reader, output io.Writer, resizes <-chan Size) error

RunWithResizes serves one application session and applies terminal size changes received from a remote protocol.

func (*Application) SetVTTestRunner

func (a *Application) SetVTTestRunner(runner VTTestRunner)

SetVTTestRunner replaces the external VTTEST launcher. Passing nil restores the default launcher.

func (*Application) Update

func (a *Application) Update(message tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (*Application) View

func (a *Application) View() tea.View

View implements tea.Model.

type CommandVTTestRunner

type CommandVTTestRunner struct{}

CommandVTTestRunner launches the system's vttest executable.

func (CommandVTTestRunner) Run

func (CommandVTTestRunner) Run(input io.Reader, output io.Writer) error

type FatalVTTestError

type FatalVTTestError struct {
	Err error
}

FatalVTTestError reports a terminal-lifecycle failure after which the reference application cannot safely continue.

func (*FatalVTTestError) Error

func (e *FatalVTTestError) Error() string

func (*FatalVTTestError) Unwrap

func (e *FatalVTTestError) Unwrap() error

type Size

type Size struct {
	Width  int
	Height int
}

Size is a terminal window size supplied by a network session.

type VTTestRunner

type VTTestRunner interface {
	Run(input io.Reader, output io.Writer) error
}

VTTestRunner runs VTTEST on the same terminal streams as the reference app. The narrow contract permits later automation to record invocations/results.

Directories

Path Synopsis
Package ssh serves the reference TUI over SSH.
Package ssh serves the reference TUI over SSH.
Package telnet serves the reference TUI over Telnet.
Package telnet serves the reference TUI over Telnet.

Jump to

Keyboard shortcuts

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