Documentation
¶
Index ¶
- type BinaryInfo
- type ConfigInfo
- type CountryStats
- type DashboardData
- type FHSItem
- type HealthCheck
- type HealthData
- type HealthItem
- type IPCheckResult
- type InventoryData
- type ModuleStatus
- type NavItem
- type RecentBan
- type ResourceStats
- type SecurityKPIs
- type ServiceInfo
- type SystemIdentity
- type TimerInfo
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryInfo ¶ added in v1.1.1
BinaryInfo represents an installed binary
type ConfigInfo ¶ added in v1.1.1
ConfigInfo represents a configuration file
type CountryStats ¶ added in v1.1.1
CountryStats for geo distribution
type DashboardData ¶ added in v1.1.1
type DashboardData struct {
// System Identity (Top Left)
Identity SystemIdentity
// Security KPIs (Top Right)
Security SecurityKPIs
// Hardware Resources
Resources ResourceStats
// Module Status Grid
Modules []ModuleStatus
// Recent Activity
RecentBans []RecentBan
// Theme preference
Theme string // "dark" or "light"
}
DashboardData contains all dashboard information for zero-refresh updates
type FHSItem ¶ added in v1.1.1
type FHSItem struct {
Path string
Expected string
Actual string
Status string // "ok", "error", "warning"
Notes string
}
FHSItem represents a filesystem hierarchy item
type HealthCheck ¶ added in v1.1.1
type HealthCheck struct {
Name string
Status string // "ok", "warning", "error"
ExitCode int
Message string
}
HealthCheck represents a single health check category
type HealthData ¶ added in v1.1.1
type HealthData struct {
Timestamp string
OverallStatus string // "ok", "warning", "error"
ExitCode int
ErrorCount int
WarningCount int
Checks []HealthCheck
Errors []string
Warnings []string
}
HealthData holds comprehensive health check results
type HealthItem ¶ added in v1.1.1
type HealthItem struct {
Name string
Status string // "ok", "warning", "error"
Detail string // Additional info
}
HealthItem represents a single health check (legacy)
type IPCheckResult ¶ added in v1.1.1
type IPCheckResult struct {
IP string
Status string // "banned", "whitelisted", "clean"
BannedSince string
Reason string
Module string
Country string
}
IPCheckResult holds the result of an IP lookup
type InventoryData ¶ added in v1.1.1
type InventoryData struct {
Services []ServiceInfo
Timers []TimerInfo
Binaries []BinaryInfo
Configs []ConfigInfo
FHS []FHSItem
}
InventoryData holds all inventory information
type ModuleStatus ¶ added in v1.1.1
type ModuleStatus struct {
Name string
Description string
Status string // "active", "inactive", "failed", "warning"
Enabled bool
Running bool
// Module-specific metrics
BansProduced int // How many IPs this module has added
CPUPercent float64 // Module-specific CPU (if separate process)
MemoryMB float64 // Module-specific memory
LastSync string // Last time module reported in
ServiceName string // Systemd service name for restart
}
ModuleStatus holds individual module information
type RecentBan ¶ added in v1.1.1
type RecentBan struct {
IP string
Country string
CountryCode string
Reason string
Module string // Which module triggered the ban
Timestamp string
}
RecentBan represents a recent ban entry
type ResourceStats ¶ added in v1.1.1
type ResourceStats struct {
// CPU
CPUPercent float64
CPULoadAvg1 float64
CPULoadAvg5 float64
CPULoadAvg15 float64
// RAM
RAMUsedGB float64
RAMTotalGB float64
RAMPercent float64
// Disk (focus on log partition)
DiskUsedGB float64
DiskTotalGB float64
DiskPercent float64
DiskPath string // Which partition we're monitoring
// NFTBan Process specifically
NFTBanCPU float64
NFTBanMemMB float64
NFTBanUptime string
}
ResourceStats holds system resource information
type SecurityKPIs ¶ added in v1.1.1
type SecurityKPIs struct {
// Active Bans
BansTotal int
BansIPv4 int
BansIPv6 int
// Whitelist
WhitelistTotal int
WhitelistIPv4 int
WhitelistIPv6 int
// Network Stats
NetworkInMbps float64
NetworkOutMbps float64
PacketDropRate int // Packets rejected per second
// Event counts
EventsLastHour int
TotalBansEver int
}
SecurityKPIs holds security statistics
type ServiceInfo ¶ added in v1.1.1
type ServiceInfo struct {
Name string
Description string
Status string // "active", "inactive", "failed"
PID int
MemoryMB float64
Uptime string
}
ServiceInfo represents a systemd service
type SystemIdentity ¶ added in v1.1.1
type SystemIdentity struct {
Hostname string
Kernel string
Uptime string
UptimeSeconds int64 // For JS counter
NFTBanVersion string
PanelMode string // "active", "warning", "error"
Heartbeat bool // Backend responding
}
SystemIdentity holds system identification info