Add lowerCamelCase JSON tags to canonical model types (observation, forecast, alert) to stabilize the emitted wire format and make payload structure explicit for downstream sinks. Introduce internal/model/doc.go to document these structs as versioned, schema-governed payloads and clarify compatibility expectations (additive changes preferred; breaking changes require schema bumps). No functional behavior changes; this formalizes the canonical output contract ahead of additional sinks and consumers.
25 lines
708 B
Go
25 lines
708 B
Go
// FILE: internal/model/alert.go
|
|
package model
|
|
|
|
import "time"
|
|
|
|
// Placeholder for NWS alerts (GeoJSON feature properties are rich).
|
|
type WeatherAlert struct {
|
|
ID string `json:"id"`
|
|
|
|
Event string `json:"event,omitempty"`
|
|
Headline string `json:"headline,omitempty"`
|
|
Description string `json:"description,omitempty"`
|
|
Instruction string `json:"instruction,omitempty"`
|
|
|
|
Severity string `json:"severity,omitempty"`
|
|
Urgency string `json:"urgency,omitempty"`
|
|
Certainty string `json:"certainty,omitempty"`
|
|
|
|
Sent *time.Time `json:"sent,omitempty"`
|
|
Effective *time.Time `json:"effective,omitempty"`
|
|
Expires *time.Time `json:"expires,omitempty"`
|
|
|
|
Areas []string `json:"areas,omitempty"`
|
|
}
|