Documentation
¶
Overview ¶
Package ui provides terminal UI components for minectl using the Charm ecosystem.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Spinner ¶
type Spinner struct {
Message string
FinalMessage string
ErrorMessage string
// contains filtered or unexported fields
}
Spinner provides an animated spinner for long-running operations. In headless mode, it falls back to simple log messages.
func NewSpinner ¶
NewSpinner creates a new animated spinner.
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table wraps lipgloss table with minectl styling.
func (*Table) RenderToWriter ¶
RenderToWriter writes the table to the given writer.
type TableStyle ¶
type TableStyle struct {
HeaderStyle lipgloss.Style
CellStyle lipgloss.Style
BorderStyle lipgloss.Style
}
TableStyle defines the visual style for tables.
func DefaultTableStyle ¶
func DefaultTableStyle() TableStyle
DefaultTableStyle returns the default styling for tables.
type UI ¶
type UI struct {
// contains filtered or unexported fields
}
UI provides a unified interface for terminal output that handles both interactive and headless modes. In interactive mode, it uses Charm components for polished output. In headless mode, it falls back to structured logging.
func NewUI ¶
func NewUI(headless bool, log *logging.MinectlLogging) *UI
NewUI creates a new UI instance.
func (*UI) IsHeadless ¶
IsHeadless returns true if the UI is running in headless mode (CI/CD).
func (*UI) Logging ¶
func (u *UI) Logging() *logging.MinectlLogging
Logging returns the underlying logging instance.