2026-03-27 16:07:12 -05:00
|
|
|
// FILE: internal/sources/nws/forecast_narrative.go
|
|
|
|
|
package nws
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"gitea.maximumdirect.net/ejr/feedkit/config"
|
|
|
|
|
"gitea.maximumdirect.net/ejr/weatherfeeder/standards"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// NarrativeForecastSource polls an NWS narrative forecast endpoint and emits a RAW forecast Event.
|
|
|
|
|
//
|
|
|
|
|
// It intentionally emits the *entire* upstream payload as json.RawMessage and only decodes
|
|
|
|
|
// minimal metadata for Event.EffectiveAt and Event.ID.
|
|
|
|
|
//
|
|
|
|
|
// Output schema:
|
|
|
|
|
// - standards.SchemaRawNWSNarrativeForecastV1
|
|
|
|
|
type NarrativeForecastSource struct {
|
2026-03-28 12:01:07 -05:00
|
|
|
*forecastSource
|
2026-03-27 16:07:12 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewNarrativeForecastSource(cfg config.SourceConfig) (*NarrativeForecastSource, error) {
|
2026-06-11 02:08:36 +00:00
|
|
|
src, err := newForecastSource(cfg, DriverForecastNarrative, standards.SchemaRawNWSNarrativeForecastV1)
|
2026-03-27 16:07:12 -05:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-28 12:01:07 -05:00
|
|
|
return &NarrativeForecastSource{forecastSource: src}, nil
|
2026-03-27 16:07:12 -05:00
|
|
|
}
|