ui

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorMsg

type ErrorMsg struct {
	Err error
}

type FrameTickMsg

type FrameTickMsg time.Time

type Model

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

Model represents the application state

func InitialModel

func InitialModel() Model

InitialModel creates and returns a new model

func (Model) AnimateFrame

func (m Model) AnimateFrame() tea.Cmd

Animation commands

func (Model) DrawPrecipitation

func (m Model) DrawPrecipitation(display [][]string, data [][]int, rw, rh int)

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the model

func (Model) ResetToInput

func (m Model) ResetToInput() Model

Helper methods

func (Model) ScheduleRefresh

func (m Model) ScheduleRefresh() tea.Cmd

func (Model) TrackProgress

func (m Model) TrackProgress() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages

func (Model) View

func (m Model) View() string

View renders the UI

type ProgressMsg

type ProgressMsg float64

type RefreshTickMsg

type RefreshTickMsg time.Time

type State

type State int

Model states

const (
	StateInput State = iota
	StateLoading
	StateDisplaying
	StateError
)

type TickMsg

type TickMsg time.Time

Messages

Jump to

Keyboard shortcuts

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