Documentation
¶
Index ¶
- type ColorStyle
- type DevTUI
- func (h *DevTUI) ContentView() string
- func (h *DevTUI) Init() tea.Cmd
- func (h *DevTUI) Print(messages ...any)
- func (h *DevTUI) PrintError(messages ...any)
- func (h *DevTUI) PrintInfo(messages ...any)
- func (h *DevTUI) PrintOK(messages ...any)
- func (h *DevTUI) PrintWarning(messages ...any)
- func (t *DevTUI) ReturnFocus() error
- func (t *DevTUI) SendMessage(content string, msgType MessageType)
- func (h *DevTUI) StartTUI(wg *sync.WaitGroup)
- func (h *DevTUI) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (h *DevTUI) View() string
- func (h *DevTUI) Write(p []byte) (n int, err error)
- type MessageType
- type SectionField
- type TabSection
- type TuiConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColorStyle ¶
type DevTUI ¶
type DevTUI struct {
*TuiConfig
// contains filtered or unexported fields
}
DevTUI mantiene el estado de la aplicación
func (*DevTUI) ContentView ¶
ContentView renderiza los mensajes para una sección de contenido
func (*DevTUI) PrintError ¶
PrintError sends an error Label to the tui
func (*DevTUI) PrintWarning ¶
PrintWarning sends a warning Label to the tui
func (*DevTUI) ReturnFocus ¶
func (*DevTUI) SendMessage ¶
func (t *DevTUI) SendMessage(content string, msgType MessageType)
SendMessage envía un mensaje al tui
type MessageType ¶
type MessageType string
MessageType define el tipo de mensaje
const ( NormMsg MessageType = "normal" InfoMsg MessageType = "info" ErrorMsg MessageType = "error" WarnMsg MessageType = "warn" OkMsg MessageType = "ok" )
type SectionField ¶
type SectionField struct {
Name string // eg: "port", "Server Port", "8080"
Label string // eg: "Server Port"
Value string // eg: "8080"
Editable bool // if no editable eject the action FieldValueChange directly
FieldValueChange func(newValue string) (runMessage string, err error) //eg: "8080" -> "9090" runMessage: "Port changed from 8080 to 9090"
// contains filtered or unexported fields
}
Interface for handling tab field sectionFields
func (*SectionField) SetCursorAtEnd ¶
func (cf *SectionField) SetCursorAtEnd()
type TabSection ¶
type TabSection struct {
Title string // eg: "BUILD", "TEST"
SectionFields []SectionField // Field actions configured for the section
// contains filtered or unexported fields
}
represent the tab section in the tui
type TuiConfig ¶
type TuiConfig struct {
TabIndexStart int // is the index of the tab to start
ExitChan chan bool // global chan to close app
TabSections []TabSection // represent sections in the tui
Color *ColorStyle
}
Click to show internal directories.
Click to hide internal directories.