app

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host struct {
	ID            int        `json:"id"`
	Label         string     `json:"label,omitempty"`
	GroupName     string     `json:"group_name,omitempty"`
	Tags          []string   `json:"tags,omitempty"`
	Hostname      string     `json:"hostname"`
	Username      string     `json:"username"`
	Port          int        `json:"port"`
	HasKey        bool       `json:"has_key"`
	KeyType       string     `json:"key_type"` // "ed25519", "rsa", "ecdsa", or "pasted"
	CreatedAt     time.Time  `json:"created_at"`
	LastConnected *time.Time `json:"last_connected,omitempty"`
}

Host represents an SSH host configuration

type ListItem added in v1.0.2

type ListItem struct {
	Kind      ListItemKind
	GroupName string // for groups and host membership (empty means ungrouped)
	Host      Host   // valid for Kind==ListItemHost
	Count     int    // host count for group header
}

ListItem represents a selectable item in the grouped list view.

type ListItemKind added in v1.0.2

type ListItemKind int
const (
	ListItemGroup ListItemKind = iota
	ListItemHost
	ListItemNewGroup
)

type ModalForm

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

ModalForm holds form state for add/edit modals

type Model

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

Model represents the application state

func NewModel

func NewModel() Model

NewModel creates a new application model

func NewModelWithVersion added in v1.0.4

func NewModelWithVersion(version string) Model

NewModelWithVersion creates a new application model with explicit binary version.

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the application

func (Model) Update

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

Update handles messages and updates the model

func (Model) View

func (m Model) View() string

View renders the UI

type SpotlightItem added in v1.0.2

type SpotlightItem struct {
	Kind      SpotlightItemKind
	GroupName string
	Host      Host
	Score     int
	Indent    int
}

SpotlightItem represents one row in spotlight results.

type SpotlightItemKind added in v1.0.2

type SpotlightItemKind int
const (
	SpotlightItemGroup SpotlightItemKind = iota
	SpotlightItemHost
)

type ViewMode

type ViewMode int

ViewMode represents the current view state

const (
	ViewModeList ViewMode = iota
	ViewModeAddHost
	ViewModeEditHost
	ViewModeDeleteHost
	ViewModeCreateGroup
	ViewModeRenameGroup
	ViewModeDeleteGroup
	ViewModeHelp
	ViewModeSpotlight
	ViewModeSettings
	ViewModeTokenManager
	ViewModeLogin
	ViewModeSetup // First-run password setup
	ViewModeQuitConfirm
)

func (ViewMode) String

func (v ViewMode) String() string

String returns the string representation of ViewMode

Jump to

Keyboard shortcuts

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