ui

package
v0.1.0-beta.45 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Amber     = lipgloss.Color("#F59E0B")
	Blue      = lipgloss.Color("#3B82F6")
	White     = lipgloss.Color("#fafafa")
	Gray      = lipgloss.Color("#6B7280")
	Green     = lipgloss.Color("#10B981")
	LightGray = lipgloss.Color("241")
	Red       = lipgloss.Color("#f87171")
	Purple    = lipgloss.Color("#8B5CF6")
)

Colors

Functions

func Basic

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

func Debug

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

func DisplayLogEntry

func DisplayLogEntry(logEntry logging.LogEntry, prefix string)

func Error

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

func Info

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

func Prompt

func Prompt(message string) (string, error)

Prompt asks the user for input and returns the response

func Section

func Section(title string, textLines []string)

func Success

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

func Table

func Table(headers []string, rows [][]string)

func Warn

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

Types

type PrefixedUI

type PrefixedUI struct {
	Prefix string
}

func (*PrefixedUI) Error

func (p *PrefixedUI) Error(format string, a ...any)

func (*PrefixedUI) Info

func (p *PrefixedUI) Info(format string, a ...any)

func (*PrefixedUI) Success

func (p *PrefixedUI) Success(format string, a ...any)

func (*PrefixedUI) Warn

func (p *PrefixedUI) Warn(format string, a ...any)

type ProgressBar

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

ProgressBar displays an aggregate progress bar that can be updated from multiple goroutines

func NewProgressBar

func NewProgressBar(cfg ProgressBarConfig) *ProgressBar

NewProgressBar creates a new aggregate progress bar

func (*ProgressBar) Add

func (p *ProgressBar) Add(n int64)

Add adds bytes to the progress (thread-safe)

func (*ProgressBar) CompleteItem

func (p *ProgressBar) CompleteItem()

CompleteItem marks one item as complete (thread-safe)

func (*ProgressBar) Finish

func (p *ProgressBar) Finish()

Finish completes the progress bar and moves to next line

type ProgressBarConfig

type ProgressBarConfig struct {
	Description string
	TotalBytes  int64
	TotalItems  int
	ShowBytes   bool // if true, shows bytes; if false, shows items only
}

ProgressBarConfig configures the progress bar display

Jump to

Keyboard shortcuts

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