Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InterfaceInfo ¶
InterfaceInfo holds a network interface name and its IPv4 address.
func BuildInterfaceInfos ¶
func BuildInterfaceInfos(ifaces []net.Interface, addrsByIface map[string][]net.Addr) []InterfaceInfo
BuildInterfaceInfos converts scanner/main interface data into target IP choices.
type Model ¶
type Model struct {
ShowHelp bool
FocusedField int // 0=IP, 1=CIDR, 2=PortMode
IPTextInput textinput.Model
CIDRTextInput textinput.Model
IPInput string
CIDRInput string // e.g. "32", "24", "16"
PortPack string
PortModeIndex int // index into portModeOptions
CustomPorts string // seed/persistence; synced from PortInput on submit
PortInput common.CustomPortInput // replaces huh custom_ports field
InCustomPortInput bool // true when showing port textinput stage
ErrorMsg string
NetworkScan shared.Scanner
InterfaceIPs []string // Available interface IPs (deprecated, use InterfaceInfos)
InterfaceInfos []InterfaceInfo // Available interfaces with names and IPs
IPIndex int // Current index in InterfaceInfos
HoveredHelpItem int // -1 means no hover, otherwise index of helpline item
HelpLineY int // Y row where the helpline starts, set during render
FieldY [fieldCount]int // Y row where each field starts, set during render
}
func NewModel ¶
func NewModel(networkScan shared.Scanner, ipInput, cidrInput, portPack, customPorts string, interfaceInfos []InterfaceInfo) Model
NewModel creates a new target view model with inputs bound to the model's fields Deprecated: Use struct literal initialization and call Init() instead
func (*Model) CycleInterfaceIP ¶
CycleInterfaceIP cycles to the next or previous interface IP forward=true moves to next, forward=false moves to previous
func (*Model) HandleMouse ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.