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.
16 lines
601 B
Go
16 lines
601 B
Go
// FILE: internal/model/forecast.go
|
||
package model
|
||
|
||
import "time"
|
||
|
||
// WeatherForecast identity fields (as you described).
|
||
type WeatherForecast struct {
|
||
IssuedBy string `json:"issuedBy,omitempty"` // e.g. "NWS"
|
||
IssuedAt time.Time `json:"issuedAt"` // when forecast product was issued
|
||
ForecastType string `json:"forecastType,omitempty"` // e.g. "hourly", "daily"
|
||
ForecastStart time.Time `json:"forecastStart"` // start of the applicable forecast period
|
||
|
||
// TODO: You’ll likely want ForecastEnd too.
|
||
// TODO: Add meteorological fields you care about.
|
||
}
|