mirror of
https://github.com/shankar0123/certctl.git
synced 2026-06-07 13:51:36 +00:00
8308beb5bb
Three bugs fixed: - Docker Compose only mounted migration 000001; migrations 000002-000007 (profiles, agent groups, revocation, discovery, network scans) never ran, breaking half the demo features. Now mounts all 7 migrations in order. - Network Scans page crashed with pq.Array scan error because lib/pq doesn't support []int, only []int64. Changed Ports field accordingly. - Dashboard pie chart displayed "RenewalInProgress" without spaces. Added formatStatus() helper for PascalCase → spaced display. Also adds first-run demo experience improvements: - 9 discovered certificates (filesystem + network scan mix) - 3 discovery scans with recent timestamps - 2 AwaitingApproval renewal jobs for approval workflow demo - CERTCTL_NETWORK_SCAN_ENABLED=true in Docker Compose - Network scan targets seeded with last_scan results - Version badge updated to v2.0.5 - Docs updated (quickstart, advanced demo) to reference seeded data Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
979 B
Go
28 lines
979 B
Go
package domain
|
|
|
|
import "time"
|
|
|
|
// NetworkScanTarget defines a network range to scan for TLS certificates.
|
|
type NetworkScanTarget struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
CIDRs []string `json:"cidrs"`
|
|
Ports []int64 `json:"ports"`
|
|
Enabled bool `json:"enabled"`
|
|
ScanIntervalHours int `json:"scan_interval_hours"`
|
|
TimeoutMs int `json:"timeout_ms"`
|
|
LastScanAt *time.Time `json:"last_scan_at,omitempty"`
|
|
LastScanDurationMs *int `json:"last_scan_duration_ms,omitempty"`
|
|
LastScanCertsFound *int `json:"last_scan_certs_found,omitempty"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
// NetworkScanResult holds the outcome of scanning a single endpoint.
|
|
type NetworkScanResult struct {
|
|
Address string // "ip:port"
|
|
Certs []DiscoveredCertEntry
|
|
Error string
|
|
LatencyMs int
|
|
}
|