mirror of
https://github.com/therootcompany/golib.git
synced 2026-03-02 23:57:59 +00:00
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:
parent
9b79800b07
commit
60097fd661
@ -128,14 +128,14 @@ type DeviceHealth struct {
|
|||||||
|
|
||||||
// DeviceChecks holds the individual health checks reported by the device.
|
// DeviceChecks holds the individual health checks reported by the device.
|
||||||
// Go field names are camelCase; json tags carry the colon-delimited API key names.
|
// 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 {
|
type DeviceChecks struct {
|
||||||
BatteryCharging HealthCheck `json:"battery:charging" csv:"charging_flags"`
|
BatteryCharging HealthCheck `json:"battery:charging" csv:"battery_charging"`
|
||||||
BatteryLevel HealthCheck `json:"battery:level" csv:"battery_percent"`
|
BatteryLevel HealthCheck `json:"battery:level" csv:"battery_level"`
|
||||||
ConnectionCellular HealthCheck `json:"connection:cellular" csv:"cellular_index"`
|
ConnectionCellular HealthCheck `json:"connection:cellular" csv:"connection_cellular"`
|
||||||
ConnectionStatus BoolHealthCheck `json:"connection:status" csv:"internet_connected"`
|
ConnectionStatus BoolHealthCheck `json:"connection:status" csv:"connection_status"`
|
||||||
ConnectionTransport HealthCheck `json:"connection:transport" csv:"transport_flags"`
|
ConnectionTransport HealthCheck `json:"connection:transport" csv:"connection_transport"`
|
||||||
MessagesFailed HealthCheck `json:"messages:failed" csv:"failed_messages"`
|
MessagesFailed HealthCheck `json:"messages:failed" csv:"messages_failed"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// HealthCheck represents a single named health check result.
|
// HealthCheck represents a single named health check result.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user