366 lines
15 KiB
Go
366 lines
15 KiB
Go
package platform
|
|
|
|
type Page[T any] struct {
|
|
Items []T `json:"items"`
|
|
Total int `json:"total"`
|
|
Limit int `json:"limit"`
|
|
Offset int `json:"offset"`
|
|
}
|
|
|
|
type DashboardSummary struct {
|
|
OnlineVehicles int `json:"onlineVehicles"`
|
|
ActiveToday int `json:"activeToday"`
|
|
FrameToday int `json:"frameToday"`
|
|
IssueVehicles int `json:"issueVehicles"`
|
|
KafkaLag *int `json:"kafkaLag"`
|
|
Protocols []ProtocolStat `json:"protocols"`
|
|
ServiceStatuses []ServiceStatusStat `json:"serviceStatuses"`
|
|
LinkHealth []LinkHealth `json:"linkHealth"`
|
|
}
|
|
|
|
type ProtocolStat struct {
|
|
Protocol string `json:"protocol"`
|
|
Online int `json:"online"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
type ServiceStatusStat struct {
|
|
Status string `json:"status"`
|
|
Title string `json:"title"`
|
|
Count int `json:"count"`
|
|
}
|
|
|
|
type LinkHealth struct {
|
|
Name string `json:"name"`
|
|
Status string `json:"status"`
|
|
Detail string `json:"detail,omitempty"`
|
|
}
|
|
|
|
type VehicleRow struct {
|
|
VIN string `json:"vin"`
|
|
Plate string `json:"plate"`
|
|
Phone string `json:"phone"`
|
|
OEM string `json:"oem"`
|
|
Protocol string `json:"protocol"`
|
|
Online bool `json:"online"`
|
|
LastSeen string `json:"lastSeen"`
|
|
LocationText string `json:"locationText"`
|
|
BindingScore int `json:"bindingScore"`
|
|
ServiceStatus *VehicleServiceStatus `json:"serviceStatus,omitempty"`
|
|
}
|
|
|
|
type VehicleCoverageRow struct {
|
|
VIN string `json:"vin"`
|
|
Plate string `json:"plate"`
|
|
Phone string `json:"phone"`
|
|
OEM string `json:"oem"`
|
|
Protocols []string `json:"protocols"`
|
|
MissingProtocols []string `json:"missingProtocols"`
|
|
SourceStatus []VehicleSourceStatus `json:"sourceStatus"`
|
|
SourceCount int `json:"sourceCount"`
|
|
OnlineSourceCount int `json:"onlineSourceCount"`
|
|
Online bool `json:"online"`
|
|
LastSeen string `json:"lastSeen"`
|
|
BindingStatus string `json:"bindingStatus"`
|
|
ServiceStatus *VehicleServiceStatus `json:"serviceStatus,omitempty"`
|
|
SourceConsistency *VehicleSourceConsistency `json:"sourceConsistency,omitempty"`
|
|
}
|
|
|
|
type VehicleCoverageSummary struct {
|
|
TotalVehicles int `json:"totalVehicles"`
|
|
OnlineVehicles int `json:"onlineVehicles"`
|
|
SingleSourceVehicles int `json:"singleSourceVehicles"`
|
|
MultiSourceVehicles int `json:"multiSourceVehicles"`
|
|
NoDataVehicles int `json:"noDataVehicles"`
|
|
UnboundVehicles int `json:"unboundVehicles"`
|
|
ArchiveIncompleteVehicles int `json:"archiveIncompleteVehicles"`
|
|
MissingSources []MissingSourceStat `json:"missingSources"`
|
|
ArchiveMissingFields []ArchiveMissingFieldStat `json:"archiveMissingFields"`
|
|
}
|
|
|
|
type VehicleIdentityResolution struct {
|
|
LookupKey string `json:"lookupKey"`
|
|
Resolved bool `json:"resolved"`
|
|
VIN string `json:"vin"`
|
|
Plate string `json:"plate"`
|
|
Phone string `json:"phone"`
|
|
OEM string `json:"oem"`
|
|
Protocols []string `json:"protocols"`
|
|
Online bool `json:"online"`
|
|
LastSeen string `json:"lastSeen"`
|
|
ServiceStatus *VehicleServiceStatus `json:"serviceStatus,omitempty"`
|
|
}
|
|
|
|
type VehicleDetail struct {
|
|
VIN string `json:"vin"`
|
|
LookupKey string `json:"lookupKey"`
|
|
LookupResolved bool `json:"lookupResolved"`
|
|
Resolution *VehicleIdentityResolution `json:"resolution,omitempty"`
|
|
Identity *VehicleRow `json:"identity,omitempty"`
|
|
RealtimeSummary *VehicleRealtimeRow `json:"realtimeSummary,omitempty"`
|
|
ServiceStatus *VehicleServiceStatus `json:"serviceStatus,omitempty"`
|
|
ServiceOverview *VehicleServiceOverview `json:"serviceOverview,omitempty"`
|
|
SourceConsistency *VehicleSourceConsistency `json:"sourceConsistency,omitempty"`
|
|
Sources []string `json:"sources"`
|
|
SourceStatus []VehicleSourceStatus `json:"sourceStatus"`
|
|
Realtime []RealtimeLocationRow `json:"realtime"`
|
|
History Page[HistoryLocationRow] `json:"history"`
|
|
Raw Page[RawFrameRow] `json:"raw"`
|
|
Mileage Page[DailyMileageRow] `json:"mileage"`
|
|
Quality Page[QualityIssueRow] `json:"quality"`
|
|
}
|
|
|
|
type VehicleSourceConsistency struct {
|
|
SourceCount int `json:"sourceCount"`
|
|
OnlineSourceCount int `json:"onlineSourceCount"`
|
|
LocatedSourceCount int `json:"locatedSourceCount"`
|
|
MissingProtocols []string `json:"missingProtocols"`
|
|
MileageDeltaKm float64 `json:"mileageDeltaKm"`
|
|
SourceTimeDeltaSeconds float64 `json:"sourceTimeDeltaSeconds"`
|
|
Scope string `json:"scope"`
|
|
Status string `json:"status"`
|
|
Severity string `json:"severity"`
|
|
Title string `json:"title"`
|
|
Detail string `json:"detail"`
|
|
}
|
|
|
|
type VehicleServiceOverview struct {
|
|
VIN string `json:"vin"`
|
|
Plate string `json:"plate"`
|
|
Phone string `json:"phone"`
|
|
OEM string `json:"oem"`
|
|
Protocols []string `json:"protocols"`
|
|
PrimaryProtocol string `json:"primaryProtocol"`
|
|
CoverageStatus string `json:"coverageStatus"`
|
|
SourceCount int `json:"sourceCount"`
|
|
OnlineSourceCount int `json:"onlineSourceCount"`
|
|
LastSeen string `json:"lastSeen"`
|
|
RealtimeCount int `json:"realtimeCount"`
|
|
HistoryCount int `json:"historyCount"`
|
|
RawCount int `json:"rawCount"`
|
|
MileageCount int `json:"mileageCount"`
|
|
QualityIssueCount int `json:"qualityIssueCount"`
|
|
ServiceStatus *VehicleServiceStatus `json:"serviceStatus,omitempty"`
|
|
SourceConsistency *VehicleSourceConsistency `json:"sourceConsistency,omitempty"`
|
|
}
|
|
|
|
type VehicleServiceSummary struct {
|
|
TotalVehicles int `json:"totalVehicles"`
|
|
BoundVehicles int `json:"boundVehicles"`
|
|
OnlineVehicles int `json:"onlineVehicles"`
|
|
SingleSourceVehicles int `json:"singleSourceVehicles"`
|
|
MultiSourceVehicles int `json:"multiSourceVehicles"`
|
|
NoDataVehicles int `json:"noDataVehicles"`
|
|
IdentityRequiredVehicles int `json:"identityRequiredVehicles"`
|
|
ArchiveIncompleteVehicles int `json:"archiveIncompleteVehicles"`
|
|
ServiceStatuses []ServiceStatusStat `json:"serviceStatuses"`
|
|
Protocols []ProtocolStat `json:"protocols"`
|
|
MissingSources []MissingSourceStat `json:"missingSources"`
|
|
ArchiveMissingFields []ArchiveMissingFieldStat `json:"archiveMissingFields"`
|
|
}
|
|
|
|
type VehicleServiceStatus struct {
|
|
Status string `json:"status"`
|
|
Severity string `json:"severity"`
|
|
Title string `json:"title"`
|
|
Detail string `json:"detail"`
|
|
SourceCount int `json:"sourceCount"`
|
|
OnlineSourceCount int `json:"onlineSourceCount"`
|
|
}
|
|
|
|
type MissingSourceStat struct {
|
|
Protocol string `json:"protocol"`
|
|
Count int `json:"count"`
|
|
}
|
|
|
|
type ArchiveMissingFieldStat struct {
|
|
Field string `json:"field"`
|
|
Title string `json:"title"`
|
|
Count int `json:"count"`
|
|
}
|
|
|
|
type VehicleSourceStatus struct {
|
|
Protocol string `json:"protocol"`
|
|
Online bool `json:"online"`
|
|
LastSeen string `json:"lastSeen"`
|
|
HasRealtime bool `json:"hasRealtime"`
|
|
HasHistory bool `json:"hasHistory"`
|
|
HasRaw bool `json:"hasRaw"`
|
|
HasMileage bool `json:"hasMileage"`
|
|
}
|
|
|
|
type RealtimeLocationRow struct {
|
|
VIN string `json:"vin"`
|
|
Plate string `json:"plate"`
|
|
Protocol string `json:"protocol"`
|
|
Longitude float64 `json:"longitude"`
|
|
Latitude float64 `json:"latitude"`
|
|
SpeedKmh float64 `json:"speedKmh"`
|
|
SOCPercent float64 `json:"socPercent"`
|
|
TotalMileageKm float64 `json:"totalMileageKm"`
|
|
LastSeen string `json:"lastSeen"`
|
|
}
|
|
|
|
type VehicleRealtimeRow struct {
|
|
VIN string `json:"vin"`
|
|
Plate string `json:"plate"`
|
|
Phone string `json:"phone"`
|
|
OEM string `json:"oem"`
|
|
Protocols []string `json:"protocols"`
|
|
SourceStatus []VehicleSourceStatus `json:"sourceStatus"`
|
|
SourceCount int `json:"sourceCount"`
|
|
OnlineSourceCount int `json:"onlineSourceCount"`
|
|
Online bool `json:"online"`
|
|
BindingStatus string `json:"bindingStatus"`
|
|
ServiceStatus *VehicleServiceStatus `json:"serviceStatus,omitempty"`
|
|
PrimaryProtocol string `json:"primaryProtocol"`
|
|
Longitude float64 `json:"longitude"`
|
|
Latitude float64 `json:"latitude"`
|
|
SpeedKmh float64 `json:"speedKmh"`
|
|
SOCPercent float64 `json:"socPercent"`
|
|
TotalMileageKm float64 `json:"totalMileageKm"`
|
|
LastSeen string `json:"lastSeen"`
|
|
}
|
|
|
|
type HistoryLocationRow struct {
|
|
VIN string `json:"vin"`
|
|
Plate string `json:"plate"`
|
|
Protocol string `json:"protocol"`
|
|
Longitude float64 `json:"longitude"`
|
|
Latitude float64 `json:"latitude"`
|
|
SpeedKmh float64 `json:"speedKmh"`
|
|
TotalMileageKm float64 `json:"totalMileageKm"`
|
|
DeviceTime string `json:"deviceTime"`
|
|
ServerTime string `json:"serverTime"`
|
|
}
|
|
|
|
type RawFrameRow struct {
|
|
ID string `json:"id"`
|
|
VIN string `json:"vin"`
|
|
Plate string `json:"plate"`
|
|
Protocol string `json:"protocol"`
|
|
FrameType string `json:"frameType"`
|
|
DeviceTime string `json:"deviceTime"`
|
|
ServerTime string `json:"serverTime"`
|
|
RawSizeBytes int `json:"rawSizeBytes"`
|
|
ParsedFields map[string]any `json:"parsedFields"`
|
|
}
|
|
|
|
type DailyMileageRow struct {
|
|
VIN string `json:"vin"`
|
|
Plate string `json:"plate"`
|
|
Date string `json:"date"`
|
|
StartMileageKm float64 `json:"startMileageKm"`
|
|
EndMileageKm float64 `json:"endMileageKm"`
|
|
DailyMileageKm float64 `json:"dailyMileageKm"`
|
|
Source string `json:"source"`
|
|
AnomalySeverity string `json:"anomalySeverity,omitempty"`
|
|
}
|
|
|
|
type MileageSummary struct {
|
|
VehicleCount int `json:"vehicleCount"`
|
|
RecordCount int `json:"recordCount"`
|
|
SourceCount int `json:"sourceCount"`
|
|
TotalMileageKm float64 `json:"totalMileageKm"`
|
|
AverageMileagePerVIN float64 `json:"averageMileagePerVin"`
|
|
}
|
|
|
|
type OnlineStatisticsSummary struct {
|
|
VehicleCount int `json:"vehicleCount"`
|
|
OnlineVehicleCount int `json:"onlineVehicleCount"`
|
|
OfflineVehicleCount int `json:"offlineVehicleCount"`
|
|
OnlineRatePercent float64 `json:"onlineRatePercent"`
|
|
RedisOnlineKeys *int `json:"redisOnlineKeys"`
|
|
ProtocolStats []ProtocolStat `json:"protocolStats"`
|
|
Evidence string `json:"evidence"`
|
|
}
|
|
|
|
type QualityIssueRow struct {
|
|
VIN string `json:"vin"`
|
|
Plate string `json:"plate"`
|
|
Phone string `json:"phone"`
|
|
SourceEndpoint string `json:"sourceEndpoint"`
|
|
Protocol string `json:"protocol"`
|
|
IssueType string `json:"issueType"`
|
|
Severity string `json:"severity"`
|
|
LastSeen string `json:"lastSeen"`
|
|
Detail string `json:"detail"`
|
|
}
|
|
|
|
type QualitySummary struct {
|
|
IssueVehicleCount int `json:"issueVehicleCount"`
|
|
IssueRecordCount int `json:"issueRecordCount"`
|
|
ErrorCount int `json:"errorCount"`
|
|
WarningCount int `json:"warningCount"`
|
|
Protocols []QualityBucketStat `json:"protocols"`
|
|
IssueTypes []QualityBucketStat `json:"issueTypes"`
|
|
}
|
|
|
|
type QualityBucketStat struct {
|
|
Name string `json:"name"`
|
|
Count int `json:"count"`
|
|
}
|
|
|
|
type QualityNotificationPlan struct {
|
|
Summary QualitySummary `json:"summary"`
|
|
Rules []QualityAlertRule `json:"rules"`
|
|
Policies []QualityNotificationPolicy `json:"policies"`
|
|
PriorityIssues []QualityPriorityIssue `json:"priorityIssues"`
|
|
ActiveRuleCount int `json:"activeRuleCount"`
|
|
P0RuleCount int `json:"p0RuleCount"`
|
|
}
|
|
|
|
type QualityAlertRule struct {
|
|
IssueType string `json:"issueType"`
|
|
Title string `json:"title"`
|
|
Level string `json:"level"`
|
|
Owner string `json:"owner"`
|
|
Trigger string `json:"trigger"`
|
|
Notify string `json:"notify"`
|
|
SLA string `json:"sla"`
|
|
Count int `json:"count"`
|
|
}
|
|
|
|
type QualityNotificationPolicy struct {
|
|
Name string `json:"name"`
|
|
Target string `json:"target"`
|
|
Channel string `json:"channel"`
|
|
Condition string `json:"condition"`
|
|
EscalationMinutes int `json:"escalationMinutes"`
|
|
AcceptanceCriteria string `json:"acceptanceCriteria"`
|
|
}
|
|
|
|
type QualityPriorityIssue struct {
|
|
QualityIssueRow
|
|
Priority string `json:"priority"`
|
|
ActionLabel string `json:"actionLabel"`
|
|
ActionDetail string `json:"actionDetail"`
|
|
SLA string `json:"sla"`
|
|
VehicleLabel string `json:"vehicleLabel"`
|
|
RealtimeHash string `json:"realtimeHash"`
|
|
HistoryHash string `json:"historyHash"`
|
|
RawHash string `json:"rawHash"`
|
|
VehicleHash string `json:"vehicleHash"`
|
|
NotificationText string `json:"notificationText"`
|
|
}
|
|
|
|
type OpsHealth struct {
|
|
LinkHealth []LinkHealth `json:"linkHealth"`
|
|
KafkaLag *int `json:"kafkaLag"`
|
|
ActiveConnections *int `json:"activeConnections"`
|
|
CapacityFindings []string `json:"capacityFindings"`
|
|
RedisOnlineKeys *int `json:"redisOnlineKeys"`
|
|
TDengineWritable bool `json:"tdengineWritable"`
|
|
MySQLWritable bool `json:"mysqlWritable"`
|
|
Runtime RuntimeInfo `json:"runtime"`
|
|
}
|
|
|
|
type RuntimeInfo struct {
|
|
RequestTimeoutMs int `json:"requestTimeoutMs"`
|
|
AMapWebJSConfigured bool `json:"amapWebJsConfigured"`
|
|
AMapSecurityProxyEnabled bool `json:"amapSecurityProxyEnabled"`
|
|
AMapSecurityCodeExposed bool `json:"amapSecurityCodeExposed"`
|
|
AMapSecurityServiceHost string `json:"amapSecurityServiceHost"`
|
|
PlatformRelease string `json:"platformRelease"`
|
|
}
|