ui

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package ui centralizes terminal presentation: lipgloss styles, status messages, and the styled DNS plan and record renderers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckLine added in v0.1.2

func CheckLine(label string, width int, ok bool, reason string) string

func Detail

func Detail(s string) string

Detail renders multi-line output (e.g. a remote command's logs) dimmed and indented so it reads as secondary context.

func Heading

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

Heading renders a bold accented title.

func Info

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

Info renders a muted, secondary line.

func OK

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

OK renders a success line ("✓ …").

func RecordLegend added in v0.1.2

func RecordLegend(rows []RecordRow) string

func RenderPlan

func RenderPlan(p reconcile.Plan) string

RenderPlan renders a reconcile plan as a colored diff (+ create, ~ update, - delete, ! conflict).

func RenderRecords

func RenderRecords(rows []RecordRow) string

func Warn

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

Warn renders a cautionary line ("! …").

func WithSpinner added in v0.1.2

func WithSpinner(ctx context.Context, msg string, fn func(context.Context) error) error

Types

type Mark added in v0.1.2

type Mark int
const (
	MarkNone Mark = iota
	MarkOK
	MarkMissing
	MarkDrift
	MarkConflict
	MarkNA
	MarkUnknown
)

func (Mark) Label added in v0.1.2

func (m Mark) Label() string

type RecordRow added in v0.1.2

type RecordRow struct {
	Zone                 string
	Record, Value, Proxy string
	Local, DNS, Remote   Mark
}

Jump to

Keyboard shortcuts

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