- Replace Go interface{} with any (Go 1.18+ standard)
- Add database indexes to frequently queried model fields
- Add JSDoc documentation to frontend API client methods
- Remove deprecated docker-compose version keys
- Add concurrency groups to all 25 GitHub Actions workflows
- Add YAML front matter and fix H1→H2 headings in docs
Coverage: Backend 85.5%, Frontend 87.73%
Security: No vulnerabilities detected
Refs: docs/plans/instruction_compliance_spec.md
24 lines
1.2 KiB
Go
24 lines
1.2 KiB
Go
// Package models defines the data types used throughout the application.
|
|
package models
|
|
|
|
// SecurityLogEntry represents a security-relevant log entry for live streaming.
|
|
// This struct is used by the LogWatcher service to broadcast parsed Caddy access logs
|
|
// with security event annotations to WebSocket clients.
|
|
type SecurityLogEntry struct {
|
|
Timestamp string `json:"timestamp"`
|
|
Level string `json:"level"`
|
|
Logger string `json:"logger"`
|
|
ClientIP string `json:"client_ip"`
|
|
Method string `json:"method"`
|
|
URI string `json:"uri"`
|
|
Status int `json:"status"`
|
|
Duration float64 `json:"duration"`
|
|
Size int64 `json:"size"`
|
|
UserAgent string `json:"user_agent"`
|
|
Host string `json:"host"`
|
|
Source string `json:"source"` // "waf", "crowdsec", "ratelimit", "acl", "normal"
|
|
Blocked bool `json:"blocked"` // True if request was blocked
|
|
BlockReason string `json:"block_reason,omitempty"` // Reason for blocking
|
|
Details map[string]any `json:"details,omitempty"` // Additional metadata
|
|
}
|