tui

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package tui provides a terminal UI for Queen migrations.

Package tui provides a terminal UI for Queen migrations.

Package tui provides a terminal UI for Queen migrations.

Index

Constants

This section is empty.

Variables

View Source
var (
	TitleStyle = lipgloss.NewStyle().
				Bold(true).
				Foreground(primaryColor).
				MarginBottom(1)

	AppliedStyle = lipgloss.NewStyle().
					Foreground(secondaryColor).
					Bold(true)

	PendingStyle = lipgloss.NewStyle().
					Foreground(warningColor).
					Bold(true)

	ErrorStyle = lipgloss.NewStyle().
				Foreground(errorColor).
				Bold(true)

	SelectedStyle = lipgloss.NewStyle().
					Background(primaryColor).
					Foreground(whiteColor).
					Bold(true).
					Padding(0, 1)

	NormalStyle = lipgloss.NewStyle().
				Padding(0, 1)

	HelpStyle = lipgloss.NewStyle().
				Foreground(grayColor).
				MarginTop(1)

	InfoBoxStyle = lipgloss.NewStyle().
					Border(lipgloss.RoundedBorder()).
					BorderForeground(primaryColor).
					Padding(1, 2).
					MarginTop(1)

	GapWarningStyle = lipgloss.NewStyle().
					Border(lipgloss.RoundedBorder()).
					BorderForeground(warningColor).
					Padding(0, 1).
					MarginTop(1)

	GapErrorStyle = lipgloss.NewStyle().
					Border(lipgloss.RoundedBorder()).
					BorderForeground(errorColor).
					Padding(0, 1).
					MarginTop(1)
)

Functions

This section is empty.

Types

type MessageType

type MessageType int
const (
	MessageInfo MessageType = iota
	MessageSuccess
	MessageWarning
	MessageError
)

type Model

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

func NewModel

func NewModel(q *queen.Queen, ctx context.Context) *Model

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) Update

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

Update handles messages and updates the model.

func (*Model) View

func (m *Model) View() string

View renders the UI.

type ViewMode

type ViewMode int
const (
	ViewMigrations ViewMode = iota
	ViewGaps
	ViewHelp
)

Jump to

Keyboard shortcuts

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