tui

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SwitchToAdminMode

func SwitchToAdminMode() tea.Msg

func SwitchToDefaultMode

func SwitchToDefaultMode() tea.Msg

Types

type MasonReader added in v0.2.0

type MasonReader interface {
	ListNetworks(context.Context) []model.Network
	CountNetworks(context.Context) int
	ListDevices(context.Context) []model.Device
	CountDevices(context.Context) int
	GetDeviceByAddr(context.Context, model.Addr) (model.Device, error)
	ReadPerformancePings(
		context.Context,
		model.Device,
		time.Duration,
	) ([]pinger.Point, error)
	// GetConfig() *Config
	GetInternalsSnapshot(ctx context.Context) server.MasonInternalsView
	GetUserAgent() string
	OuiLookup(mac net.HardwareAddr) string
	GetNetworkStats(ctx context.Context) []model.NetworkStats
	PingFailures(ctx context.Context) []model.Device
	ServerDevices(ctx context.Context) []model.Device
	FlowSummaryByIP(context.Context, model.Addr) ([]model.FlowSummaryForAddrByIP, error)
	FlowSummaryByName(context.Context, model.Addr) ([]model.FlowSummaryForAddrByName, error)
	FlowSummaryByCountry(context.Context, model.Addr) ([]model.FlowSummaryForAddrByCountry, error)
	LookupIP(model.Addr) string
}

type MasonReaderWriter added in v0.2.0

type MasonReaderWriter interface {
	MasonReader
	MasonWriter
	MasonNetworker
}

type MasonWriter added in v0.2.0

type MasonWriter interface {
	AddNetwork(context.Context, model.Network) error
	AddNetworkByName(context.Context, string, string, bool) error
}

type SwitchToAdminModeMsg

type SwitchToAdminModeMsg struct{}

type SwitchToDefaultModeMsg

type SwitchToDefaultModeMsg struct{}

type Tui

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

func New

func New(m MasonReaderWriter) *Tui

func (Tui) Init

func (t Tui) Init() tea.Cmd

func (*Tui) TeaHandler

func (t *Tui) TeaHandler(s ssh.Session) (tea.Model, []tea.ProgramOption)

func (*Tui) Update

func (t *Tui) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Tui) View

func (t Tui) View() string

type TuiNetworksModel

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

func (TuiNetworksModel) Init

func (nm TuiNetworksModel) Init() tea.Cmd

func (TuiNetworksModel) Update

func (nm TuiNetworksModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (TuiNetworksModel) View

func (nm TuiNetworksModel) View() string

Jump to

Keyboard shortcuts

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