Document convective outlook endpoints
This commit is contained in:
@@ -21,8 +21,8 @@ Inputs:
|
||||
|
||||
Outputs:
|
||||
|
||||
- latest observation, forecast, discussion, weather story, alert, and current
|
||||
conditions read models;
|
||||
- latest observation, forecast, discussion, weather story, alert, convective
|
||||
outlook, and current conditions read models;
|
||||
- nil data with nil error when the latest resource does not exist;
|
||||
- contextual errors for query, scan, iteration, and JSON decode failures.
|
||||
|
||||
@@ -89,6 +89,8 @@ successful responses with `data: null`.
|
||||
- `LatestWeatherStoryRun`: latest row from `weather_story_runs`, then child
|
||||
`weather_stories`.
|
||||
- `LatestWeatherStory`: latest individual row from `weather_stories`.
|
||||
- `LatestConvectiveOutlookRun`: latest row from `outlook_runs`, then child
|
||||
`outlooks`.
|
||||
|
||||
Latest parent rows are selected by descending weather timestamp and
|
||||
`event_emitted_at` where that tie-breaker is available in the query.
|
||||
@@ -102,7 +104,8 @@ Child queries preserve stored order:
|
||||
- alert references by `alert_index`, then `reference_index`;
|
||||
- forecast periods by `period_index`;
|
||||
- discussion key messages by `message_index`;
|
||||
- weather stories by `story_index`.
|
||||
- weather stories by `story_index`;
|
||||
- outlooks by `outlook_index`.
|
||||
|
||||
Alert references are attached after both alert and reference rows are loaded.
|
||||
References are grouped by alert index and attached to their corresponding alert.
|
||||
@@ -126,6 +129,10 @@ Observation present-weather rows store raw JSON text. Empty or null text maps
|
||||
to an empty present-weather value. Invalid JSON returns a contextual decode
|
||||
error with the weather index.
|
||||
|
||||
Outlook rows store `geometry_json` as compact GeoJSON text. The repository
|
||||
validates and copies the JSON bytes into `json.RawMessage` without parsing or
|
||||
reserializing the geometry.
|
||||
|
||||
## Failure Behavior
|
||||
|
||||
Repository methods wrap failures with operation context, for example:
|
||||
|
||||
Reference in New Issue
Block a user