Rewrite Strix from scratch as single binary
Complete architecture rewrite following go2rtc patterns: - pkg/ for pure logic (camdb, tester, probe, generate) - internal/ for application glue with Init() modules - Single HTTP server on :4567 with all endpoints - zerolog with password masking and memory ring buffer - Environment-based config only (no YAML files) API endpoints: /api/search, /api/streams, /api/test, /api/probe, /api/generate, /api/health, /api/log Dependencies: go2rtc v1.9.14, go-sqlite3, miekg/dns, zerolog
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
package probe
|
||||
|
||||
type Response struct {
|
||||
IP string `json:"ip"`
|
||||
Reachable bool `json:"reachable"`
|
||||
LatencyMs float64 `json:"latency_ms,omitempty"`
|
||||
Type string `json:"type"` // "unreachable", "standard", "homekit"
|
||||
Error string `json:"error,omitempty"`
|
||||
Probes Probes `json:"probes"`
|
||||
}
|
||||
|
||||
type Probes struct {
|
||||
Ping *PingResult `json:"ping"`
|
||||
Ports *PortsResult `json:"ports"`
|
||||
DNS *DNSResult `json:"dns"`
|
||||
ARP *ARPResult `json:"arp"`
|
||||
MDNS *MDNSResult `json:"mdns"`
|
||||
HTTP *HTTPResult `json:"http"`
|
||||
}
|
||||
|
||||
type PingResult struct {
|
||||
LatencyMs float64 `json:"latency_ms"`
|
||||
}
|
||||
|
||||
type PortsResult struct {
|
||||
Open []int `json:"open"`
|
||||
}
|
||||
|
||||
type DNSResult struct {
|
||||
Hostname string `json:"hostname"`
|
||||
}
|
||||
|
||||
type ARPResult struct {
|
||||
MAC string `json:"mac"`
|
||||
Vendor string `json:"vendor"`
|
||||
}
|
||||
|
||||
type MDNSResult struct {
|
||||
Name string `json:"name"`
|
||||
DeviceID string `json:"device_id"`
|
||||
Model string `json:"model"`
|
||||
Category string `json:"category"` // "camera", "doorbell"
|
||||
Paired bool `json:"paired"`
|
||||
Port int `json:"port"`
|
||||
}
|
||||
|
||||
type HTTPResult struct {
|
||||
Port int `json:"port"`
|
||||
StatusCode int `json:"status_code"`
|
||||
Server string `json:"server"`
|
||||
}
|
||||
Reference in New Issue
Block a user