ui

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplayHealthCheckComplete added in v0.1.8

func DisplayHealthCheckComplete(decision health.Decision)

DisplayHealthCheckComplete displays completion message based on decision

func DisplayHealthCheckStart added in v0.1.8

func DisplayHealthCheckStart(clusterName string)

DisplayHealthCheckStart displays the start of health check process

func DisplayHealthResults added in v0.1.8

func DisplayHealthResults(summary health.HealthSummary)

DisplayHealthResults displays the health check results in the specified format

func Errf added in v0.2.1

func Errf(format string, a ...any)

Errf writes formatted output to stderr, ignoring write errors intentionally.

func Errln added in v0.2.1

func Errln(a ...any)

Errln writes a line to stderr, ignoring write errors intentionally.

func GetDecisionText added in v0.1.8

func GetDecisionText(decision health.Decision) string

GetDecisionText returns the text representation of decision

func GetHealthDecisionColor added in v0.1.8

func GetHealthDecisionColor(decision health.Decision) func(format string, a ...interface{}) string

GetHealthDecisionColor returns the color function for decision

func GetHealthStatusText added in v0.1.8

func GetHealthStatusText(status health.HealthStatus) string

GetHealthStatusText returns the text representation of health status

func GetStatusColor

func GetStatusColor(status types.UpdateStatus) func(format string, a ...interface{}) string

GetStatusColor returns a color function for the update status

func GetStatusPrefix

func GetStatusPrefix(status types.UpdateStatus) string

GetStatusPrefix returns an appropriate text prefix for the update status

func NewHealthSpinner added in v0.1.8

func NewHealthSpinner(message string) *yacspin.Spinner

NewHealthSpinner creates a new spinner for health checks

func Outf added in v0.2.1

func Outf(format string, a ...any)

Outf writes formatted output to stdout, ignoring write errors intentionally.

func Outln added in v0.2.1

func Outln(a ...any)

Outln writes a line to stdout, ignoring write errors intentionally.

func PrintNodegroupsTree

func PrintNodegroupsTree(clusterName string, nodegroups []types.NodegroupInfo)

func PromptContinueWithWarnings added in v0.1.8

func PromptContinueWithWarnings(warnings []string) bool

PromptContinueWithWarnings prompts the user to continue despite warnings

func RenderProgressBar added in v0.1.8

func RenderProgressBar(score int, status health.HealthStatus) string

RenderProgressBar creates a progress bar string based on score and status

Types

type Alignment added in v0.2.1

type Alignment int

Alignment represents horizontal text alignment within a column.

const (
	AlignLeft Alignment = iota
	AlignRight
)

type Column added in v0.2.1

type Column struct {
	Title string
	Min   int
	Max   int
	Align Alignment
}

Column defines a table column with sizing and alignment rules.

type Option added in v0.2.1

type Option func(*Table)

Option configures optional rendering behavior for a Table.

func WithHeaderColor added in v0.2.1

func WithHeaderColor(fn func(string) string) Option

WithHeaderColor sets a coloring function used for header titles.

type Table added in v0.2.1

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

Table is a reusable, ANSI-aware renderer for CLI tables.

func NewTable added in v0.2.1

func NewTable(columns []Column, opts ...Option) *Table

NewTable creates a new table with the given columns and options.

func (*Table) AddRow added in v0.2.1

func (t *Table) AddRow(cells ...string)

AddRow appends a row. The number of cells must match the number of columns.

func (*Table) Render added in v0.2.1

func (t *Table) Render()

Render prints the table to stdout.

Jump to

Keyboard shortcuts

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