Standardize codebase consistency: naming, JSON tags, logging, error wrapping

- JSON tags: fix snake_case to camelCase in dnsmasq (configFile, domainsConfigured,
  lastRestart), crowdsec Machine (lastPush, lastHeartbeat), network (primaryIP,
  primaryInterface). cscli raw parsing structs keep snake_case to match CLI output.
- Error wrapping: fix %v to %w in enableAuthelia for proper error chain preservation
- Naming: rename dnsmasq.ConfigGenerator to dnsmasq.Manager (matches all other packages),
  rename ServiceStatus to Status in dnsmasq and haproxy (matches authelia, crowdsec, etc.)
- Logging: standardize all slog calls to use "component" key instead of message prefixes.
  Affects reconcile, dnsfilter, ddns — now consistent with dnsmasq, haproxy, nftables, sse.
This commit is contained in:
2026-07-14 04:38:48 +00:00
parent 428d47f876
commit 3172e56288
13 changed files with 135 additions and 116 deletions

View File

@@ -9,8 +9,8 @@ import (
// NetworkInfo holds detected network configuration
type NetworkInfo struct {
PrimaryIP string `json:"primary_ip"`
PrimaryInterface string `json:"primary_interface"`
PrimaryIP string `json:"primaryIP"`
PrimaryInterface string `json:"primaryInterface"`
Gateway string `json:"gateway"`
}