Documentation
¶
Index ¶
- func SendBuildStatus(status BuildStatus) tea.Cmd
- func SendRestartCount() tea.Cmd
- type BuildStatus
- type BuildStatusMsg
- type ForceRestartMsg
- type LogEntry
- type LogMessage
- type LogType
- type Model
- func (m *Model) AddLog(message string, logType LogType)
- func (m *Model) ClearLogs()
- func (m *Model) GetLogChan() chan LogMessage
- func (m *Model) IncrementRestartCount()
- func (m Model) Init() tea.Cmd
- func (m *Model) SetBuildStatus(status BuildStatus)
- func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m Model) View() string
- type RestartCountMsg
- type Styles
- type TUI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendBuildStatus ¶
func SendBuildStatus(status BuildStatus) tea.Cmd
func SendRestartCount ¶
Types ¶
type BuildStatus ¶
type BuildStatus int
BuildStatus represents the status of the last build
const ( StatusWatching BuildStatus = iota StatusBuilding StatusSuccess StatusError )
type BuildStatusMsg ¶
type BuildStatusMsg struct {
Status BuildStatus
}
type LogMessage ¶
LogMessage is sent through the channel to add new log entries
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the state of our TUI application
func (*Model) GetLogChan ¶
func (m *Model) GetLogChan() chan LogMessage
GetLogChan returns the channel for sending log messages
func (*Model) IncrementRestartCount ¶
func (m *Model) IncrementRestartCount()
IncrementRestartCount increases the restart counter
func (*Model) SetBuildStatus ¶
func (m *Model) SetBuildStatus(status BuildStatus)
SetBuildStatus updates the build status
type RestartCountMsg ¶
type RestartCountMsg struct{}
type Styles ¶
type Styles struct {
StatusBar lipgloss.Style
StatusBarKey lipgloss.Style
StatusBarValue lipgloss.Style
StatusWatching lipgloss.Style
StatusBuilding lipgloss.Style
StatusSuccess lipgloss.Style
StatusError lipgloss.Style
LogPanel lipgloss.Style
LogTimestamp lipgloss.Style
LogEntryInfo lipgloss.Style
LogEntrySuccess lipgloss.Style
LogEntryError lipgloss.Style
LogEntryRestart lipgloss.Style
LogEntryEvent lipgloss.Style
HelpBar lipgloss.Style
HelpKey lipgloss.Style
HelpDesc lipgloss.Style
}
Styles holds all the styling for the TUI
type TUI ¶
type TUI struct {
// contains filtered or unexported fields
}
TUI holds the Bubble Tea program and integrates with the runner
func (*TUI) GetProgram ¶
GetProgram returns the Bubble Tea program for external control
Click to show internal directories.
Click to hide internal directories.