Documentation
¶
Index ¶
- Variables
- func Run(ctx context.Context, stdout io.Writer, addr, token string, ...) error
- func RunWithOptions(ctx context.Context, stdout io.Writer, addr, token string, ...) error
- func ThresholdColor(pct float64) lipgloss.TerminalColor
- type APIError
- type ApplyResponse
- type BotConfigRequest
- type BotConfigResponse
- type Client
- type ConfigRuleDiff
- type ConfigRulesRequest
- type ConfigRulesResponse
- type HostNetworkAddress
- type HostNetworkInterface
- type HostNetworkSnapshot
- type Model
- type PrecheckResponse
- type ReloadResponse
- type RuleInfo
- type RulesResponse
- type RunOptions
- type ServiceController
- type ServiceSummary
- type SessionCapabilities
- type SessionResponse
- type StatsResponse
- type TrafficSnapshot
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrServiceNotInstalled classifies a start failure caused by a missing // native service definition. ErrServiceNotInstalled = errors.New("native service is not installed") // ErrServicePrivilegesRequired classifies a start failure that can be // retried through ElevatedStartCommand. ErrServicePrivilegesRequired = errors.New("administrator privileges are required") )
View Source
var ( CText = lipgloss.AdaptiveColor{Light: "#1f2937", Dark: "#c0caf5"} CDim = lipgloss.AdaptiveColor{Light: "#667085", Dark: "#7f849c"} CBorder = lipgloss.AdaptiveColor{Light: "#cbd5e1", Dark: "#3b4261"} CCyan = lipgloss.AdaptiveColor{Light: "#0e7490", Dark: "#7dcfff"} CGreen = lipgloss.AdaptiveColor{Light: "#15803d", Dark: "#9ece6a"} CYellow = lipgloss.AdaptiveColor{Light: "#a16207", Dark: "#e0af68"} CRed = lipgloss.AdaptiveColor{Light: "#b42318", Dark: "#f7768e"} CPurple = lipgloss.AdaptiveColor{Light: "#7e22ce", Dark: "#bb9af7"} CBlue = lipgloss.AdaptiveColor{Light: "#1d4ed8", Dark: "#7aa2f7"} COrange = lipgloss.AdaptiveColor{Light: "#c2410c", Dark: "#ff9e64"} CTeal = lipgloss.AdaptiveColor{Light: "#0f766e", Dark: "#73daca"} // Upload / Download accent CUpload = lipgloss.AdaptiveColor{Light: "#be185d", Dark: "#ff79c6"} CDownload = lipgloss.AdaptiveColor{Light: "#047857", Dark: "#00ff87"} // 4-tier threshold COk = lipgloss.AdaptiveColor{Light: "#15803d", Dark: "#00ff87"} CWarn = lipgloss.AdaptiveColor{Light: "#a16207", Dark: "#ffd700"} CAlert = lipgloss.AdaptiveColor{Light: "#c2410c", Dark: "#ffaf5f"} CCritical = lipgloss.AdaptiveColor{Light: "#b42318", Dark: "#ff5555"} CMuted = lipgloss.AdaptiveColor{Light: "#6b7280", Dark: "#6c6c6c"} CInfo = lipgloss.AdaptiveColor{Light: "#2563eb", Dark: "#5fafff"} // Row background alternating CRowA = lipgloss.AdaptiveColor{Light: "#f8fafc", Dark: "#1a1b26"} CRowB = lipgloss.AdaptiveColor{Light: "#eef2f7", Dark: "#1f2335"} CSel = lipgloss.AdaptiveColor{Light: "#dbeafe", Dark: "#283457"} )
View Source
var PanelIcons = map[string]string{
"System": "◈",
"Traffic": "◆",
"Rules": "☰",
"Network": "◎",
"Detail": "◉",
"Help": "?",
}
Functions ¶
func RunWithOptions ¶ added in v0.3.0
func ThresholdColor ¶
func ThresholdColor(pct float64) lipgloss.TerminalColor
Types ¶
type APIError ¶ added in v0.3.0
type APIError = controlapi.APIError
type ApplyResponse ¶ added in v0.3.0
type ApplyResponse = controlapi.ApplyResponse
type BotConfigRequest ¶ added in v0.3.0
type BotConfigRequest = controlapi.BotConfigRequest
type BotConfigResponse ¶ added in v0.3.0
type BotConfigResponse = controlapi.BotConfigResponse
type Client ¶
type Client = controlapi.Client
type ConfigRuleDiff ¶ added in v0.3.0
type ConfigRuleDiff = controlapi.ConfigRuleDiff
type ConfigRulesRequest ¶ added in v0.3.0
type ConfigRulesRequest = controlapi.ConfigRulesRequest
type ConfigRulesResponse ¶ added in v0.3.0
type ConfigRulesResponse = controlapi.ConfigRulesResponse
type HostNetworkAddress ¶ added in v0.3.0
type HostNetworkInterface ¶ added in v0.3.0
type HostNetworkSnapshot ¶ added in v0.3.0
type PrecheckResponse ¶ added in v0.3.0
type PrecheckResponse = controlapi.PrecheckResponse
type ReloadResponse ¶
type ReloadResponse = controlapi.ReloadResponse
type RulesResponse ¶
type RulesResponse = controlapi.RulesResponse
type RunOptions ¶ added in v0.3.0
type RunOptions struct {
Translator *i18n.Translator
ServiceController *ServiceController
}
RunOptions controls presentation and optional local-service recovery for a TUI session.
type ServiceController ¶ added in v0.3.0
type ServiceController struct {
Inspect func(context.Context) (ServiceSummary, error)
Start func(context.Context) error
ElevatedStartCommand func() (*exec.Cmd, error)
InstallCommand string
}
ServiceController connects the TUI recovery flow to the native service manager. It is supplied only for a known-local management target.
type ServiceSummary ¶ added in v0.3.0
ServiceSummary is the platform-independent native service state needed by the TUI recovery flow.
type SessionCapabilities ¶ added in v0.3.0
type SessionCapabilities = controlapi.SessionCapabilities
type SessionResponse ¶ added in v0.3.0
type SessionResponse = controlapi.SessionResponse
type StatsResponse ¶
type StatsResponse = controlapi.StatsResponse
type TrafficSnapshot ¶
type TrafficSnapshot = controlapi.TrafficSnapshot
Click to show internal directories.
Click to hide internal directories.