Help us shape the future of Go! Take the 2026 Go Developer Survey

tui

package
v0.0.0-...-7b161e4 Latest Latest
Warning

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

Go to latest
Published: May 4, 2025 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TitleStyle = lipgloss.NewStyle().
				Bold(true).
				Foreground(lipgloss.Color("#FAFAFA")).
				Background(lipgloss.Color("#7D56F4")).
				Padding(0, 1)

	FocusedStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("205"))
	BlurredStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("240"))
	CursorStyle  = FocusedStyle.Copy()
	NoStyle      = lipgloss.NewStyle()

	HelpStyle = BlurredStyle.Copy()

	LeaderStyle   = lipgloss.NewStyle().Foreground(leaderColor)
	FollowerStyle = lipgloss.NewStyle().Foreground(followerColor)
	ObserverStyle = lipgloss.NewStyle().Foreground(observerColor)

	ErrorStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#FF5555")) // Red for errors

	DCHeaderStyle  = lipgloss.NewStyle().Bold(true).MarginBottom(1)
	BrokerBoxStyle = lipgloss.NewStyle().
					Border(lipgloss.RoundedBorder()).
					BorderForeground(lipgloss.Color("63")).
					Padding(0, 1).
					MarginRight(2).
					MarginBottom(1)
)

Functions

This section is empty.

Types

type Model

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

Model holds the state for the TUI application. Exported for use in main.go.

func NewModel

func NewModel() Model

NewModel creates the initial state of the TUI model. Exported for use in main.go.

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the TUI model. Required by Bubble Tea. Currently, just starts the cursor blinking.

func (Model) Update

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

Update handles messages and updates the TUI model. Required by Bubble Tea.

func (Model) View

func (m Model) View() string

View renders the UI based on the current model state. Required by Bubble Tea.

type Stage

type Stage int

Stage defines the current view/state of the TUI application.

const (
	AskClusterType Stage = iota
	AskSingleConfig
	AskMRCConfig
	ShowPlacement
	ShowError // Represents a state where a known error is displayed
)

Jump to

Keyboard shortcuts

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