- Introduce AlertsNormalizer to convert Raw NWS Alerts (SchemaRawNWSAlertsV1) into canonical WeatherAlert runs (SchemaWeatherAlertV1) - Add minimal NWS alerts response/types to support GeoJSON FeatureCollection parsing - Map NWS alert properties (event, headline, severity, timing, area, references) into model.WeatherAlert with best-effort timestamp handling - Establish clear AsOf / EffectiveAt policy for alert runs to support stable deduplication and snapshot semantics - Register the new alerts normalizer alongside existing NWS observation and forecast normalizers
23 lines
428 B
Go
23 lines
428 B
Go
// FILE: ./internal/normalizers/nws/register.go
|
|
package nws
|
|
|
|
import (
|
|
fknormalize "gitea.maximumdirect.net/ejr/feedkit/normalize"
|
|
)
|
|
|
|
// Register registers NWS normalizers into the provided registry.
|
|
func Register(reg *fknormalize.Registry) {
|
|
if reg == nil {
|
|
return
|
|
}
|
|
|
|
// Observations
|
|
reg.Register(ObservationNormalizer{})
|
|
|
|
// Forecasts
|
|
reg.Register(ForecastNormalizer{})
|
|
|
|
// Alerts
|
|
reg.Register(AlertsNormalizer{})
|
|
}
|