app

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertDetailLoadedMsg

type AlertDetailLoadedMsg struct {
	Alert *api.Alert
	Index int // Index in the alerts list to update
	Err   error
}

AlertDetailLoadedMsg is sent when alert detail is fetched

type AlertsLoadedMsg

type AlertsLoadedMsg struct {
	Alerts     []api.Alert
	Pagination api.PaginationInfo
	Err        error
}

AlertsLoadedMsg is sent when alerts are loaded from the API

type ErrorMsg

type ErrorMsg struct {
	Err error
}

ErrorMsg represents a generic error

type IncidentDetailLoadedMsg

type IncidentDetailLoadedMsg struct {
	Incident *api.Incident
	Index    int // Index in the incidents list to update
	Err      error
}

IncidentDetailLoadedMsg is sent when incident detail is fetched

type IncidentsLoadedMsg

type IncidentsLoadedMsg struct {
	Incidents  []api.Incident
	Pagination api.PaginationInfo
	Err        error
}

IncidentsLoadedMsg is sent when incidents are loaded from the API

type KeyMap

type KeyMap struct {
	Up       key.Binding
	Down     key.Binding
	Tab      key.Binding
	Refresh  key.Binding
	Help     key.Binding
	Logs     key.Binding
	Setup    key.Binding
	About    key.Binding
	Quit     key.Binding
	Enter    key.Binding
	Open     key.Binding
	Top      key.Binding
	Bottom   key.Binding
	PrevPage key.Binding
	NextPage key.Binding
	Sort     key.Binding
	Copy     key.Binding
}

func DefaultKeyMap

func DefaultKeyMap() KeyMap

type Model

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

func New

func New(version string) Model

func (Model) Close

func (m Model) Close() error

Close cleans up resources (cache, connections) when the app exits

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

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

func (Model) View

func (m Model) View() string

type Screen

type Screen int
const (
	ScreenSetup Screen = iota
	ScreenMain
)

type Tab

type Tab int
const (
	TabIncidents Tab = iota
	TabAlerts
)

type URLOpener

type URLOpener func(url string) error

URLOpener is a function type for opening URLs in a browser (injectable for testing)

Jump to

Keyboard shortcuts

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