Files
weatherfeeder/internal/model/forecast.go
Eric Rakestraw e10ba804ca model: add explicit JSON tags and document canonical payload contract
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.
2026-01-15 22:39:37 -06:00

16 lines
601 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 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: Youll likely want ForecastEnd too.
// TODO: Add meteorological fields you care about.
}