package threat import ( "time" ) // ThreatAlert 威胁告警结构 type ThreatAlert struct { ID string `json:"id"` Timestamp time.Time `json:"timestamp"` Level string `json:"level"` // low, medium, high Type string `json:"type"` // 告警类型 Description string `json:"description"` Details string `json:"details"` SourceIP string `json:"sourceIP"` Domain string `json:"domain"` QueryType string `json:"queryType"` Resolved bool `json:"resolved"` // 是否已解决 ResolvedTime time.Time `json:"resolvedTime,omitempty"` Action string `json:"action,omitempty"` // 处理动作:blocked, allowed } // ClientQueryStats 客户端查询统计 type ClientQueryStats struct { QueryCount int // 查询计数 NXDomainCount int // NXDOMAIN响应计数 LastQueryTime time.Time // 最后查询时间 QueryTypes map[string]int // 查询类型统计 }