ui

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DelayedQuit

func DelayedQuit() tea.Msg

DelayedQuit delays the QuitSignal so that any UI updates can happen before the binary is stopped.

Types

type LogView

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

LogView handles creating the logs portion of the UI.

func NewLogView

func NewLogView() *LogView

NewLogView creates a LogView with appropriate defaults.

func (*LogView) Resize

func (lv *LogView) Resize(width, height int)

Resize sets the width/height of the LogView.

func (*LogView) Update

func (lv *LogView) Update(msg app.Message)

Update LogView with data needed for View.

func (*LogView) View

func (lv *LogView) View() string

View combines all of LogView's data into a string used by the parent View.

type QuitSignal

type QuitSignal struct{}

type ServiceView

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

ServiceView handles creating the services portion of the UI.

func NewServiceView

func NewServiceView() *ServiceView

NewServiceView creates a ServiceView with appropriate defaults.

func (*ServiceView) Resize

func (v *ServiceView) Resize(width, height int)

Resize sets the width/height of the ServiceView.

func (*ServiceView) Update

func (v *ServiceView) Update(msg app.ServiceMessage)

Update ServiceView with data needed for View.

func (*ServiceView) UpdateStatus

func (v *ServiceView) UpdateStatus(msg app.ServiceStatus)

UpdateStatus handles changes in status based on app.ServiceStatus.

func (*ServiceView) View

func (v *ServiceView) View() string

View combines all of ServiceView's data into a string used by the parent View.

type UI

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

UI handles creating all parts of the user interface.

func New

func New() *UI

New creates the UI with appropriate defaults.

func (*UI) Init

func (ui *UI) Init() tea.Cmd

Init handles startup items.

func (*UI) SetCancel

func (ui *UI) SetCancel(cancel func())

SetCancel makes the context.Context cancel function available to the UI.

func (*UI) SetContext

func (ui *UI) SetContext(ctx *app.Context)

SetContext makes the app.Context available to the UI.

func (*UI) Update

func (ui *UI) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update UI with data needed by View.

func (*UI) View

func (ui *UI) View() string

View combines all of UI's data into a string for display.

Jump to

Keyboard shortcuts

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