Documentation
¶
Index ¶
- type KeyMap
- type Model
- type StyleConfig
- type UI
- func (ui *UI) RenderDescription(description string) string
- func (ui *UI) RenderDryRun() string
- func (ui *UI) RenderError(err error) string
- func (ui *UI) RenderHostname(hostname string) string
- func (ui *UI) RenderIP(ip string) string
- func (ui *UI) RenderInfo(message string) string
- func (ui *UI) RenderKeyValue(key, value string) string
- func (ui *UI) RenderSection(title string) string
- func (ui *UI) RenderSeparator() string
- func (ui *UI) RenderSuccess(message string) string
- func (ui *UI) RenderTitle(title string, emoji string) string
- func (ui *UI) RenderWarning(message string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyMap ¶
type KeyMap struct {
Up key.Binding
Down key.Binding
Add key.Binding
Edit key.Binding
Delete key.Binding
Apply key.Binding
Quit key.Binding
Help key.Binding
}
KeyMap defines the keybindings for the TUI
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the state of the TUI application
type StyleConfig ¶
type StyleConfig struct {
// General styles
Header lipgloss.Style
Section lipgloss.Style
Title lipgloss.Style
Subtitle lipgloss.Style
Normal lipgloss.Style
Bold lipgloss.Style
Dimmed lipgloss.Style
// Status styles
Success lipgloss.Style
Warning lipgloss.Style
Error lipgloss.Style
Info lipgloss.Style
// Action styles
Add lipgloss.Style
Update lipgloss.Style
Remove lipgloss.Style
Count lipgloss.Style
// Content styles
Hostname lipgloss.Style
IP lipgloss.Style
Description lipgloss.Style
DryRun lipgloss.Style
// Table styles
TableStyles table.Styles
}
StyleConfig contains all the styles used in the application
func DefaultStyles ¶
func DefaultStyles() StyleConfig
DefaultStyles returns the default style configuration
type UI ¶
type UI struct {
Styles StyleConfig
}
UI provides common UI rendering functions for all commands
func (*UI) RenderDescription ¶
RenderDescription renders a description
func (*UI) RenderDryRun ¶
RenderDryRun renders a dry run indicator
func (*UI) RenderError ¶
RenderError renders an error message
func (*UI) RenderHostname ¶
RenderHostname renders a hostname
func (*UI) RenderInfo ¶
RenderInfo renders an info message
func (*UI) RenderKeyValue ¶
RenderKeyValue renders a key-value pair
func (*UI) RenderSection ¶
RenderSection renders a section title
func (*UI) RenderSeparator ¶
RenderSeparator renders a horizontal separator line
func (*UI) RenderSuccess ¶
RenderSuccess renders a success message
func (*UI) RenderTitle ¶
RenderTitle renders a title with optional emoji
func (*UI) RenderWarning ¶
RenderWarning renders a warning message