tui

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package tui implements the Bubble Tea terminal user interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionEntry

type ConnectionEntry struct {
	Name   string
	Driver string
	DSN    string
}

ConnectionEntry is a compact connection label shown by the TUI.

type Model

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

Model contains all TUI state needed by Bubble Tea update and render cycles.

func New

func New(cfg config.Config, noColor bool) Model

New returns a TUI model using the default in-memory metadata service.

func NewWithMetadata

func NewWithMetadata(cfg config.Config, metadata service.MetadataService, noColor bool) Model

NewWithMetadata returns a TUI model with an injected metadata service.

func NewWithServices

func NewWithServices(cfg config.Config, metadata service.MetadataService, executor service.Executor, execOpts service.ExecOptions, noColor bool) Model

NewWithServices returns a TUI model with injectable services for production and tests.

func (Model) Init

func (m Model) Init() tea.Cmd

Init starts cursor blinking and initial metadata loading.

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update applies Bubble Tea messages to Model and returns any follow-up command.

func (Model) View

func (m Model) View() string

View renders the current TUI frame.

Jump to

Keyboard shortcuts

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