refactor: rename ping CSV columns to match doc key names (battery_charging, connection_status, etc.)

Co-authored-by: coolaj86 <122831+coolaj86@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-02 08:28:37 +00:00
parent 9b79800b07
commit 60097fd661

View File

@ -128,14 +128,14 @@ type DeviceHealth struct {
// DeviceChecks holds the individual health checks reported by the device.
// Go field names are camelCase; json tags carry the colon-delimited API key names.
// csv tags use descriptive column names that reflect the unit of each observation.
// csv tags mirror the documentation key names with underscores instead of colons.
type DeviceChecks struct {
BatteryCharging HealthCheck `json:"battery:charging" csv:"charging_flags"`
BatteryLevel HealthCheck `json:"battery:level" csv:"battery_percent"`
ConnectionCellular HealthCheck `json:"connection:cellular" csv:"cellular_index"`
ConnectionStatus BoolHealthCheck `json:"connection:status" csv:"internet_connected"`
ConnectionTransport HealthCheck `json:"connection:transport" csv:"transport_flags"`
MessagesFailed HealthCheck `json:"messages:failed" csv:"failed_messages"`
BatteryCharging HealthCheck `json:"battery:charging" csv:"battery_charging"`
BatteryLevel HealthCheck `json:"battery:level" csv:"battery_level"`
ConnectionCellular HealthCheck `json:"connection:cellular" csv:"connection_cellular"`
ConnectionStatus BoolHealthCheck `json:"connection:status" csv:"connection_status"`
ConnectionTransport HealthCheck `json:"connection:transport" csv:"connection_transport"`
MessagesFailed HealthCheck `json:"messages:failed" csv:"messages_failed"`
}
// HealthCheck represents a single named health check result.