Documentation
¶
Overview ¶
Package i2ptui provides an embeddable Bubble Tea TUI for monitoring and managing an I2P router via the I2PControl JSON-RPC interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DarkTheme = Theme{ ActiveTab: lipgloss.Color("205"), InactiveTab: lipgloss.Color("240"), Header: lipgloss.Color("240"), Label: lipgloss.Color("252"), Value: lipgloss.Color("86"), Section: lipgloss.Color("99"), Error: lipgloss.Color("196"), Status: lipgloss.Color("220"), Footer: lipgloss.Color("240"), Selected: lipgloss.Color("205"), ConfirmBdr: lipgloss.Color("205"), Notify: lipgloss.Color("228"), Restart: lipgloss.Color("214"), }
DarkTheme is the default dark color scheme.
var LightTheme = Theme{ ActiveTab: lipgloss.Color("127"), InactiveTab: lipgloss.Color("245"), Header: lipgloss.Color("245"), Label: lipgloss.Color("238"), Value: lipgloss.Color("28"), Section: lipgloss.Color("63"), Error: lipgloss.Color("160"), Status: lipgloss.Color("172"), Footer: lipgloss.Color("245"), Selected: lipgloss.Color("127"), ConfirmBdr: lipgloss.Color("127"), Notify: lipgloss.Color("136"), Restart: lipgloss.Color("166"), }
LightTheme is a lighter color scheme for light terminals.
Functions ¶
func DefaultConfigPath ¶
func DefaultConfigPath() string
DefaultConfigPath returns the default path for the config file.
func SaveConfig ¶
SaveConfig writes the config to disk, creating directories as needed.
Types ¶
type Config ¶
type Config struct {
Host string `json:"host,omitempty"`
Port string `json:"port,omitempty"`
Path string `json:"path,omitempty"`
Password string `json:"password,omitempty"`
Cert string `json:"cert,omitempty"`
Interval string `json:"interval,omitempty"`
Theme string `json:"theme,omitempty"`
}
Config represents the persistent configuration file.
func LoadConfig ¶
LoadConfig reads and parses the config file. Returns zero Config on error.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the root Bubble Tea model for i2ptui.
type Option ¶
type Option func(*Model)
Option configures a Model before it starts.
func WithInterval ¶
WithInterval sets the polling interval between snapshot fetches.
func WithPassword ¶
WithPassword sets the I2PControl API password.
type Theme ¶
type Theme struct {
ActiveTab lipgloss.Color
InactiveTab lipgloss.Color
Header lipgloss.Color
Label lipgloss.Color
Value lipgloss.Color
Section lipgloss.Color
Error lipgloss.Color
Status lipgloss.Color
Selected lipgloss.Color
ConfirmBdr lipgloss.Color
Notify lipgloss.Color
Restart lipgloss.Color
}
Theme defines the color scheme for the TUI.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
i2ptui
command
Command i2ptui is the standalone CLI for the I2P router TUI.
|
Command i2ptui is the standalone CLI for the I2P router TUI. |
|
Package rpc wraps the go-i2pcontrol library into a polling-based snapshot model for use with Bubble Tea commands.
|
Package rpc wraps the go-i2pcontrol library into a polling-based snapshot model for use with Bubble Tea commands. |