Add SPC outlook normalization
This commit is contained in:
42
model/outlook.go
Normal file
42
model/outlook.go
Normal file
@@ -0,0 +1,42 @@
|
||||
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"`
|
||||
}
|
||||
|
||||
// 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"`
|
||||
Headline string `json:"headline,omitempty"`
|
||||
Summary string `json:"summary,omitempty"`
|
||||
Discussion string `json:"discussion,omitempty"`
|
||||
SourceURL string `json:"sourceUrl,omitempty"`
|
||||
ImageURL string `json:"imageUrl,omitempty"`
|
||||
ContainsLocation bool `json:"containsLocation"`
|
||||
Geometry json.RawMessage `json:"geometry"`
|
||||
}
|
||||
Reference in New Issue
Block a user