Documentation
¶
Index ¶
- func GetStaticFS() fs.FS
- func GetTemplates() (*template.Template, error)
- func StartWebServer(cfg *config.NexusConfig, nexusServer *nexus.Server, logger *zap.Logger) error
- type DashboardData
- type DatabaseStatus
- type ErrorResponse
- type HealthResponse
- type MinionInfo
- type MinionsResponse
- type ServerInfo
- type ServerStatusInfo
- type StatusResponse
- type WebServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTemplates ¶
GetTemplates loads and parses embedded HTML templates
func StartWebServer ¶
StartWebServer starts the HTTP web server
Types ¶
type DashboardData ¶
type DashboardData struct {
Title string `json:"title"`
Version string `json:"version"`
Uptime string `json:"uptime"`
SystemStatus string `json:"system_status"`
MinionCount int `json:"minion_count"`
MinionPort int `json:"minion_port"`
ConsolePort int `json:"console_port"`
WebPort int `json:"web_port"`
Minions []MinionInfo `json:"minions"`
}
DashboardData represents data for the dashboard template
type DatabaseStatus ¶
DatabaseStatus represents database connection status
type ErrorResponse ¶
ErrorResponse represents an API error response
type HealthResponse ¶
HealthResponse represents the API health response
type MinionInfo ¶
type MinionInfo struct {
ID string `json:"id"`
Status string `json:"status"`
ConnectedAt time.Time `json:"connected_at"`
LastSeen time.Time `json:"last_seen"`
}
MinionInfo represents information about a connected minion
type MinionsResponse ¶
type MinionsResponse struct {
Count int `json:"count"`
Minions []MinionInfo `json:"minions"`
}
MinionsResponse represents the API minions response
type ServerInfo ¶
type ServerInfo struct {
Port int `json:"port"`
Status string `json:"status"`
Connections int `json:"connections,omitempty"`
}
ServerInfo represents individual server information
type ServerStatusInfo ¶
type ServerStatusInfo struct {
Minion ServerInfo `json:"minion"`
Console ServerInfo `json:"console"`
Web ServerInfo `json:"web"`
}
ServerStatusInfo represents server status information
type StatusResponse ¶
type StatusResponse struct {
Version string `json:"version"`
Uptime string `json:"uptime"`
Timestamp string `json:"timestamp"`
Servers ServerStatusInfo `json:"servers"`
Database DatabaseStatus `json:"database"`
}
StatusResponse represents the API status response
type WebServer ¶
type WebServer struct {
// contains filtered or unexported fields
}
WebServer represents the HTTP web server
func NewWebServer ¶
func NewWebServer(cfg *config.NexusConfig, nexusServer *nexus.Server, logger *zap.Logger) (*WebServer, error)
NewWebServer creates a new web server instance