ui

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package ui implements the NOVA terminal user interface using BubbleTea and Lipgloss. The TUI is keyboard-driven with clearly documented bindings, no hidden actions, and no destructive operations without confirmation. All scan operations run asynchronously so the UI never freezes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPrivilege

func CheckPrivilege() bool

CheckPrivilege returns true if the process is running as root (UID 0).

func Run

func Run(isRoot bool, hostCIDR string) error

Run starts the BubbleTea program. It blocks until the user quits.

Types

type Model

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

Model holds the complete TUI state.

func NewModel

func NewModel(isRoot bool, hostCIDR string) Model

NewModel creates a new TUI model. isRoot indicates whether the process has root privileges (affects scan type offered to the user).

func (Model) Init

func (m Model) Init() tea.Cmd

Init starts the loading spinner tick.

func (Model) Update

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

Update processes incoming messages and updates the model.

func (Model) View

func (m Model) View() string

View renders the current UI state as a string.

Jump to

Keyboard shortcuts

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