50 lines
2.1 KiB
Go
50 lines
2.1 KiB
Go
package model
|
|
|
|
import (
|
|
"encoding/json"
|
|
"time"
|
|
)
|
|
|
|
// WeatherOutlookRun is a snapshot of convective outlook polygons for a
|
|
// configured location as-of a provider issue time.
|
|
type WeatherOutlookRun struct {
|
|
LocationID string `json:"locationId,omitempty"`
|
|
LocationName string `json:"locationName,omitempty"`
|
|
Latitude *float64 `json:"latitude,omitempty"`
|
|
Longitude *float64 `json:"longitude,omitempty"`
|
|
AsOf time.Time `json:"asOf"`
|
|
IssuedAt *time.Time `json:"issuedAt,omitempty"`
|
|
Outlooks []WeatherOutlook `json:"outlooks"`
|
|
Discussions []WeatherOutlookDiscussion `json:"discussions"`
|
|
}
|
|
|
|
// WeatherOutlookDiscussion is run-level SPC outlook prose for one outlook day.
|
|
type WeatherOutlookDiscussion struct {
|
|
Day int `json:"day"`
|
|
Headline string `json:"headline,omitempty"`
|
|
Summary string `json:"summary,omitempty"`
|
|
Discussion string `json:"discussion,omitempty"`
|
|
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
|
|
}
|
|
|
|
// WeatherOutlook is a canonical representation of one outlook polygon.
|
|
type WeatherOutlook struct {
|
|
ID string `json:"id"`
|
|
Provider string `json:"provider"`
|
|
Product string `json:"product"`
|
|
Day int `json:"day"`
|
|
OutlookType string `json:"outlookType"`
|
|
Label string `json:"label"`
|
|
LabelText string `json:"labelText,omitempty"`
|
|
SeverityRank *int `json:"severityRank,omitempty"`
|
|
ValidFrom time.Time `json:"validFrom"`
|
|
ValidTo time.Time `json:"validTo"`
|
|
IssuedAt time.Time `json:"issuedAt"`
|
|
ExpiresAt time.Time `json:"expiresAt"`
|
|
Forecaster string `json:"forecaster,omitempty"`
|
|
SourceURL string `json:"sourceUrl,omitempty"`
|
|
ImageURL string `json:"imageUrl,omitempty"`
|
|
ContainsLocation bool `json:"containsLocation"`
|
|
Geometry json.RawMessage `json:"geometry"`
|
|
}
|