ui

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IconX     = "✕"
	IconCheck = "✔︎"
)

Variables

View Source
var COLORS = []lipgloss.Style{
	lipgloss.NewStyle().Foreground(lipgloss.Color("13")),
	lipgloss.NewStyle().Foreground(lipgloss.Color("14")),
	lipgloss.NewStyle().Foreground(lipgloss.Color("2")),
	lipgloss.NewStyle().Foreground(lipgloss.Color("12")),
}
View Source
var TEXT_DANGER = lipgloss.NewStyle().Foreground(lipgloss.Color("1"))
View Source
var TEXT_DANGER_BOLD = TEXT_DANGER.Copy().Bold(true)
View Source
var TEXT_DIM = lipgloss.NewStyle().Foreground(lipgloss.Color("8"))
View Source
var TEXT_DIM_BOLD = TEXT_DIM.Copy().Bold(true)
View Source
var TEXT_HIGHLIGHT = lipgloss.NewStyle().Foreground(lipgloss.Color("14"))
View Source
var TEXT_HIGHLIGHT_BOLD = TEXT_HIGHLIGHT.Copy().Bold(true)
View Source
var TEXT_INFO = lipgloss.NewStyle().Foreground(lipgloss.Color("4"))
View Source
var TEXT_INFO_BOLD = TEXT_INFO.Copy().Bold(true)
View Source
var TEXT_NORMAL = lipgloss.NewStyle().Foreground(lipgloss.Color("15"))
View Source
var TEXT_NORMAL_BOLD = TEXT_NORMAL.Copy().Bold(true)
View Source
var TEXT_SUCCESS = lipgloss.NewStyle().Foreground(lipgloss.Color("2"))
View Source
var TEXT_SUCCESS_BOLD = TEXT_SUCCESS.Copy().Bold(true)
View Source
var TEXT_WARNING = lipgloss.NewStyle().Foreground(lipgloss.Color("11"))
View Source
var TEXT_WARNING_BOLD = TEXT_WARNING.Copy().Bold(true)

Functions

func Error

func Error(msg string)

func NewFooter

func NewFooter() *footer

func Success

func Success(msg string)

func WithDev added in v0.1.5

func WithDev(u *Options)

func WithSilent

func WithSilent(u *Options)

Types

type DiffEntry added in v0.1.3

type DiffEntry struct {
	Path string
	Old  interface{}
	New  interface{}
}

func Diff added in v0.1.3

func Diff(old map[string]interface{}, new map[string]interface{}, path ...string) []DiffEntry

type Option

type Option func(*Options)

type Options

type Options struct {
	Silent bool
	Dev    bool
}

type ProgressMode

type ProgressMode string
const (
	ProgressModeDeploy  ProgressMode = "deploy"
	ProgressModeRemove  ProgressMode = "remove"
	ProgressModeRefresh ProgressMode = "refresh"
)

type UI

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

func New

func New(ctx context.Context, options ...Option) *UI

func (*UI) Destroy

func (u *UI) Destroy()

func (*UI) Event

func (u *UI) Event(unknown interface{})

Jump to

Keyboard shortcuts

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