Documentation ¶
Index ¶
- Variables
- func AddDependencyCheck(cmd *cobra.Command, deps ...Dependency) *cobra.Command
- func CheckErr(err error)
- func DebugColors() string
- func DockerAvailable() error
- func DockerBuildxAvailable() error
- func IsTerminal() bool
- func PodmanAvailable() error
- type ColorPalette
- type DefaultKeyMap
- type Dependency
- type DependencyError
- type TagPrinter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Debug = TagPrinter{ Prefix: addPrefix("debug", Colors.White, Colors.TextMuted), } Error = TagPrinter{ Prefix: addPrefix("error", Colors.White, Colors.Red), } Info = TagPrinter{ Prefix: addPrefix("info", Colors.White, Colors.TextMuted), } Warning = TagPrinter{ Prefix: addPrefix("warning", Colors.Black, Colors.Yellow), } )
View Source
var KeyMap = DefaultKeyMap{ Enter: key.NewBinding( key.WithKeys("enter"), key.WithHelp("enter", "submit input"), ), Quit: key.NewBinding( key.WithKeys("esc", "ctrl+c"), key.WithHelp("esc", "exit"), ), Up: key.NewBinding( key.WithKeys("up"), key.WithHelp("↑", "up"), ), Down: key.NewBinding( key.WithKeys("down"), key.WithHelp("↓", "down"), ), }
KeyMap contains our standard keybinding for CLI input
View Source
var RequireContainerBuilder = atLeastOne(RequireDocker, RequirePodman)
Functions ¶
func AddDependencyCheck ¶
func AddDependencyCheck(cmd *cobra.Command, deps ...Dependency) *cobra.Command
AddDependencyCheck - Wraps a cobra command with a pre-run that will check for dependencies
func DebugColors ¶
func DebugColors() string
DebugColors returns the entire color palette as a string
Use for testing various terminals to confirm output
func DockerAvailable ¶ added in v1.55.2
func DockerAvailable() error
func DockerBuildxAvailable ¶ added in v1.55.2
func DockerBuildxAvailable() error
func IsTerminal ¶
func IsTerminal() bool
IsTerminal returns true if the current process is running in an interactive terminal
func PodmanAvailable ¶ added in v1.55.2
func PodmanAvailable() error
Types ¶
type ColorPalette ¶
type ColorPalette struct { White lipgloss.CompleteAdaptiveColor Gray lipgloss.CompleteAdaptiveColor Black lipgloss.CompleteAdaptiveColor Red lipgloss.CompleteAdaptiveColor Orange lipgloss.CompleteAdaptiveColor Yellow lipgloss.CompleteAdaptiveColor Green lipgloss.CompleteAdaptiveColor Teal lipgloss.CompleteAdaptiveColor Blue lipgloss.CompleteAdaptiveColor Purple lipgloss.CompleteAdaptiveColor Text lipgloss.CompleteAdaptiveColor TextMuted lipgloss.CompleteAdaptiveColor TextHighlight lipgloss.CompleteAdaptiveColor TextActive lipgloss.CompleteAdaptiveColor }
ColorPalette of standard CLI UI colors
var Colors *ColorPalette = &ColorPalette{ White: lipgloss.CompleteAdaptiveColor{Light: white, Dark: white}, Gray: lipgloss.CompleteAdaptiveColor{Light: gray, Dark: gray}, Black: lipgloss.CompleteAdaptiveColor{Light: black, Dark: black}, Red: lipgloss.CompleteAdaptiveColor{Light: red, Dark: red}, Orange: lipgloss.CompleteAdaptiveColor{Light: orange, Dark: orange}, Yellow: lipgloss.CompleteAdaptiveColor{Light: yellow, Dark: yellow}, Green: lipgloss.CompleteAdaptiveColor{Light: green, Dark: green}, Teal: lipgloss.CompleteAdaptiveColor{Light: teal, Dark: teal}, Blue: lipgloss.CompleteAdaptiveColor{Light: blue, Dark: blue}, Purple: lipgloss.CompleteAdaptiveColor{Light: purple, Dark: purple}, Text: lipgloss.CompleteAdaptiveColor{ Light: black, Dark: white, }, TextMuted: lipgloss.CompleteAdaptiveColor{ Light: lipgloss.CompleteColor{TrueColor: "#4E4E4E", ANSI256: "242", ANSI: "8"}, Dark: lipgloss.CompleteColor{TrueColor: "#9E9E9E", ANSI256: "249", ANSI: "7"}, }, TextHighlight: lipgloss.CompleteAdaptiveColor{ Light: blue, Dark: purple, }, TextActive: lipgloss.CompleteAdaptiveColor{ Light: blue, Dark: blue, }, }
Colors contains our standard UI colors for CLI output
type DefaultKeyMap ¶
type Dependency ¶
type Dependency = func() *DependencyError
type DependencyError ¶ added in v1.55.2
type DependencyError struct {
// contains filtered or unexported fields
}
func RequireDocker ¶ added in v1.55.2
func RequireDocker() *DependencyError
func RequirePodman ¶ added in v1.55.2
func RequirePodman() *DependencyError
func (*DependencyError) Assist ¶ added in v1.55.2
func (d *DependencyError) Assist() string
func (*DependencyError) Error ¶ added in v1.55.2
func (d *DependencyError) Error() string
type TagPrinter ¶ added in v1.36.6
type TagPrinter struct {
Prefix string
}
func (*TagPrinter) Printfln ¶ added in v1.36.6
func (t *TagPrinter) Printfln(message string, a ...interface{})
func (*TagPrinter) Println ¶ added in v1.36.6
func (t *TagPrinter) Println(message string)
Click to show internal directories.
Click to hide internal directories.