ui

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Bubble Tea model, update loop, and state management for the NetScan TUI. Handles keyboard input, scan lifecycle, sorting, filtering, and auto-refresh on a 30-second interval.

Catppuccin Mocha-inspired colour palette and lipgloss styles shared across all TUI components.

TUI view rendering. Builds the header, device table, footer, and detail overlay from the current model state using lipgloss.

Index

Constants

View Source
const (
	SortByIP       = "IP"
	SortByHostname = "Hostname"
	SortByMAC      = "MAC"
	SortByLatency  = "Latency"
)
View Source
const (
	ViewTable = "table"
	ViewGraph = "graph"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

func New

func New() Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (*Model) SetProgram

func (m *Model) SetProgram(p *tea.Program)

func (Model) Update

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

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

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