Documentation ¶
Overview ¶
Package trafikinfo provides the necessary primitives to interact with the Trafikinfo API. It contains a query builder that can be used to build up a Request object. You can then xml.Marshal it and pass it on to your favourite HTTP client to retrieve it through a bytes.Buffer.
The data returned by the Trafikinfo API is licensed under Creative Commons CC0: * https://api.trafikinfo.trafikverket.se/DynamicContent/ContentDetails/58e384810bb22118e8041667 * https://creativecommons.org/publicdomain/zero/1.0/.
The API endpoint is available through the Endpoint constant. The only supported endpoint is v2, v1.x is being deprecated by Trafikverket.
The provided structs in the library have a somewhat odd design in that all fields are pointers. This happens because the structs are largely autogenerated from the JSON schema which defines all attributes as optional. This is a consequence of the Include and Exclude primitives which can result in only specific fields being present in the response, or specific fields be excluded.
Index ¶
- Constants
- type APIError
- type Accessibility
- type ActivityType
- type Camera1Dot0
- type CameraType
- type Cause
- type Condition
- type Country
- type County
- type DeviationType
- type Equipment
- type Evaluation
- type Facility
- type FerryAnnouncement1Dot2
- type FerryRoute1Dot2
- type Filter
- func And(f1, f2 Filter, rest ...Filter) Filter
- func ElementMatch(f1, f2 Filter, rest ...Filter) Filter
- func Equal(name, value string) Filter
- func Exists(name string, exists bool) Filter
- func GreaterThan(name, value string) Filter
- func GreaterThanOrEqual(name, value string) Filter
- func In(name, value string) Filter
- func Intersects(name, value string) Filter
- func LessThan(name, value string) Filter
- func LessThanOrEqual(name, value string) Filter
- func Like(name, value string) Filter
- func Near(name, value string, minDistance, maxDistance int) Filter
- func Not(f1, f2 Filter, rest ...Filter) Filter
- func NotEqual(name, value string) Filter
- func NotIn(name, value string) Filter
- func NotLike(name, value string) Filter
- func Or(f1, f2 Filter, rest ...Filter) Filter
- func Within(name, value, shape string, radius float64) Filter
- type Geometry
- type GeometryWithMod
- type Icon1Dot0
- type Info
- type Measurement
- type MeasurementData1001Dot0
- type MeasurementData201Dot0
- type MediaType
- type MessageStatus
- type ObjectType
- type Origin
- type Parking1Dot0
- type Parking1Dot4
- type PavementData1Dot0
- type PrecipitationAmount
- type PrecipitationType
- type PrecipitationTypeMeasure
- type Query
- func (q *Query) ChangeID(opt string) *Query
- func (q *Query) Distinct(field string) *Query
- func (q *Query) Eval(evaluations ...Evaluation) *Query
- func (q *Query) Exclude(fields ...string) *Query
- func (q *Query) Filter(filters ...Filter) *Query
- func (q *Query) ID(opt string) *Query
- func (q *Query) Include(fields ...string) *Query
- func (q *Query) IncludeDeletedObjects(opt bool) *Query
- func (q *Query) LastModified(opt bool) *Query
- func (q *Query) Limit(opt int) *Query
- func (q *Query) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (q *Query) OrderBy(opt string) *Query
- func (q *Query) SSEURL(opt bool) *Query
- func (q *Query) Skip(opt int) *Query
- type RailCrossing1Dot4
- type RailCrossing1Dot5
- type ReasonCode1Dot0
- type Region
- type Request
- type RoadCondition1Dot0
- type RoadCondition1Dot1
- type RoadCondition1Dot2
- type RoadConditionOverview1Dot0
- type RoadData1Dot0
- type RoadGeometry1Dot0
- type Status
- type StopType
- type TrafficFlow1Dot0
- type TrafficFlow1Dot4
- type TrafficSafetyCamera1Dot0
- type TrafficStatus
- type TrainAnnouncement1Dot0
- type TrainAnnouncement1Dot3
- type TrainAnnouncement1Dot4
- type TrainAnnouncement1Dot5
- type TrainAnnouncement1Dot6
- type TrainMessage1Dot0
- type TrainMessage1Dot3
- type TrainMessage1Dot4
- type TrainMessage1Dot5
- type TrainMessage1Dot6
- type TrainMessage1Dot7
- type TrainStation1Dot0
- type TrainStation1Dot4
- type TrainStationMessage1Dot0
- type TravelTimeRoute1Dot0
- type TravelTimeRoute1Dot3
- type TravelTimeRoute1Dot4
- type TravelTimeRoute1Dot5
- type Vehicle
- type Warning
- type WeatherMeasurepoint1Dot0
- type WeatherMeasurepoint2Dot0
- type WeatherObservation1Dot0
- type WeatherObservation2Dot0
- type WeatherStation1Dot0
- type WindDirection
Constants ¶
const Endpoint = "https://api.trafikinfo.trafikverket.se/v2/data.json"
Endpoint is the current recommended endpoint for the Trafikinfo API
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶ added in v0.3.1
type APIError struct { Response struct { Result []struct { Error struct { Message string `json:"MESSAGE"` Source string `json:"SOURCE"` } `json:"ERROR"` } `json:"RESULT"` } `json:"RESPONSE"` }
APIError represents an error response from the API
type Accessibility ¶ added in v0.3.0
type Accessibility string
const ( AccessibilityBarrierFreeAccessible Accessibility = "barrierFreeAccessible" AccessibilityHandicappedAccessible Accessibility = "handicappedAccessible" AccessibilityHandicappedEasements Accessibility = "handicappedEasements" AccessibilityHandicappedMarked Accessibility = "handicappedMarked" AccessibilityOrientationSystemForBlindPeople Accessibility = "orientationSystemForBlindPeople" AccessibilityWheelChairAccessible Accessibility = "wheelChairAccessible" AccessibilityNone Accessibility = "none" AccessibilityUnknown Accessibility = "unknown" AccessibilityOther Accessibility = "other" )
type ActivityType ¶ added in v0.2.0
type ActivityType string
const ( ActivityTypeArrival ActivityType = "Ankomst" ActivityTypeDeparture ActivityType = "Avgang" )
type Camera1Dot0 ¶ added in v0.3.0
type Camera1Dot0 struct { Active *bool `json:"Active,omitempty"` CameraGroup *string `json:"CameraGroup,omitempty"` ContentType *string `json:"ContentType,omitempty"` County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Description *string `json:"Description,omitempty"` Direction *int `json:"Direction,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` HasFullSizePhoto *bool `json:"HasFullSizePhoto,omitempty"` HasSketchImage *bool `json:"HasSketchImage,omitempty"` IconID *string `json:"IconId,omitempty"` ID *string `json:"Id,omitempty"` Location *string `json:"Location,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` Name *string `json:"Name,omitempty"` PhotoTime *time.Time `json:"PhotoTime,omitempty"` PhotoURL *string `json:"PhotoUrl,omitempty"` Status *string `json:"Status,omitempty"` Type *CameraType `json:"Type,omitempty"` }
type CameraType ¶ added in v0.3.0
type CameraType string
const ( CameraTypeSpeed CameraType = "Väglagskamera" CameraTypeFlow CameraType = "Trafikflödeskamera" )
type Country ¶ added in v0.3.0
type Country string
Country represents a country through its country code
type County ¶ added in v0.3.0
type County uint
County is a numerical ID assigned to a county in Sweden
const ( CountyStockholm County = iota + 1 CountyStockholmDeprecated CountyUppsala CountySodermanland CountyOstergotland CountyJonkoping CountyKronobergs CountyKalmar CountyGotland CountyBlekinge CountySkane CountyHallands CountyVastraGotaland CountyVarmland CountyOrebro CountyVastmanland CountyDalarna CountyGavleborg CountyVasternorrland CountyJamtland CountyVasterbotten CountyNorrbotten )
type DeviationType ¶ added in v0.3.0
type DeviationType string
const ( DeviationTypeMessage DeviationType = "Meddelande" DeviationTypeSummon DeviationType = "Kallelse" DeviationTypeGoing DeviationType = "Går" DeviationTypeCancelled DeviationType = "Går ej" )
type Equipment ¶ added in v0.3.0
type Equipment string
const ( EquipmentBikeParking Equipment = "bikeParking" EquipmentCashMachine Equipment = "cashMachine" EquipmentCopyMachineOrService Equipment = "copyMachineOrService" EquipmentDefibrillator Equipment = "defibrillator" EquipmentDumpingStation Equipment = "dumpingStation" EquipmentElectricChargingStation Equipment = "electricChargingStation" EquipmentElevator Equipment = "elevator" EquipmentFaxMachineOrService Equipment = "faxMachineOrService" EquipmentFireExtingiusher Equipment = "fireExtingiusher" EquipmentFireHose Equipment = "fireHose" EquipmentFireHydrant Equipment = "fireHydrant" EquipmentFirstAidEquipment Equipment = "firstAidEquipment" EquipmentFreshWater Equipment = "freshWater" EquipmentIceFreeScaffold Equipment = "iceFreeScaffold" EquipmentInformationPoint Equipment = "informationPoint" EquipmentInformatonStele Equipment = "informatonStele" EquipmentInternetTerminal Equipment = "internetTerminal" EquipmentInternetWireless Equipment = "internetWireless" EquipmentLuggageLocker Equipment = "luggageLocker" EquipmentPayDesk Equipment = "payDesk" EquipmentPaymentMachine Equipment = "paymentMachine" EquipmentPicnicFacilities Equipment = "picnicFacilities" EquipmentPlayground Equipment = "playground" EquipmentPublicCardPhone Equipment = "publicCardPhone" EquipmentPublicCoinPhone Equipment = "publicCoinPhone" EquipmentPublicPhone Equipment = "publicPhone" EquipmentRefuseBin Equipment = "refuseBin" EquipmentSafeDeposit Equipment = "safeDeposit" EquipmentShower Equipment = "shower" EquipmentToilet Equipment = "toilet" EquipmentTollTerminal Equipment = "tollTerminal" EquipmentVendingMachine Equipment = "vendingMachine" EquipmentWasteDisposal Equipment = "wasteDisposal" EquipmentNone Equipment = "none" EquipmentOther Equipment = "other" EquipmentUnknown Equipment = "unknown" )
type Evaluation ¶ added in v0.3.0
type Evaluation struct {
// contains filtered or unexported fields
}
func Eval ¶ added in v0.3.0
func Eval(alias, function string) Evaluation
func (*Evaluation) MarshalXML ¶ added in v0.3.0
func (v *Evaluation) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type Facility ¶ added in v0.3.0
type Facility string
const ( FacilityHotel Facility = "hotel" FacilityMotel Facility = "motel" FacilityOvernightAccommodation Facility = "overnightAccommodation" FacilityShop Facility = "shop" FacilityKiosk Facility = "kiosk" FacilityFoodShopping Facility = "foodShopping" FacilityCafe Facility = "cafe" FacilityRestaurant Facility = "restaurant" FacilityRestaurantSelfService Facility = "restaurantSelfService" FacilityMotorwayRestaurant Facility = "motorwayRestaurant" FacilityMotorwayRestaurantSmall Facility = "motorwayRestaurantSmall" FacilitySparePartsShopping Facility = "sparePartsShopping" FacilityPetrolStation Facility = "petrolStation" FacilityVehicleMaintenance Facility = "vehicleMaintenance" FacilityTyreRepair Facility = "tyreRepair" FacilityTruckRepair Facility = "truckRepair" FacilityTruckWash Facility = "truckWash" FacilityCarWash Facility = "carWash" FacilityPharmacy Facility = "pharmacy" FacilityMedicalFacility Facility = "medicalFacility" FacilityPolice Facility = "police" FacilityTouristInformation Facility = "touristInformation" FacilityBikeSharing Facility = "bikeSharing" FacilityDocstop Facility = "docstop" FacilityLaundry Facility = "laundry" FacilityLeisureActivities Facility = "leisureActivities" FacilityUnknown Facility = "unknown" FacilityOther Facility = "other" )
type FerryAnnouncement1Dot2 ¶ added in v0.3.0
type FerryAnnouncement1Dot2 struct { Deleted *bool `json:"Deleted,omitempty"` DepartureTime *time.Time `json:"DepartureTime,omitempty"` DeviationID *string `json:"DeviationId,omitempty"` FromHarbor *struct { ID *int `json:"Id,omitempty"` Name *string `json:"Name,omitempty"` } `json:"FromHarbor,omitempty"` ID *int `json:"Id,omitempty"` Info []string `json:"Info,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` Route *struct { ID *int `json:"Id,omitempty"` Name *string `json:"Name,omitempty"` Shortname *string `json:"Shortname,omitempty"` Type *struct { ID *int `json:"Id,omitempty"` Name *string `json:"Name,omitempty"` } `json:"Type,omitempty"` } `json:"Route,omitempty"` ToHarbor *struct { ID *int `json:"Id,omitempty"` Name *string `json:"Name,omitempty"` } `json:"ToHarbor,omitempty"` }
type FerryRoute1Dot2 ¶ added in v0.3.0
type FerryRoute1Dot2 struct { Deleted *bool `json:"Deleted,omitempty"` DeviationID *string `json:"DeviationId,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` Harbor []struct { ID *int `json:"Id,omitempty"` Name *string `json:"Name,omitempty"` SortOrder *int `json:"SortOrder,omitempty"` StopType *struct { ID *int `json:"Id,omitempty"` Name *StopType `json:"Name,omitempty"` Visible *bool `json:"Visible,omitempty"` } `json:"StopType,omitempty"` } `json:"Harbor,omitempty"` ID *int `json:"Id,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` Name *string `json:"Name,omitempty"` Shortname *string `json:"Shortname,omitempty"` Timetable []struct { Description *string `json:"Description,omitempty"` Period []struct { Name *string `json:"Name,omitempty"` Schedule []struct { Deviation []struct { Description *string `json:"Description,omitempty"` FromDate *string `json:"FromDate,omitempty"` ID *string `json:"Id,omitempty"` SpecDate *string `json:"SpecDate,omitempty"` ToDate *string `json:"ToDate,omitempty"` Type *struct { ID *string `json:"Id,omitempty"` Name *DeviationType `json:"Name,omitempty"` } `json:"Type,omitempty"` } `json:"Deviation,omitempty"` Harbor *struct { ID *int `json:"Id,omitempty"` Name *string `json:"Name,omitempty"` SortOrder *int `json:"SortOrder,omitempty"` StopType *struct { ID *int `json:"Id,omitempty"` Name *StopType `json:"Name,omitempty"` Visible *bool `json:"Visible,omitempty"` } `json:"StopType,omitempty"` } `json:"Harbor,omitempty"` SortOrder *int `json:"SortOrder,omitempty"` StopType *struct { ID *int `json:"Id,omitempty"` Name *StopType `json:"Name,omitempty"` Visible *bool `json:"Visible,omitempty"` } `json:"StopType,omitempty"` Time *string `json:"Time,omitempty"` } `json:"Schedule,omitempty"` SortOrder *int `json:"SortOrder,omitempty"` Weekday []struct { ID *int `json:"Id,omitempty"` Day *string `json:"Day,omitempty"` } `json:"Weekday,omitempty"` } `json:"Period,omitempty"` Priority *int `json:"Priority,omitempty"` Valid []struct { From *time.Time `json:"From,omitempty"` To *time.Time `json:"To,omitempty"` } `json:"Valid,omitempty"` } `json:"Timetable,omitempty"` Type *struct { ID *int `json:"Id,omitempty"` Name *string `json:"Name,omitempty"` } `json:"Type,omitempty"` }
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
Filter represents a filter element in the query.
func ElementMatch ¶
ElementMatch builds an ELEMENTMATCH filter
func GreaterThan ¶
GreaterThan filters by whether the field specified by name is greater than the specified value
func GreaterThanOrEqual ¶
GreaterThanOrEqual filters by whether the field specified by name is greater than or equal to the specified value
func Intersects ¶
Intersects filters by if te field specified in name intersects with the coordinates provided in value
func LessThan ¶
LessThan filters by whether the field specified by name is less than the specified value
func LessThanOrEqual ¶
LessThanOrEqual filters by whether the field specified by name is less than or equal to the specified value
func Near ¶
Near filters by if the field specified in name is within the specified min/max dinstance from the point coordinates sepcified in value
func Within ¶
Within filters by if the field specified in name falls within the specified shape, radius and the coordinates in value
func (*Filter) MarshalXML ¶
type Geometry ¶ added in v0.2.0
type Geometry struct { // SWEREF99TM, SWEdish REference Frame 1999, Transverse Mercator, // is a projected coordinate system to identify geographical // locations in Sweden SWEREF99TM *string `json:"SWEREF99TM,omitempty"` // WGS84 represents coordinates in the World Geodetic System // 1984 revision. WGS84 *string `json:"WGS84,omitempty"` }
Geometry represents a set of coordinates that result denote a location
type GeometryWithMod ¶ added in v0.3.0
type Info ¶ added in v0.2.0
type Info struct { LastModified *struct { DateTime *time.Time `json:"_attr_datetime,omitempty"` } `json:"LASTMODIFIED,omitempty"` LastChangeID *string `json:"LASTCHANGEID,omitempty"` EvalResult []any `json:"EVALRESULT,omitempty"` SSEURL *string `json:"SSEURL,omitempty"` }
Info is part of the response API when a query is created with either an EVAL or the use of a Change ID
type Measurement ¶ added in v0.3.0
type Measurement string
const ( MeasurementPreventiveAntiSlip Measurement = "Förebyggande halkbekämpning" MeasurementAntiSlip Measurement = "Halkbekämpning" MeasurementIcePlowing Measurement = "Ishyvling" MeasurementSnowPlowing Measurement = "Plogning" MeasurementSanding Measurement = "Sandning" MeasurementOther Measurement = "Annat" )
type MeasurementData1001Dot0 ¶ added in v0.3.0
type MeasurementData1001Dot0 struct { County *County `json:"County,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Direction *struct { Code *int `json:"Code,omitempty"` Value *string `json:"Value,omitempty"` } `json:"Direction,omitempty"` EdgeDepthAverageValue *float64 `json:"EdgeDepthAverageValue,omitempty"` EndContinuousLength *int `json:"EndContinuousLength,omitempty"` IRIRightAverageValue *float64 `json:"IRIRightAverageValue,omitempty"` Lane *int `json:"Lane,omitempty"` Length *int `json:"Length,omitempty"` MPDMacrotextureAverageValue *float64 `json:"MPDMacrotextureAverageValue,omitempty"` MeasurementDataType *struct { Code *int `json:"Code,omitempty"` Value *string `json:"Value,omitempty"` } `json:"MeasurementDataType,omitempty"` MeasurementDate *string `json:"MeasurementDate,omitempty"` MeasurementDateSpecific *string `json:"MeasurementDateSpecific,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` RoadMainNumber *int `json:"RoadMainNumber,omitempty"` RoadSubNumber *int `json:"RoadSubNumber,omitempty"` RutDepthMax15AverageValue *float64 `json:"RutDepthMax15AverageValue,omitempty"` RutDepthMax17AverageValue *float64 `json:"RutDepthMax17AverageValue,omitempty"` StartContinuousLength *int `json:"StartContinuousLength,omitempty"` Timestamp *time.Time `json:"TimeStamp,omitempty"` }
type MeasurementData201Dot0 ¶ added in v0.3.0
type MeasurementData201Dot0 struct { County *County `json:"County,omitempty"` CrossfallRutBottom *float64 `json:"CrossfallRutBottom,omitempty"` Curvature *float64 `json:"Curvature,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Direction *struct { Code *int `json:"Code,omitempty"` Value *string `json:"Value,omitempty"` } `json:"Direction,omitempty"` EdgeDepth *float64 `json:"EdgeDepth,omitempty"` EndContinuousLength *int `json:"EndContinuousLength,omitempty"` Hilliness *float64 `json:"Hilliness,omitempty"` IRILeft *float64 `json:"IRILeft,omitempty"` IRIRight *float64 `json:"IRIRight,omitempty"` Lane *int `json:"Lane,omitempty"` Length *int `json:"Length,omitempty"` MPDMacrotextureLeft *float64 `json:"MPDMacrotextureLeft,omitempty"` MPDMacrotextureMiddle *float64 `json:"MPDMacrotextureMiddle,omitempty"` MPDMacrotextureRight *float64 `json:"MPDMacrotextureRight,omitempty"` MeasurementDataType *struct { Code *int `json:"Code,omitempty"` Value *string `json:"Value,omitempty"` } `json:"MeasurementDataType,omitempty"` MeasurementDate *string `json:"MeasurementDate,omitempty"` MeasurementDateSpecific *string `json:"MeasurementDateSpecific,omitempty"` MeasurementVehicleSpeed *float64 `json:"MeasurementVehicleSpeed,omitempty"` MegatextureLeft *float64 `json:"MegatextureLeft,omitempty"` MegatextureRight *float64 `json:"MegatextureRight,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` RoadMainNumber *int `json:"RoadMainNumber,omitempty"` RoadSubNumber *int `json:"RoadSubNumber,omitempty"` RutArea *float64 `json:"RutArea,omitempty"` RutBottomDistance *float64 `json:"RutBottomDistance,omitempty"` RutDepthLeft17 *float64 `json:"RutDepthLeft17,omitempty"` RutDepthMax15 *float64 `json:"RutDepthMax15,omitempty"` RutDepthMax17 *float64 `json:"RutDepthMax17,omitempty"` RutDepthRight15 *float64 `json:"RutDepthRight15,omitempty"` RutDepthRight17 *float64 `json:"RutDepthRight17,omitempty"` RutWidthLeft *float64 `json:"RutWidthLeft,omitempty"` RutWidthRight *float64 `json:"RutWidthRight,omitempty"` StartContinuousLength *int `json:"StartContinuousLength,omitempty"` Timestamp *time.Time `json:"TimeStamp,omitempty"` WaterArea *float64 `json:"WaterArea,omitempty"` }
type MessageStatus ¶ added in v0.2.0
type MessageStatus string
const ( MessageStatusLow MessageStatus = "Lag" MessageStatusNormal MessageStatus = "Normal" MessageStatusHigh MessageStatus = "Hog" MessageStatusDisruption MessageStatus = "StortLage" )
type ObjectType ¶
type ObjectType string
ObjectType is a type of object you can retrieve from the API
const ( RailCrossing ObjectType = "RailCrossing" ReasonCode ObjectType = "ReasonCode" TrainAnnouncement ObjectType = "TrainAnnouncement" TrainMessage ObjectType = "TrainMessage" TrainStation ObjectType = "TrainStation" TrainStationMessage ObjectType = "TrainStationMessage" TrainPosition ObjectType = "TrainPosition" Camera ObjectType = "Camera" FerryAnnouncement ObjectType = "FerryAnnouncement" FerryRoute ObjectType = "FerryRoute" Icon ObjectType = "Icon" Parking ObjectType = "Parking" RoadCondition ObjectType = "RoadCondition" RoadConditionOverview ObjectType = "RoadConditionOverview" Situation ObjectType = "Situation" TrafficFlow ObjectType = "TrafficFlow" TrafficSafetyCamera ObjectType = "TrafficSafetyCamera" TravelTimeRoute ObjectType = "TravelTimeRoute" WeatherMeasurePoint ObjectType = "WeatherMeasurePoint" WeatherObservation ObjectType = "WeatherObservation" WeatherStation ObjectType = "WeatherStation" MeasurementData100 ObjectType = "MeasurementData100" MeasurementData20 ObjectType = "MeasurementData20" PavementData ObjectType = "PavementData" RoadData ObjectType = "RoadData" RoadGeometry ObjectType = "RoadGeometry" )
type Parking1Dot0 ¶ added in v0.3.0
type Parking1Dot0 struct { County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Description *string `json:"Description,omitempty"` DistanceToNearestCity *string `json:"DistanceToNearestCity,omitempty"` Equipment []struct { Accessibility *Accessibility `json:"Accessibility,omitempty"` Type *Equipment `json:"Type,omitempty"` } `json:"Equipment,omitempty"` Facility []struct { Accessibility *Accessibility `json:"Accessibility,omitempty"` Type *Facility `json:"Type,omitempty"` } `json:"Facility,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` IconID *string `json:"IconId,omitempty"` ID *string `json:"Id,omitempty"` LocationDescription *string `json:"LocationDescription,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` Name *string `json:"Name,omitempty"` OpenStatus *string `json:"OpenStatus,omitempty"` OperationStatus *string `json:"OperationStatus,omitempty"` Operator *struct { Contact *string `json:"Contact,omitempty"` ContactEmail *string `json:"ContactEmail,omitempty"` ContactTelephoneNumber *string `json:"ContactTelephoneNumber,omitempty"` Name *string `json:"Name,omitempty"` } `json:"Operator,omitempty"` ParkingAccess []Geometry `json:"ParkingAccess,omitempty"` Photo []struct { Title *string `json:"Title,omitempty"` URL *string `json:"Url,omitempty"` } `json:"Photo,omitempty"` TariffsAndPayment *struct { FreeOfCharge *bool `json:"FreeOfCharge,omitempty"` Tariff *string `json:"Tariff,omitempty"` } `json:"TariffsAndPayment,omitempty"` UsageSenario []string `json:"UsageSenario,omitempty"` VehicleCharacteristics []struct { LoadType *string `json:"LoadType,omitempty"` NumberOfSpaces *int `json:"NumberOfSpaces,omitempty"` VehicleType *Vehicle `json:"VeichleType,omitempty"` } `json:"VehicleCharacteristics,omitempty"` }
type Parking1Dot4 ¶ added in v0.3.0
type Parking1Dot4 struct { County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Description *string `json:"Description,omitempty"` DistanceToNearestCity *string `json:"DistanceToNearestCity,omitempty"` Equipment []struct { Accessibility *Accessibility `json:"Accessibility,omitempty"` Type *Equipment `json:"Type,omitempty"` } `json:"Equipment,omitempty"` Facility []struct { Accessibility *Accessibility `json:"Accessibility,omitempty"` Type *Facility `json:"Type,omitempty"` } `json:"Facility,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` IconID *string `json:"IconId,omitempty"` ID *string `json:"Id,omitempty"` LocationDescription *string `json:"LocationDescription,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` Name *string `json:"Name,omitempty"` OpenStatus *string `json:"OpenStatus,omitempty"` OperationStatus *string `json:"OperationStatus,omitempty"` Operator *struct { Contact *string `json:"Contact,omitempty"` ContactEmail *string `json:"ContactEmail,omitempty"` ContactTelephoneNumber *string `json:"ContactTelephoneNumber,omitempty"` Name *string `json:"Name,omitempty"` } `json:"Operator,omitempty"` ParkingAccess []Geometry `json:"ParkingAccess,omitempty"` Photo []struct { Title *string `json:"Title,omitempty"` URL *string `json:"Url,omitempty"` } `json:"Photo,omitempty"` TariffsAndPayment *struct { FreeOfCharge *bool `json:"FreeOfCharge,omitempty"` Tariff *string `json:"Tariff,omitempty"` } `json:"TariffsAndPayment,omitempty"` UsageSenario []string `json:"UsageSenario,omitempty"` VehicleCharacteristics []struct { LoadType *string `json:"LoadType,omitempty"` NumberOfSpaces *int `json:"NumberOfSpaces,omitempty"` VehicleType *Vehicle `json:"VehicleType,omitempty"` } `json:"VehicleCharacteristics,omitempty"` }
type PavementData1Dot0 ¶ added in v0.3.0
type PavementData1Dot0 struct { BallMillValue *float64 `json:"BallMillValue,omitempty"` Binder *string `json:"Binder,omitempty"` Contractor *string `json:"Contractor,omitempty"` County *County `json:"County,omitempty"` Coverage *string `json:"Coverage,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Direction *struct { Code *int `json:"Code,omitempty"` Value *string `json:"Value,omitempty"` } `json:"Direction,omitempty"` EndContinuousLength *int `json:"EndContinuousLength,omitempty"` FinalInspectionDate *time.Time `json:"FinalInspectionDate,omitempty"` Lane *int `json:"Lane,omitempty"` Length *int `json:"Length,omitempty"` ManufacturingMethod *string `json:"ManufacturingMethod,omitempty"` MaxStoneSize *int `json:"MaxStoneSize,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` PavementDate *time.Time `json:"PavementDate,omitempty"` PavementType *string `json:"PavementType,omitempty"` PavingMethod *string `json:"PavingMethod,omitempty"` RoadMainNumber *int `json:"RoadMainNumber,omitempty"` RoadSubNumber *int `json:"RoadSubNumber,omitempty"` StartContinuousLength *int `json:"StartContinuousLength,omitempty"` Thickness *float64 `json:"Thickness,omitempty"` Timestamp *time.Time `json:"TimeStamp,omitempty"` TreatmentCategory *string `json:"TreatmentCategory,omitempty"` Warranty *int `json:"Warranty,omitempty"` WarrantyIsDue *time.Time `json:"WarrantyIsDue,omitempty"` }
type PrecipitationAmount ¶ added in v0.3.0
type PrecipitationAmount string
const ( PrecipitationDataMissing PrecipitationAmount = "Givare saknas/Fel på givare" PrecipitationLightRain PrecipitationAmount = "Lätt regn" PrecipitationMildRain PrecipitationAmount = "Måttligt regn" PrecipitationHeavyRain PrecipitationAmount = "Kraftigt regn" PrecipitationLightSleet PrecipitationAmount = "Lätt snöblandat regn" PrecipitationMildSleet PrecipitationAmount = "Måttligt snöblandat regn" PrecipitationHeavySleet PrecipitationAmount = "Kraftigt snöblandat regn" PrecipitationLightSnow PrecipitationAmount = "Lätt snöfall" PrecipitationMildSnow PrecipitationAmount = "Måttligt snöfall" PrecipitationHeavySnow PrecipitationAmount = "Kraftigt snöfall" PrecipitationOther PrecipitationAmount = "Annan nederbördstyp" PrecipitationUnknown PrecipitationAmount = "Okänd nederbördstyp" PrecipitationNone PrecipitationAmount = "Ingen nederbörd" )
type PrecipitationType ¶ added in v0.2.0
type PrecipitationType string
const ( PrecipitationTypeDrizzle PrecipitationType = "Duggregn" PrecipitationTypeHail PrecipitationType = "Hagel" PrecipitationTypeRain PrecipitationType = "Regn" PrecipitationTypeSnow PrecipitationType = "Snö" PrecipitationTypeSleet PrecipitationType = "Snöblandat regn" PrecipitationTypeFreezingRain PrecipitationType = "Underkylt regn" PrecipitationTypeNone PrecipitationType = "Ingen nederbörd" )
type PrecipitationTypeMeasure ¶ added in v0.4.0
type PrecipitationTypeMeasure string
const ( PrecipitationTypeMeasureYes PrecipitationTypeMeasure = "yes" PrecipitationTypeMeasureNo PrecipitationTypeMeasure = "no" PrecipitationTypeMeasureRain PrecipitationTypeMeasure = "rain" PrecipitationTypeMeasureFreezingRain PrecipitationTypeMeasure = "freezing_rain" PrecipitationTypeMeasureSnow PrecipitationTypeMeasure = "snow" PrecipitationTypeMeasureSleet PrecipitationTypeMeasure = "sleet" )
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
Query is used to request information from the Trafikinfo API
func NewQuery ¶
func NewQuery(objectType ObjectType, schemaVersion float64) *Query
NewQuery returns a query that other methods can be chained on to further customise the request.
func (*Query) ChangeID ¶ added in v0.1.1
ChangeID sets the change ID for the request. This should initially be 0 to request all data, and then be set to the value of the change ID in the response to only get updated/deleted objects since the previous change ID.
func (*Query) Eval ¶ added in v0.3.0
func (q *Query) Eval(evaluations ...Evaluation) *Query
func (*Query) ID ¶ added in v0.1.1
ID is an arbitrary value which will be echoed in the response. It can be used to associate queries with responses, especially when a request includes multiple queries.
func (*Query) IncludeDeletedObjects ¶ added in v0.1.1
IncludeDeletedObjects requests that deleted objects also be returned. This defaults to false.
func (*Query) LastModified ¶ added in v0.1.1
LastModified results in a lastmodified timestamp being included in the response.
func (*Query) Limit ¶ added in v0.1.1
Limit sets the limit for the amount of items to be returned. This can be used together with Skip to implement pagination. A Limit of 0 means no limit at all, i.e return everything.
func (*Query) MarshalXML ¶
type RailCrossing1Dot4 ¶ added in v0.2.0
type RailCrossing1Dot4 struct { DataLastUpdated *time.Time `json:"DataLastUpdated,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` Kilometer *int `json:"Kilometer,omitempty"` LevelCrossingID *int `json:"LevelCrossingId,omitempty"` Meter *int `json:"Meter,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` NumberOfTracks *int `json:"NumberOfTracks,omitempty"` ObjectID *int `json:"ObjectId,omitempty"` OperatingMode *string `json:"OperatingMode,omitempty"` PortalHeightLeft *float64 `json:"PortalHeightLeft,omitempty"` PortalHeightRight *float64 `json:"PortalHeightRight,omitempty"` RailwayRouteID *string `json:"RailwayRouteId,omitempty"` RoadNameAlternative *string `json:"RoadNameAlternative,omitempty"` RoadNameOfficial *string `json:"RoadNameOfficial,omitempty"` RoadProfileCrest *int `json:"RoadProfileCrest,omitempty"` RoadProfileCrossCurve *int `json:"RoadProfileCrossCurve,omitempty"` RoadProfileSteepSlope *int `json:"RoadProfileSteepSlope,omitempty"` RoadProtectionAddition []struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"RoadProtectionAddition,omitempty"` RoadProtectionBase []struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"RoadProtectionBase,omitempty"` RoadRouteID *string `json:"RoadRouteId,omitempty"` TrackPortion *int `json:"TrackPortion,omitempty"` TrainFlow *int `json:"TrainFlow,omitempty"` }
type RailCrossing1Dot5 ¶ added in v0.2.0
type RailCrossing1Dot5 struct { DataLastUpdated *time.Time `json:"DataLastUpdated,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` Kilometer *int `json:"Kilometer,omitempty"` LevelCrossingID *int `json:"LevelCrossingId,omitempty"` Meter *int `json:"Meter,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` NumberOfTracks *int `json:"NumberOfTracks,omitempty"` OperatingMode *string `json:"OperatingMode,omitempty"` PortalHeightLeft *float64 `json:"PortalHeightLeft,omitempty"` PortalHeightRight *float64 `json:"PortalHeightRight,omitempty"` RailwayRouteID *string `json:"RailwayRouteId,omitempty"` RoadNameAlternative *string `json:"RoadNameAlternative,omitempty"` RoadNameOfficial *string `json:"RoadNameOfficial,omitempty"` RoadProfileCrest *int `json:"RoadProfileCrest,omitempty"` RoadProfileCrossCurve *int `json:"RoadProfileCrossCurve,omitempty"` RoadProfileSteepSlope *int `json:"RoadProfileSteepSlope,omitempty"` RoadProtectionAddition []struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"RoadProtectionAddition,omitempty"` RoadProtectionBase []struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"RoadProtectionBase,omitempty"` RoadRouteID *string `json:"RoadRouteId,omitempty"` TrackPortion *int `json:"TrackPortion,omitempty"` TrainFlow *int `json:"TrainFlow,omitempty"` }
type ReasonCode1Dot0 ¶ added in v0.2.0
type ReasonCode1Dot0 struct { Code *string `json:"Code,omitempty"` Deleted *bool `json:"Deleted,omitempty"` GroupDescription *string `json:"GroupDescription,omitempty"` Level1Description *string `json:"Level1Description,omitempty"` Level2Description *string `json:"Level2Description,omitempty"` Level3Description *string `json:"Level3Description,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` }
ReasonCode1Dot0 represents a reason for a train related issue.
The "Code" and "Level3Description" fields correspond to the "Code" and "Description" fields for the TrainAnnouncement and TrainMessage object types.
type Request ¶
type Request struct { XMLName string `xml:"REQUEST"` Login *login `xml:"LOGIN"` Queries []*Query `xml:"QUERY"` }
Request tells the API what we're interested in
It must include the Login information and at least one Query.
func NewRequest ¶
func NewRequest() *Request
NewRequest returns a Request using the specified API authentication key and the data to be retrieved and filtered by the specified queries. At least 1 query needs to be provided.
func (*Request) Build ¶
Build returns the XML encoded request as an array of bytes. It can be passed as http.NewRequest's body by wrapping it in a call to bytes.NewBuffer().
The Build() method is final when used in a fluent API style, you can't chain additional methods on it that continue to modify the request.
type RoadCondition1Dot0 ¶ added in v0.3.0
type RoadCondition1Dot0 struct { Cause []Cause `json:"Cause,omitempty"` ConditionCode *Condition `json:"ConditionCode,omitempty"` ConditionInfo []string `json:"ConditionInfo,omitempty"` ConditionText *string `json:"ConditionText,omitempty"` County []County `json:"CountyNo,omitempty"` Creator *string `json:"Creator,omitempty"` Deleted *bool `json:"Deleted,omitempty"` EndTime *time.Time `json:"EndTime,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` IconID *string `json:"IconId,omitempty"` ID *string `json:"Id,omitempty"` LocationText *string `json:"LocationText,omitempty"` Measurement []Measurement `json:"Measurement,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` RoadNumber *string `json:"RoadNumber,omitempty"` RoadNumberNumeric *int `json:"RoadNumberNumeric,omitempty"` StartTime *time.Time `json:"StartTime,omitempty"` Warning []Warning `json:"Warning,omitempty"` }
type RoadCondition1Dot1 ¶ added in v0.3.0
type RoadCondition1Dot1 struct { Cause []Cause `json:"Cause,omitempty"` ConditionCode *Condition `json:"ConditionCode,omitempty"` ConditionInfo []string `json:"ConditionInfo,omitempty"` ConditionText *string `json:"ConditionText,omitempty"` County []County `json:"CountyNo,omitempty"` Creator *string `json:"Creator,omitempty"` Deleted *bool `json:"Deleted,omitempty"` EndTime *time.Time `json:"EndTime,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` IconID *string `json:"IconId,omitempty"` ID *string `json:"Id,omitempty"` LocationText *string `json:"LocationText,omitempty"` Measurement []Measurement `json:"Measurement,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` RoadNumber *string `json:"RoadNumber,omitempty"` RoadNumberNumeric *int `json:"RoadNumberNumeric,omitempty"` SafetyRelatedMessage *bool `json:"SafetyRelatedMessage,omitempty"` StartTime *time.Time `json:"StartTime,omitempty"` Warning []Warning `json:"Warning,omitempty"` }
type RoadCondition1Dot2 ¶ added in v0.3.0
type RoadCondition1Dot2 struct { Cause []Cause `json:"Cause,omitempty"` ConditionCode *Condition `json:"ConditionCode,omitempty"` ConditionInfo []string `json:"ConditionInfo,omitempty"` ConditionText *string `json:"ConditionText,omitempty"` County []County `json:"CountyNo,omitempty"` Creator *string `json:"Creator,omitempty"` Deleted *bool `json:"Deleted,omitempty"` EndTime *time.Time `json:"EndTime,omitempty"` Geometry *GeometryWithMod `json:"Geometry,omitempty"` IconID *string `json:"IconId,omitempty"` ID *string `json:"Id,omitempty"` LocationText *string `json:"LocationText,omitempty"` Measurement []Measurement `json:"Measurement,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` RoadNumber *string `json:"RoadNumber,omitempty"` RoadNumberNumeric *int `json:"RoadNumberNumeric,omitempty"` SafetyRelatedMessage *bool `json:"SafetyRelatedMessage,omitempty"` StartTime *time.Time `json:"StartTime,omitempty"` Warning []Warning `json:"Warning,omitempty"` }
type RoadConditionOverview1Dot0 ¶ added in v0.3.0
type RoadConditionOverview1Dot0 struct { County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` EndTime *time.Time `json:"EndTime,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` ID *string `json:"Id,omitempty"` LocationText *string `json:"LocationText,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` StartTime *time.Time `json:"StartTime,omitempty"` Text *string `json:"Text,omitempty"` ValidUntilFurtherNotice *bool `json:"ValidUntilFurtherNotice,omitempty"` }
type RoadData1Dot0 ¶ added in v0.3.0
type RoadData1Dot0 struct { AADT *int `json:"AADT,omitempty"` AADTHeavyVehicles *int `json:"AADTHeavyVehicles,omitempty"` AADTMeasurementMethod *struct { Code *int `json:"Code,omitempty"` Value *string `json:"Value,omitempty"` } `json:"AADTMeasurementMethod,omitempty"` AADTMeasurementYear *int `json:"AADTMeasurementYear,omitempty"` BearingCapacity *struct { Code *int `json:"Code,omitempty"` Value *string `json:"Value,omitempty"` } `json:"BearingCapacity,omitempty"` County *County `json:"County,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Direction *struct { Code *int `json:"Code,omitempty"` Value *string `json:"Value,omitempty"` } `json:"Direction,omitempty"` EndContinuousLength *int `json:"EndContinuousLength,omitempty"` LaneDescription *int `json:"LaneDescription,omitempty"` Length *int `json:"Length,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` RoadCategory *struct { Code *int `json:"Code,omitempty"` Value *string `json:"Value,omitempty"` } `json:"RoadCategory,omitempty"` RoadConstruction2009 *int `json:"RoadConstruction2009,omitempty"` RoadMainNumber *int `json:"RoadMainNumber,omitempty"` RoadOwner *struct { Code *int `json:"Code,omitempty"` Value *string `json:"Value,omitempty"` } `json:"RoadOwner,omitempty"` RoadSubNumber *int `json:"RoadSubNumber,omitempty"` RoadType *struct { Code *int `json:"Code,omitempty"` Value *string `json:"Value,omitempty"` } `json:"RoadType,omitempty"` RoadWidth *float64 `json:"RoadWidth,omitempty"` SpeedLimit *int `json:"SpeedLimit,omitempty"` StartContinuousLength *int `json:"StartContinuousLength,omitempty"` Timestamp *time.Time `json:"TimeStamp,omitempty"` WearLayer *int `json:"WearLayer,omitempty"` Winter2003 *struct { Code *int `json:"Code,omitempty"` Value *string `json:"Value,omitempty"` } `json:"Winter2003,omitempty"` }
type RoadGeometry1Dot0 ¶ added in v0.3.0
type RoadGeometry1Dot0 struct { County *County `json:"County,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Direction *struct { Code *int `json:"Code,omitempty"` Value *string `json:"Value,omitempty"` } `json:"Direction,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` Length *int `json:"Length,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` RoadMainNumber *int `json:"RoadMainNumber,omitempty"` RoadSubNumber *int `json:"RoadSubNumber,omitempty"` Timestamp *time.Time `json:"TimeStamp,omitempty"` }
type TrafficFlow1Dot0 ¶ added in v0.3.0
type TrafficFlow1Dot0 struct { AverageVehicleSpeed *int `json:"AverageVehicleSpeed,omitempty"` County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` MeasurementOrCalculationPeriod *int `json:"MeasurementOrCalculationPeriod,omitempty"` MeasurementSide *string `json:"MeasurementSide,omitempty"` MeasurementTime *time.Time `json:"MeasurementTime,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` RegionID *Region `json:"RegionId,omitempty"` SiteID *int `json:"SiteId,omitempty"` SpecificLane *string `json:"SpecificLane,omitempty"` VehicleFlowRate *int `json:"VehicleFlowRate,omitempty"` VehicleType *Vehicle `json:"VehicleType,omitempty"` }
type TrafficFlow1Dot4 ¶ added in v0.3.0
type TrafficFlow1Dot4 struct { AverageVehicleSpeed *float64 `json:"AverageVehicleSpeed,omitempty"` County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` MeasurementOrCalculationPeriod *int `json:"MeasurementOrCalculationPeriod,omitempty"` MeasurementSide *string `json:"MeasurementSide,omitempty"` MeasurementTime *time.Time `json:"MeasurementTime,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` RegionID *Region `json:"RegionId,omitempty"` SiteID *int `json:"SiteId,omitempty"` SpecificLane *string `json:"SpecificLane,omitempty"` VehicleFlowRate *int `json:"VehicleFlowRate,omitempty"` VehicleType *Vehicle `json:"VehicleType,omitempty"` }
type TrafficSafetyCamera1Dot0 ¶ added in v0.3.0
type TrafficSafetyCamera1Dot0 struct { Bearing *int `json:"Bearing,omitempty"` County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` IconID *string `json:"IconId,omitempty"` ID *string `json:"Id,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` Name *string `json:"Name,omitempty"` RoadNumber *string `json:"RoadNumber,omitempty"` }
type TrafficStatus ¶ added in v0.3.0
type TrafficStatus string
const ( TrafficStatusFreeflow TrafficStatus = "freeflow" TrafficStatusHeavy TrafficStatus = "heavy" TrafficStatusCongested TrafficStatus = "congested" TrafficStatusImpossible TrafficStatus = "impossible" TrafficStatusUnknown TrafficStatus = "unknown" )
type TrainAnnouncement1Dot0 ¶ added in v0.2.0
type TrainAnnouncement1Dot0 struct { ActivityID *string `json:"ActivityId,omitempty"` ActivityType *ActivityType `json:"ActivityType,omitempty"` Advertised *bool `json:"Advertised,omitempty"` AdvertisedTimeAtLocation *time.Time `json:"AdvertisedTimeAtLocation,omitempty"` AdvertisedTrainID *string `json:"AdvertisedTrainIdent,omitempty"` Booking []string `json:"Booking,omitempty"` Canceled *bool `json:"Canceled,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Deviation []string `json:"Deviation,omitempty"` EstimatedTimeAtLocation *time.Time `json:"EstimatedTimeAtLocation,omitempty"` EstimatedTimeIsPreliminary *bool `json:"EstimatedTimeIsPreliminary,omitempty"` FromLocation []string `json:"FromLocation,omitempty"` InformationOwner *string `json:"InformationOwner,omitempty"` LocationSignature *string `json:"LocationSignature,omitempty"` MobileWebLink *string `json:"MobileWebLink,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` OtherInformation []string `json:"OtherInformation,omitempty"` ProductInformation []string `json:"ProductInformation,omitempty"` ScheduledDepartureDateTime *time.Time `json:"ScheduledDepartureDateTime,omitempty"` Service []string `json:"Service,omitempty"` TimeAtLocation *time.Time `json:"TimeAtLocation,omitempty"` ToLocation []string `json:"ToLocation,omitempty"` TrackAtLocation *string `json:"TrackAtLocation,omitempty"` TrainComposition []string `json:"TrainComposition,omitempty"` TypeOfTraffic *string `json:"TypeOfTraffic,omitempty"` WebLink *string `json:"WebLink,omitempty"` }
type TrainAnnouncement1Dot3 ¶ added in v0.2.0
type TrainAnnouncement1Dot3 struct { ActivityID *string `json:"ActivityId,omitempty"` ActivityType *ActivityType `json:"ActivityType,omitempty"` Advertised *bool `json:"Advertised,omitempty"` AdvertisedTimeAtLocation *time.Time `json:"AdvertisedTimeAtLocation,omitempty"` AdvertisedTrainID *string `json:"AdvertisedTrainIdent,omitempty"` Booking []string `json:"Booking,omitempty"` Canceled *bool `json:"Canceled,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Deviation []string `json:"Deviation,omitempty"` EstimatedTimeAtLocation *time.Time `json:"EstimatedTimeAtLocation,omitempty"` EstimatedTimeIsPreliminary *bool `json:"EstimatedTimeIsPreliminary,omitempty"` FromLocation []struct { LocationName *string `json:"LocationName,omitempty"` Priority *int `json:"Priority,omitempty"` Order *int `json:"Order,omitempty"` } `json:"FromLocation,omitempty"` InformationOwner *string `json:"InformationOwner,omitempty"` LocationSignature *string `json:"LocationSignature,omitempty"` MobileWebLink *string `json:"MobileWebLink,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` NewEquipment *int `json:"NewEquipment,omitempty"` OtherInformation []string `json:"OtherInformation,omitempty"` PlannedEstimatedTimeAtLocation *time.Time `json:"PlannedEstimatedTimeAtLocation,omitempty"` PlannedEstimatedTimeAtLocationIsValid *bool `json:"PlannedEstimatedTimeAtLocationIsValid,omitempty"` ProductInformation []string `json:"ProductInformation,omitempty"` ScheduledDepartureDateTime *time.Time `json:"ScheduledDepartureDateTime,omitempty"` Service []string `json:"Service,omitempty"` TechnicalTrainID *string `json:"TechnicalTrainIdent,omitempty"` TimeAtLocation *time.Time `json:"TimeAtLocation,omitempty"` ToLocation []struct { LocationName *string `json:"LocationName,omitempty"` Priority *int `json:"Priority,omitempty"` Order *int `json:"Order,omitempty"` } `json:"ToLocation,omitempty"` TrackAtLocation *string `json:"TrackAtLocation,omitempty"` TrainComposition []string `json:"TrainComposition,omitempty"` TypeOfTraffic *string `json:"TypeOfTraffic,omitempty"` ViaFromLocation []struct { LocationName *string `json:"LocationName,omitempty"` Priority *int `json:"Priority,omitempty"` Order *int `json:"Order,omitempty"` } `json:"ViaFromLocation,omitempty"` ViaToLocation []struct { LocationName *string `json:"LocationName,omitempty"` Priority *int `json:"Priority,omitempty"` Order *int `json:"Order,omitempty"` } `json:"ViaToLocation,omitempty"` WebLink *string `json:"WebLink,omitempty"` WebLinkName *string `json:"WebLinkName,omitempty"` }
type TrainAnnouncement1Dot4 ¶ added in v0.2.0
type TrainAnnouncement1Dot4 struct { ActivityID *string `json:"ActivityId,omitempty"` ActivityType *ActivityType `json:"ActivityType,omitempty"` Advertised *bool `json:"Advertised,omitempty"` AdvertisedTimeAtLocation *time.Time `json:"AdvertisedTimeAtLocation,omitempty"` AdvertisedTrainID *string `json:"AdvertisedTrainIdent,omitempty"` Booking []string `json:"Booking,omitempty"` Canceled *bool `json:"Canceled,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Deviation []string `json:"Deviation,omitempty"` EstimatedTimeAtLocation *time.Time `json:"EstimatedTimeAtLocation,omitempty"` EstimatedTimeIsPreliminary *bool `json:"EstimatedTimeIsPreliminary,omitempty"` FromLocation []struct { LocationName *string `json:"LocationName,omitempty"` Priority *int `json:"Priority,omitempty"` Order *int `json:"Order,omitempty"` } `json:"FromLocation,omitempty"` InformationOwner *string `json:"InformationOwner,omitempty"` LocationSignature *string `json:"LocationSignature,omitempty"` MobileWebLink *string `json:"MobileWebLink,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` NewEquipment *int `json:"NewEquipment,omitempty"` Operator *string `json:"Operator,omitempty"` OtherInformation []string `json:"OtherInformation,omitempty"` PlannedEstimatedTimeAtLocation *time.Time `json:"PlannedEstimatedTimeAtLocation,omitempty"` PlannedEstimatedTimeAtLocationIsValid *bool `json:"PlannedEstimatedTimeAtLocationIsValid,omitempty"` ProductInformation []string `json:"ProductInformation,omitempty"` ScheduledDepartureDateTime *time.Time `json:"ScheduledDepartureDateTime,omitempty"` Service []string `json:"Service,omitempty"` TechnicalDateTime *time.Time `json:"TechnicalDateTime,omitempty"` TechnicalTrainID *string `json:"TechnicalTrainIdent,omitempty"` TimeAtLocation *time.Time `json:"TimeAtLocation,omitempty"` TimeAtLocationWithSeconds *time.Time `json:"TimeAtLocationWithSeconds,omitempty"` ToLocation []struct { LocationName *string `json:"LocationName,omitempty"` Priority *int `json:"Priority,omitempty"` Order *int `json:"Order,omitempty"` } `json:"ToLocation,omitempty"` TrackAtLocation *string `json:"TrackAtLocation,omitempty"` TrainComposition []string `json:"TrainComposition,omitempty"` TrainOwner *string `json:"TrainOwner,omitempty"` TypeOfTraffic *string `json:"TypeOfTraffic,omitempty"` ViaFromLocation []struct { LocationName *string `json:"LocationName,omitempty"` Priority *int `json:"Priority,omitempty"` Order *int `json:"Order,omitempty"` } `json:"ViaFromLocation,omitempty"` ViaToLocation []struct { LocationName *string `json:"LocationName,omitempty"` Priority *int `json:"Priority,omitempty"` Order *int `json:"Order,omitempty"` } `json:"ViaToLocation,omitempty"` WebLink *string `json:"WebLink,omitempty"` WebLinkName *string `json:"WebLinkName,omitempty"` }
type TrainAnnouncement1Dot5 ¶ added in v0.2.0
type TrainAnnouncement1Dot5 struct { ActivityID *string `json:"ActivityId,omitempty"` ActivityType *ActivityType `json:"ActivityType,omitempty"` Advertised *bool `json:"Advertised,omitempty"` AdvertisedTimeAtLocation *time.Time `json:"AdvertisedTimeAtLocation,omitempty"` AdvertisedTrainID *string `json:"AdvertisedTrainIdent,omitempty"` Booking []struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"Booking,omitempty"` Canceled *bool `json:"Canceled,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Deviation []struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"Deviation,omitempty"` EstimatedTimeAtLocation *time.Time `json:"EstimatedTimeAtLocation,omitempty"` EstimatedTimeIsPreliminary *bool `json:"EstimatedTimeIsPreliminary,omitempty"` FromLocation []struct { LocationName *string `json:"LocationName,omitempty"` Priority *int `json:"Priority,omitempty"` Order *int `json:"Order,omitempty"` } `json:"FromLocation,omitempty"` InformationOwner *string `json:"InformationOwner,omitempty"` LocationSignature *string `json:"LocationSignature,omitempty"` MobileWebLink *string `json:"MobileWebLink,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` NewEquipment *int `json:"NewEquipment,omitempty"` Operator *string `json:"Operator,omitempty"` OtherInformation []struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"OtherInformation,omitempty"` PlannedEstimatedTimeAtLocation *time.Time `json:"PlannedEstimatedTimeAtLocation,omitempty"` PlannedEstimatedTimeAtLocationIsValid *bool `json:"PlannedEstimatedTimeAtLocationIsValid,omitempty"` ProductInformation []struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"ProductInformation,omitempty"` ScheduledDepartureDateTime *time.Time `json:"ScheduledDepartureDateTime,omitempty"` Service []struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"Service,omitempty"` TechnicalDateTime *time.Time `json:"TechnicalDateTime,omitempty"` TechnicalTrainID *string `json:"TechnicalTrainIdent,omitempty"` TimeAtLocation *time.Time `json:"TimeAtLocation,omitempty"` TimeAtLocationWithSeconds *time.Time `json:"TimeAtLocationWithSeconds,omitempty"` ToLocation []struct { LocationName *string `json:"LocationName,omitempty"` Priority *int `json:"Priority,omitempty"` Order *int `json:"Order,omitempty"` } `json:"ToLocation,omitempty"` TrackAtLocation *string `json:"TrackAtLocation,omitempty"` TrainComposition []struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"TrainComposition,omitempty"` TrainOwner *string `json:"TrainOwner,omitempty"` TypeOfTraffic *string `json:"TypeOfTraffic,omitempty"` ViaFromLocation []struct { LocationName *string `json:"LocationName,omitempty"` Priority *int `json:"Priority,omitempty"` Order *int `json:"Order,omitempty"` } `json:"ViaFromLocation,omitempty"` ViaToLocation []struct { LocationName *string `json:"LocationName,omitempty"` Priority *int `json:"Priority,omitempty"` Order *int `json:"Order,omitempty"` } `json:"ViaToLocation,omitempty"` WebLink *string `json:"WebLink,omitempty"` WebLinkName *string `json:"WebLinkName,omitempty"` }
type TrainAnnouncement1Dot6 ¶ added in v0.2.0
type TrainAnnouncement1Dot6 struct { ActivityID *string `json:"ActivityId,omitempty"` ActivityType *ActivityType `json:"ActivityType,omitempty"` Advertised *bool `json:"Advertised,omitempty"` AdvertisedTimeAtLocation *time.Time `json:"AdvertisedTimeAtLocation,omitempty"` AdvertisedTrainID *string `json:"AdvertisedTrainIdent,omitempty"` Booking []struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"Booking,omitempty"` Canceled *bool `json:"Canceled,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Deviation []struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"Deviation,omitempty"` EstimatedTimeAtLocation *time.Time `json:"EstimatedTimeAtLocation,omitempty"` EstimatedTimeIsPreliminary *bool `json:"EstimatedTimeIsPreliminary,omitempty"` FromLocation []struct { LocationName *string `json:"LocationName,omitempty"` Priority *int `json:"Priority,omitempty"` Order *int `json:"Order,omitempty"` } `json:"FromLocation,omitempty"` InformationOwner *string `json:"InformationOwner,omitempty"` LocationSignature *string `json:"LocationSignature,omitempty"` MobileWebLink *string `json:"MobileWebLink,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` NewEquipment *int `json:"NewEquipment,omitempty"` Operator *string `json:"Operator,omitempty"` OtherInformation []struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"OtherInformation,omitempty"` PlannedEstimatedTimeAtLocation *time.Time `json:"PlannedEstimatedTimeAtLocation,omitempty"` PlannedEstimatedTimeAtLocationIsValid *bool `json:"PlannedEstimatedTimeAtLocationIsValid,omitempty"` ProductInformation []struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"ProductInformation,omitempty"` ScheduledDepartureDateTime *time.Time `json:"ScheduledDepartureDateTime,omitempty"` Service []struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"Service,omitempty"` TechnicalDateTime *time.Time `json:"TechnicalDateTime,omitempty"` TechnicalTrainID *string `json:"TechnicalTrainIdent,omitempty"` TimeAtLocation *time.Time `json:"TimeAtLocation,omitempty"` TimeAtLocationWithSeconds *time.Time `json:"TimeAtLocationWithSeconds,omitempty"` ToLocation []struct { LocationName *string `json:"LocationName,omitempty"` Priority *int `json:"Priority,omitempty"` Order *int `json:"Order,omitempty"` } `json:"ToLocation,omitempty"` TrackAtLocation *string `json:"TrackAtLocation,omitempty"` TrainComposition []struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"TrainComposition,omitempty"` TrainOwner *string `json:"TrainOwner,omitempty"` TypeOfTraffic []struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"TypeOfTraffic,omitempty"` ViaFromLocation []struct { LocationName *string `json:"LocationName,omitempty"` Priority *int `json:"Priority,omitempty"` Order *int `json:"Order,omitempty"` } `json:"ViaFromLocation,omitempty"` ViaToLocation []struct { LocationName *string `json:"LocationName,omitempty"` Priority *int `json:"Priority,omitempty"` Order *int `json:"Order,omitempty"` } `json:"ViaToLocation,omitempty"` WebLink *string `json:"WebLink,omitempty"` WebLinkName *string `json:"WebLinkName,omitempty"` }
type TrainMessage1Dot0 ¶ added in v0.2.0
type TrainMessage1Dot0 struct { AffectedLocation []string `json:"AffectedLocation,omitempty"` County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` EventID *string `json:"EventId,omitempty"` ExternalDescription *string `json:"ExternalDescription,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` LastUpdateDateTime *time.Time `json:"LastUpdateDateTime,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` StartDateTime *time.Time `json:"StartDateTime,omitempty"` ReasonCodeText *string `json:"ReasonCodeText,omitempty"` }
type TrainMessage1Dot3 ¶ added in v0.2.0
type TrainMessage1Dot3 struct { AffectedLocation []string `json:"AffectedLocation,omitempty"` County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` EndDateTime *time.Time `json:"EndDateTime,omitempty"` EventID *string `json:"EventId,omitempty"` ExternalDescription *string `json:"ExternalDescription,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` Header *string `json:"Header,omitempty"` LastUpdateDateTime *time.Time `json:"LastUpdateDateTime,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` ReasonCodeText *string `json:"ReasonCodeText,omitempty"` StartDateTime *time.Time `json:"StartDateTime,omitempty"` TrafficImpact *struct { AffectedLocation []string `json:"AffectedLocation,omitempty"` FromLocation []string `json:"FromLocation,omitempty"` ToLocation []string `json:"ToLocation,omitempty"` } `json:"TrafficImpact,omitempty"` }
type TrainMessage1Dot4 ¶ added in v0.2.0
type TrainMessage1Dot4 struct { AffectedLocation []string `json:"AffectedLocation,omitempty"` County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` EndDateTime *time.Time `json:"EndDateTime,omitempty"` EventID *string `json:"EventId,omitempty"` ExpectTrafficImpact *bool `jsno:"ExpectTrafficImpact,omitempty"` ExternalDescription *string `json:"ExternalDescription,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` Header *string `json:"Header,omitempty"` LastUpdateDateTime *time.Time `json:"LastUpdateDateTime,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` PrognosticatedEndDateTimeTrafficImpact *time.Time `json:"PrognosticatedEndDateTimeTrafficImpact,omitempty"` ReasonCodeText *string `json:"ReasonCodeText,omitempty"` StartDateTime *time.Time `json:"StartDateTime,omitempty"` TrafficImpact *struct { AffectedLocation []string `json:"AffectedLocation,omitempty"` FromLocation []string `json:"FromLocation,omitempty"` ToLocation []string `json:"ToLocation,omitempty"` } `json:"TrafficImpact,omitempty"` }
type TrainMessage1Dot5 ¶ added in v0.2.0
type TrainMessage1Dot5 struct { AffectedLocation []string `json:"AffectedLocation,omitempty"` County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` EndDateTime *time.Time `json:"EndDateTime,omitempty"` EventID *string `json:"EventId,omitempty"` ExpectTrafficImpact *bool `jsno:"ExpectTrafficImpact,omitempty"` ExternalDescription *string `json:"ExternalDescription,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` Header *string `json:"Header,omitempty"` LastUpdateDateTime *time.Time `json:"LastUpdateDateTime,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` PrognosticatedEndDateTimeTrafficImpact *time.Time `json:"PrognosticatedEndDateTimeTrafficImpact,omitempty"` ReasonCode *struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"ReasonCodeText,omitempty"` StartDateTime *time.Time `json:"StartDateTime,omitempty"` TrafficImpact *struct { AffectedLocation []string `json:"AffectedLocation,omitempty"` FromLocation []string `json:"FromLocation,omitempty"` ToLocation []string `json:"ToLocation,omitempty"` } `json:"TrafficImpact,omitempty"` }
type TrainMessage1Dot6 ¶ added in v0.2.0
type TrainMessage1Dot6 struct { County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` EndDateTime *time.Time `json:"EndDateTime,omitempty"` EventID *string `json:"EventId,omitempty"` ExternalDescription *string `json:"ExternalDescription,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` Header *string `json:"Header,omitempty"` LastUpdateDateTime *time.Time `json:"LastUpdateDateTime,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` PrognosticatedEndDateTimeTrafficImpact *time.Time `json:"PrognosticatedEndDateTimeTrafficImpact,omitempty"` ReasonCode *struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"ReasonCodeText,omitempty"` StartDateTime *time.Time `json:"StartDateTime,omitempty"` TrafficImpact *struct { AffectedLocation []string `json:"AffectedLocation,omitempty"` FromLocation []string `json:"FromLocation,omitempty"` IsConfirmed *bool `json:"IsConfirmed,omitempty"` ToLocation []string `json:"ToLocation,omitempty"` } `json:"TrafficImpact,omitempty"` }
type TrainMessage1Dot7 ¶ added in v0.2.0
type TrainMessage1Dot7 struct { County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` EndDateTime *time.Time `json:"EndDateTime,omitempty"` EventID *string `json:"EventId,omitempty"` ExternalDescription *string `json:"ExternalDescription,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` Header *string `json:"Header,omitempty"` LastUpdateDateTime *time.Time `json:"LastUpdateDateTime,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` PrognosticatedEndDateTimeTrafficImpact *time.Time `json:"PrognosticatedEndDateTimeTrafficImpact,omitempty"` ReasonCode *struct { Code *string `json:"Code,omitempty"` Description *string `json:"Description,omitempty"` } `json:"ReasonCodeText,omitempty"` StartDateTime *time.Time `json:"StartDateTime,omitempty"` TrafficImpact *struct { AffectedLocation []struct { LocationSignature *string `json:"LocationSignature,omitempty"` ShouldBeTrafficInformed *bool `json:"ShouldBeTrafficInformed,omitempty"` } `json:"AffectedLocation,omitempty"` FromLocation []string `json:"FromLocation,omitempty"` IsConfirmed *bool `json:"IsConfirmed,omitempty"` ToLocation []string `json:"ToLocation,omitempty"` } `json:"TrafficImpact,omitempty"` }
type TrainStation1Dot0 ¶ added in v0.2.0
type TrainStation1Dot0 struct { Advertised *bool `json:"Advertised,omitempty"` AdvertisedLocationName *string `json:"AdvertisedLocationName,omitempty"` AdvertisedShortLocationName *string `json:"AdvertisedShortLocationName,omitempty"` Country *Country `json:"CountryCode,omitempty"` County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` LocationInformationText *string `json:"LocationInformationText,omitempty"` LocationSignature *string `json:"LocationSignature,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` PlatformLine []string `json:"PlatformLine,omitempty"` Prognosticated *bool `json:"Prognosticated,omitempty"` }
type TrainStation1Dot4 ¶ added in v0.2.0
type TrainStation1Dot4 struct { Advertised *bool `json:"Advertised,omitempty"` AdvertisedLocationName *string `json:"AdvertisedLocationName,omitempty"` AdvertisedShortLocationName *string `json:"AdvertisedShortLocationName,omitempty"` Country *Country `json:"CountryCode,omitempty"` County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` LocationInformationText *string `json:"LocationInformationText,omitempty"` LocationSignature *string `json:"LocationSignature,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` OfficialLocationName *string `json:"OfficialLocationName,omitempty"` PlatformLine []string `json:"PlatformLine,omitempty"` Prognosticated *bool `json:"Prognosticated,omitempty"` }
type TrainStationMessage1Dot0 ¶ added in v0.2.0
type TrainStationMessage1Dot0 struct { ActiveDays *string `json:"ActiveDays,omitempty"` Deleted *bool `json:"Deleted,omitempty"` EndDateTime *time.Time `json:"EndDateTime,omitempty"` EventID *string `json:"EventId,omitempty" yaml:"EventId,omitempty"` FreeText *string `json:"FreeText,omitempty"` ID *string `json:"Id,omitempty"` LocationCode *string `json:"LocationCode,omitempty"` MediaType *MediaType `json:"MediaType,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` MonitorAttributes *struct { BigScreenMonitorActivated *bool `json:"BigScreenMonitorActivated,omitempty"` CommuterMonitor *bool `json:"CommuterMonitor,omitempty"` } `json:"MonitorAttributes,omitempty"` PlatformSignAttributes *struct { CommuterPlatformSign *bool `json:"CommuterPlatformSign,omitempty"` TrackList *struct { Track []string `json:"Track,omitempty"` } `json:"TrackList,omitempty"` } `json:"PlatformSignAttributes,omitempty"` PublicAnnouncementAttributes *struct { EnglishPublicAnnouncementActivated *bool `json:"EnglishPublicAnnouncementActivated,omitempty"` EnglishText *string `json:"EnglishText,omitempty"` PublicAnnouncementPlanList *struct { PublicAnnouncementPlan []struct { ActiveDays *string `json:"ActiveDays,omitempty"` PublicAnnouncementOccasionList *struct { PublicAnnouncementOccasion []int `json:"PublicAnnouncementOccasion,omitempty"` } `json:"PublicAnnouncementOccasionList,omitempty"` ValidFrom *time.Time `json:"ValidFrom,omitempty"` ValidTo *time.Time `json:"ValidTo,omitempty"` } `json:"PublicAnnouncementPlan,omitempty"` } `json:"PublicAnnouncementPlanList,omitempty"` PublicAnnouncementZoneList *struct { PublicAnnouncementZone []string `json:"PublicAnnouncementZone,omitempty"` } `json:"PublicAnnouncementZoneList,omitempty"` } `json:"PublicAnnouncementAttributes,omitempty"` SplitActivationTime *bool `json:"SplitActivationTime,omitempty"` StartDateTime *time.Time `json:"StartDateTime,omitempty"` Status *MessageStatus `json:"Status,omitempty"` VersionNumber *int `json:"VersionNumber,omitempty"` }
type TravelTimeRoute1Dot0 ¶ added in v0.3.0
type TravelTimeRoute1Dot0 struct { AverageFunctionalRoadClass *int `json:"AverageFunctionalRoadClass,omitempty"` Country *Country `json:"CountryCode,omitempty"` County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` ExpectedFreeFlowTravelTime *int `json:"ExpectedFreeFlowTravelTime,omitempty"` FreeFlowTravelTime *int `json:"FreeFlowTravelTime,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` ID *string `json:"Id,omitempty"` Length *int `json:"Length,omitempty"` MeasureTime *time.Time `json:"MeasureTime,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` Name *string `json:"Name,omitempty"` Speed *float64 `json:"Speed,omitempty"` Status *Status `json:"Status,omitempty"` TravelTime *int `json:"TravelTime,omitempty"` }
type TravelTimeRoute1Dot3 ¶ added in v0.3.0
type TravelTimeRoute1Dot3 struct { AverageFunctionalRoadClass *int `json:"AverageFunctionalRoadClass,omitempty"` Country *Country `json:"CountryCode,omitempty"` County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` ExpectedFreeFlowTravelTime *int `json:"ExpectedFreeFlowTravelTime,omitempty"` FreeFlowTravelTime *int `json:"FreeFlowTravelTime,omitempty"` Geometry *GeometryWithMod `json:"Geometry,omitempty"` ID *string `json:"Id,omitempty"` Length *int `json:"Length,omitempty"` MeasureTime *time.Time `json:"MeasureTime,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` Name *string `json:"Name,omitempty"` RouteOwner *int `json:"RouteOwner,omitempty"` Speed *float64 `json:"Speed,omitempty"` Status *Status `json:"Status,omitempty"` TravelTime *int `json:"TravelTime,omitempty"` }
type TravelTimeRoute1Dot4 ¶ added in v0.3.0
type TravelTimeRoute1Dot4 struct { AverageFunctionalRoadClass *int `json:"AverageFunctionalRoadClass,omitempty"` Country *Country `json:"CountryCode,omitempty"` County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` ExpectedFreeFlowTravelTime *int `json:"ExpectedFreeFlowTravelTime,omitempty"` FreeFlowTravelTime *int `json:"FreeFlowTravelTime,omitempty"` Geometry *GeometryWithMod `json:"Geometry,omitempty"` ID *string `json:"Id,omitempty"` Length *int `json:"Length,omitempty"` MeasureTime *time.Time `json:"MeasureTime,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` Name *string `json:"Name,omitempty"` RouteOwner *int `json:"RouteOwner,omitempty"` Speed *float64 `json:"Speed,omitempty"` TrafficStatus *TrafficStatus `json:"TrafficStatus,omitempty"` TravelTime *int `json:"TravelTime,omitempty"` }
type TravelTimeRoute1Dot5 ¶ added in v0.3.0
type TravelTimeRoute1Dot5 struct { AverageFunctionalRoadClass *int `json:"AverageFunctionalRoadClass,omitempty"` Country *Country `json:"CountryCode,omitempty"` County []County `json:"CountyNo,omitempty"` Deleted *bool `json:"Deleted,omitempty"` ExpectedFreeFlowTravelTime *float64 `json:"ExpectedFreeFlowTravelTime,omitempty"` FreeFlowTravelTime *float64 `json:"FreeFlowTravelTime,omitempty"` Geometry *GeometryWithMod `json:"Geometry,omitempty"` ID *string `json:"Id,omitempty"` Length *float64 `json:"Length,omitempty"` MeasureTime *time.Time `json:"MeasureTime,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` Name *string `json:"Name,omitempty"` RouteOwner *int `json:"RouteOwner,omitempty"` Speed *float64 `json:"Speed,omitempty"` TrafficStatus *TrafficStatus `json:"TrafficStatus,omitempty"` TravelTime *float64 `json:"TravelTime,omitempty"` }
type Vehicle ¶ added in v0.3.0
type Vehicle string
const ( VehicleAgricultural Vehicle = "agriculturalVehicle" VehicleAny Vehicle = "anyVehicle" VehicleArticulatedVehicle Vehicle = "articulatedVehicle" VehicleBicycle Vehicle = "bicycle" VehicleBus Vehicle = "bus" VehicleCar Vehicle = "car" VehicleACaravan Vehicle = "caravan" VehicleCarOrLightVehicle Vehicle = "carOrLightVehicle" VehicleCarWithCaravan Vehicle = "carWithCaravan" VehicleCarWithTrailer Vehicle = "carWithTrailer" VehicleConstructionOrMaintenanceVehicle Vehicle = "constructionOrMaintenanceVehicle" VehicleFourWheelDrive Vehicle = "fourWheelDrive" VehicleHighSidedVehicle Vehicle = "highSidedVehicle" VehicleLorry Vehicle = "lorry" VehicleMoped Vehicle = "moped" VehicleMotorcycle Vehicle = "motorcycle" VehicleMotorcycleWithSideCar Vehicle = "motorcycleWithSideCar" VehicleScooter Vehicle = "motorscooter" VehicleTanker Vehicle = "tanker" VehicleThreeWheeledVehicle Vehicle = "threeWheeledVehicle" VehicleTrailer Vehicle = "trailer" VehicleTram Vehicle = "tram" VehicleTwoWheeledVehicle Vehicle = "twoWheeledVehicle" VehicleVan Vehicle = "van" VehicleWithCatalyticConverter Vehicle = "vehicleWithCatalyticConverter" VehicleWithoutCatalyticConverter Vehicle = "vehicleWithoutCatalyticConverter" VehicleWithCaravan Vehicle = "vehicleWithCaravan" VehicleWithTrailer Vehicle = "vehicleWithTrailer" VehicleWithEvenNumberedRegistrationPlates Vehicle = "withEvenNumberedRegistrationPlates" VehicleWithOddNumberedRegistrationPlates Vehicle = "withOddNumberedRegistrationPlates" VehicleOther Vehicle = "other" )
type WeatherMeasurepoint1Dot0 ¶ added in v0.4.0
type WeatherMeasurepoint1Dot0 struct { Deleted *bool `json:"Deleted,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` ID *string `json:"Id,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` Name *string `json:"Name,omitempty"` Observation *struct { Aggregated10Minutes *struct { Precipitation *struct { Rain *bool `json:"Rain,omitempty"` RainSum *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"RainSum"` Snow *bool `json:"Snow,omitempty"` SnowSum *struct { Solid *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"Solid,omitempty"` } `json:"SnowSum,omitempty"` TotalWaterEquivalent *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"TotalWaterEquivalent,omitempty"` } `json:"Precipitation,omitempty"` Wind *struct { Height *int `json:"Height,omitempty"` SpeedAverage *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedAverage,omitempty"` SpeedMax *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedMax,omitempty"` } `json:"Wind,omitempty"` } `json:"Aggregated10minutes,omitempty"` Aggregated30Minutes *struct { Precipitation *struct { Rain *bool `json:"Rain,omitempty"` RainSum *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"RainSum"` Snow *bool `json:"Snow,omitempty"` SnowSum *struct { Solid *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"Solid,omitempty"` } `json:"SnowSum,omitempty"` TotalWaterEquivalent *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"TotalWaterEquivalent,omitempty"` } `json:"Precipitation,omitempty"` Wind *struct { Height *int `json:"Height,omitempty"` SpeedAverage *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedAverage,omitempty"` SpeedMax *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedMax,omitempty"` } `json:"Wind,omitempty"` } `json:"Aggregated30minutes,omitempty"` Aggregated5Minutes *struct { Precipitation *struct { Rain *bool `json:"Rain,omitempty"` RainSum *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"RainSum"` Snow *bool `json:"Snow,omitempty"` SnowSum *struct { Solid *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"Solid,omitempty"` } `json:"SnowSum,omitempty"` TotalWaterEquivalent *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"TotalWaterEquivalent,omitempty"` } `json:"Precipitation,omitempty"` Wind *struct { Height *int `json:"Height,omitempty"` SpeedAverage *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedAverage,omitempty"` SpeedMax *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedMax,omitempty"` } `json:"Wind,omitempty"` } `json:"Aggregated5minutes,omitempty"` Air *struct { Dewpoint *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Dewpoint,omitempty"` RelativeHumidity *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"RelativeHumidity,omitempty"` Temperature *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Temperature,omitempty"` VisibleDistance *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"VisibleDistance,omitempty"` } `json:"Air,omitempty"` ID *string `json:"Id,omitempty"` Sample *time.Time `json:"Sample,omitempty"` Subsurface *struct { Ground []struct { Depth *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Depth,omitempty"` Temperature *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Temperature,omitempty"` } `json:"Ground,omitempty"` } `json:"Subsurface,omitempty"` Surface *struct { Grip *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Grip,omitempty"` Ice *bool `json:"Ice,omitempty"` IceDepth *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"IceDepth,omitempty"` Snow *bool `json:"Snow,omitempty"` SnowDepth *struct { Solid *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Solid,omitempty"` WaterEquivalent *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"WaterEquivalent,omitempty"` } `json:"SnowDepth,omitempty"` Temperature *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Temperature,omitempty"` Water *bool `json:"Water,omitempty"` WaterDepth *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"WaterDepth,omitempty"` } `json:"Surface,omitempty"` Wind [2]struct { Direction *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Direction,omitempty"` Height *int `json:"Height,omitempty"` Speed *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Speed,omitempty"` } `json:"Wind,omitempty"` } `json:"Observation,omitempty"` }
type WeatherMeasurepoint2Dot0 ¶ added in v0.4.0
type WeatherMeasurepoint2Dot0 struct { Deleted *bool `json:"Deleted,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` ID *string `json:"Id,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` Name *string `json:"Name,omitempty"` Observation *struct { Aggregated10Minutes *struct { Precipitation *struct { Rain *bool `json:"Rain,omitempty"` RainSum *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"RainSum"` Snow *bool `json:"Snow,omitempty"` SnowSum *struct { Solid *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"Solid,omitempty"` } `json:"SnowSum,omitempty"` TotalWaterEquivalent *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"TotalWaterEquivalent,omitempty"` } `json:"Precipitation,omitempty"` Wind *struct { Height *int `json:"Height,omitempty"` SpeedAverage *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedAverage,omitempty"` SpeedMax *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedMax,omitempty"` } `json:"Wind,omitempty"` } `json:"Aggregated10minutes,omitempty"` Aggregated30Minutes *struct { Precipitation *struct { Rain *bool `json:"Rain,omitempty"` RainSum *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"RainSum"` Snow *bool `json:"Snow,omitempty"` SnowSum *struct { Solid *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"Solid,omitempty"` } `json:"SnowSum,omitempty"` TotalWaterEquivalent *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"TotalWaterEquivalent,omitempty"` } `json:"Precipitation,omitempty"` Wind *struct { Height *int `json:"Height,omitempty"` SpeedAverage *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedAverage,omitempty"` SpeedMax *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedMax,omitempty"` } `json:"Wind,omitempty"` } `json:"Aggregated30minutes,omitempty"` Aggregated5Minutes *struct { Precipitation *struct { Rain *bool `json:"Rain,omitempty"` RainSum *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"RainSum"` Snow *bool `json:"Snow,omitempty"` SnowSum *struct { Solid *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"Solid,omitempty"` } `json:"SnowSum,omitempty"` TotalWaterEquivalent *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"TotalWaterEquivalent,omitempty"` } `json:"Precipitation,omitempty"` Wind *struct { Height *int `json:"Height,omitempty"` SpeedAverage *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedAverage,omitempty"` SpeedMax *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedMax,omitempty"` } `json:"Wind,omitempty"` } `json:"Aggregated5minutes,omitempty"` Air *struct { Dewpoint *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Dewpoint,omitempty"` RelativeHumidity *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"RelativeHumidity,omitempty"` Temperature *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Temperature,omitempty"` VisibleDistance *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"VisibleDistance,omitempty"` } `json:"Air,omitempty"` ID *string `json:"Id,omitempty"` Sample *time.Time `json:"Sample,omitempty"` Subsurface *struct { Ground []struct { Depth *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Depth,omitempty"` Temperature *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Temperature,omitempty"` } `json:"Ground,omitempty"` } `json:"Subsurface,omitempty"` Surface *struct { Grip *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Grip,omitempty"` Ice *bool `json:"Ice,omitempty"` IceDepth *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"IceDepth,omitempty"` Snow *bool `json:"Snow,omitempty"` SnowDepth *struct { Solid *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Solid,omitempty"` WaterEquivalent *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"WaterEquivalent,omitempty"` } `json:"SnowDepth,omitempty"` Temperature *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Temperature,omitempty"` Water *bool `json:"Water,omitempty"` WaterDepth *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"WaterDepth,omitempty"` } `json:"Surface,omitempty"` Weather *struct { Precipitation *PrecipitationTypeMeasure `json:"Precipitation,omitempty"` } `json:"Weather,omitempty"` Wind [2]struct { Direction *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Direction,omitempty"` Height *int `json:"Height,omitempty"` Speed *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Speed,omitempty"` } `json:"Wind,omitempty"` } `json:"Observation,omitempty"` }
type WeatherObservation1Dot0 ¶ added in v0.4.0
type WeatherObservation1Dot0 struct { Aggregated10Minutes *struct { Precipitation *struct { Rain *bool `json:"Rain,omitempty"` RainSum *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"RainSum"` Snow *bool `json:"Snow,omitempty"` SnowSum *struct { Solid *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"Solid,omitempty"` } `json:"SnowSum,omitempty"` TotalWaterEquivalent *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"TotalWaterEquivalent,omitempty"` } `json:"Precipitation,omitempty"` Wind *struct { Height *int `json:"Height,omitempty"` SpeedAverage *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedAverage,omitempty"` SpeedMax *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedMax,omitempty"` } `json:"Wind,omitempty"` } `json:"Aggregated10minutes,omitempty"` Aggregated30Minutes *struct { Precipitation *struct { Rain *bool `json:"Rain,omitempty"` RainSum *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"RainSum"` Snow *bool `json:"Snow,omitempty"` SnowSum *struct { Solid *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"Solid,omitempty"` } `json:"SnowSum,omitempty"` TotalWaterEquivalent *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"TotalWaterEquivalent,omitempty"` } `json:"Precipitation,omitempty"` Wind *struct { Height *int `json:"Height,omitempty"` SpeedAverage *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedAverage,omitempty"` SpeedMax *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedMax,omitempty"` } `json:"Wind,omitempty"` } `json:"Aggregated30minutes,omitempty"` Aggregated5Minutes struct { Precipitation *struct { Rain *bool `json:"Rain,omitempty"` RainSum *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"RainSum"` Snow *bool `json:"Snow,omitempty"` SnowSum *struct { Solid *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"Solid,omitempty"` } `json:"SnowSum,omitempty"` TotalWaterEquivalent *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"TotalWaterEquivalent,omitempty"` } `json:"Precipitation,omitempty"` Wind *struct { Height *int `json:"Height,omitempty"` SpeedAverage *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedAverage,omitempty"` SpeedMax *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedMax,omitempty"` } `json:"Wind,omitempty"` } `json:"Aggregated5minutes,omitempty"` Air *struct { Dewpoint *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Dewpoint,omitempty"` RelativeHumidity *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"RelativeHumidity,omitempty"` Temperature *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Temperature,omitempty"` VisibleDistance *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"VisibleDistance,omitempty"` } `json:"Air,omitempty"` DeicingChemical *struct { Amount *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Amount,omitempty"` } `json:"DeicingChemical,omitempty"` Deleted *bool `json:"Deleted,omitempty"` ID *string `json:"Id,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` Measurepoint *struct { ID *int `json:"Id,omitempty"` Name *string `json:"Name,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` } `json:"Measurepoint,omitempty"` Sample *time.Time `json:"Sample,omitempty"` Subsurface *struct { Ground []struct { Depth *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Depth,omitempty"` Temperature *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Temperature,omitempty"` } `json:"Ground,omitempty"` } `json:"Subsurface,omitempty"` Surface *struct { Grip *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Grip,omitempty"` Ice *bool `json:"Ice,omitempty"` IceDepth *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"IceDepth,omitempty"` Snow *bool `json:"Snow,omitempty"` SnowDepth *struct { Solid *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Solid,omitempty"` WaterEquivalent *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"WaterEquivalent,omitempty"` } `json:"SnowDepth,omitempty"` Temperature *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Temperature,omitempty"` Water *bool `json:"Water,omitempty"` WaterDepth *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"WaterDepth,omitempty"` } `json:"Surface,omitempty"` Wind [2]struct { Direction *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Direction,omitempty"` Height *int `json:"Height,omitempty"` Speed *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Speed,omitempty"` } `json:"Wind,omitempty"` }
type WeatherObservation2Dot0 ¶ added in v0.4.0
type WeatherObservation2Dot0 struct { Aggregated10Minutes *struct { Precipitation *struct { Rain *bool `json:"Rain,omitempty"` RainSum *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"RainSum"` Snow *bool `json:"Snow,omitempty"` SnowSum *struct { Solid *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"Solid,omitempty"` } `json:"SnowSum,omitempty"` TotalWaterEquivalent *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"TotalWaterEquivalent,omitempty"` } `json:"Precipitation,omitempty"` Wind *struct { Height *int `json:"Height,omitempty"` SpeedAverage *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedAverage,omitempty"` SpeedMax *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedMax,omitempty"` } `json:"Wind,omitempty"` } `json:"Aggregated10minutes,omitempty"` Aggregated30Minutes *struct { Precipitation *struct { Rain *bool `json:"Rain,omitempty"` RainSum *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"RainSum"` Snow *bool `json:"Snow,omitempty"` SnowSum *struct { Solid *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"Solid,omitempty"` } `json:"SnowSum,omitempty"` TotalWaterEquivalent *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"TotalWaterEquivalent,omitempty"` } `json:"Precipitation,omitempty"` Wind *struct { Height *int `json:"Height,omitempty"` SpeedAverage *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedAverage,omitempty"` SpeedMax *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedMax,omitempty"` } `json:"Wind,omitempty"` } `json:"Aggregated30minutes,omitempty"` Aggregated5Minutes struct { Precipitation *struct { Rain *bool `json:"Rain,omitempty"` RainSum *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"RainSum"` Snow *bool `json:"Snow,omitempty"` SnowSum *struct { Solid *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"Solid,omitempty"` } `json:"SnowSum,omitempty"` TotalWaterEquivalent *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *int `json:"Value,omitempty"` } `json:"TotalWaterEquivalent,omitempty"` } `json:"Precipitation,omitempty"` Wind *struct { Height *int `json:"Height,omitempty"` SpeedAverage *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedAverage,omitempty"` SpeedMax *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"SpeedMax,omitempty"` } `json:"Wind,omitempty"` } `json:"Aggregated5minutes,omitempty"` Air *struct { Dewpoint *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Dewpoint,omitempty"` RelativeHumidity *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"RelativeHumidity,omitempty"` Temperature *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Temperature,omitempty"` VisibleDistance *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"VisibleDistance,omitempty"` } `json:"Air,omitempty"` DeicingChemical *struct { Amount *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Amount,omitempty"` } `json:"DeicingChemical,omitempty"` Deleted *bool `json:"Deleted,omitempty"` ID *string `json:"Id,omitempty"` ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` Measurepoint *struct { ID *int `json:"Id,omitempty"` Name *string `json:"Name,omitempty"` Geometry *Geometry `json:"Geometry,omitempty"` } `json:"Measurepoint,omitempty"` Sample *time.Time `json:"Sample,omitempty"` Subsurface *struct { Ground []struct { Depth *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Depth,omitempty"` Temperature *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Temperature,omitempty"` } `json:"Ground,omitempty"` } `json:"Subsurface,omitempty"` Surface *struct { Grip *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Grip,omitempty"` Ice *bool `json:"Ice,omitempty"` IceDepth *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"IceDepth,omitempty"` Snow *bool `json:"Snow,omitempty"` SnowDepth *struct { Solid *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Solid,omitempty"` WaterEquivalent *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"WaterEquivalent,omitempty"` } `json:"SnowDepth,omitempty"` Temperature *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Temperature,omitempty"` Water *bool `json:"Water,omitempty"` WaterDepth *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"WaterDepth,omitempty"` } `json:"Surface,omitempty"` Weather *struct { Precipitation *PrecipitationTypeMeasure `json:"Precipitation,omitempty"` } `json:"Weather,omitempty"` Wind [2]struct { Direction *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Direction,omitempty"` Height *int `json:"Height,omitempty"` Speed *struct { Origin *Origin `json:"Origin,omitempty"` SensorNames *string `json:"SensorNames,omitempty"` Value *float64 `json:"Value,omitempty"` } `json:"Speed,omitempty"` } `json:"Wind,omitempty"` }
type WeatherStation1Dot0 ¶ added in v0.2.0
type WeatherStation1Dot0 struct { // Active indicates this station is returning data Active *bool `json:"Active,omitempty"` // County is the Swedish county in which this station is located County []County `json:"CountyNo,omitempty"` // Deleted indicates if this is a deleted object. This should only // ever be true if you created a Query with IncludeDeletedItems Deleted *bool `json:"Deleted,omitempty"` // Geometry contains coordinates for where this station is located Geometry *Geometry `json:"Geometry,omitempty"` IconID *string `json:"IconId,omitempty"` // ID is the unique ID identifying this station ID *string `json:"Id,omitempty"` // Measurement represents measurement data from environmental sensors Measurement *struct { // Air contains the typical things like relative humidity and temperature // as measured in the air Air *struct { // RelativeHumidity is the relative humidity in percent RelativeHumidity *float64 `json:"RelativeHumidity,omitempty"` // Temperature is measured in degrees Celsius Temperature *float64 `json:"Temp,omitempty"` TemperatureIconID *string `json:"TempIconId,omitempty"` } `json:"Air,omitempty"` // MeasurTime indicates when these values where recorded MeasureTime *time.Time `json:"MeasureTime,omitempty"` // Precipitation contains the type and amount of precipitation Precipitation *struct { // Amount is the mount of rain in mm per hour. It's worth noting // that in practice it turns out the absence of a value indicates // "no rain", i.e precipitation of 0, not "this station doesn't // report precipitation", unless Measurement was Excluded by the // Query Amount *float64 `json:"Amount,omitempty"` // AmountName is a predefined string describing the type and amount // of precipitation in Swedish AmountName *PrecipitationAmount `json:"AmountName,omitempty"` // Type is a predefined string describing the type of precipitation // in Swedish Type *PrecipitationType `json:"Type,omitempty"` TypeIconID *string `json:"TypeIconId,omitempty"` } `json:"Precipitation,omitempty"` // Road contains the temperature as measured at the road deck level. // This can be much higher or lower than the Air values Road *struct { // Temperature is measured in degrees Celsius Temperature *float64 `json:"Temp,omitempty"` TemperatureIconID *string `json:"TempIconId,omitempty"` } `json:"Road,omitempty"` // Wind contains wind direction and strength Wind *struct { // Direction is represented in degrees Direction *float64 `json:"Direction,omitempty"` DirectionIconID *string `json:"DirectionIconId,omitempty"` // DirectionText is a predefined string representing the wind // direction in Swedish DirectionText *WindDirection `json:"DirectionText,omitempty"` // Force is the 10 minute average in m/sec Force *float64 `json:"Force,omitempty"` // ForceMax is the 30 minute max in m/sec ForceMax *float64 `json:"ForceMax,omitempty"` } `json:"Wind,omitempty"` } `json:"Measurement,omitempty"` // MeasurementHistory contains multiple instances of Measurement // over time. See the comments on Measurement for how to interpret // the data MeasurementHistory []struct { Air *struct { RelativeHumidity *float64 `json:"RelativeHumidity,omitempty"` Temperature *float64 `json:"Temp,omitempty"` TemperatureIconID *string `json:"TempIconId,omitempty"` } `json:"Air,omitempty"` MeasureTime *time.Time `json:"MeasureTime,omitempty"` Precipitation *struct { Amount *float64 `json:"Amount,omitempty"` AmountName *PrecipitationAmount `json:"AmountName,omitempty"` Type *PrecipitationType `json:"Type,omitempty"` TypeIconID *string `json:"TypeIconId,omitempty"` } `json:"Precipitation,omitempty"` Road *struct { Temperature *float64 `json:"Temp,omitempty"` TemperatureIconID *string `json:"TempIconId,omitempty"` } `json:"Road,omitempty"` Wind *struct { Direction *float64 `json:"Direction,omitempty"` DirectionIconID *string `json:"DirectionIconId,omitempty"` DirectionText *WindDirection `json:"DirectionText,omitempty"` Force *float64 `json:"Force,omitempty"` ForceMax *float64 `json:"ForceMax,omitempty"` } `json:"Wind,omitempty"` } `json:"MeasurementHistory,omitempty"` // ModifiedTime represents when this object was last modified ModifiedTime *time.Time `json:"ModifiedTime,omitempty"` // Name is the name of the station Name *string `json:"Name,omitempty"` // RoadNumber is the Swedish road number this station is located at RoadNumber *int `json:"RoadNumberNumeric,omitempty"` }
WeatherStation1Dot0 is the WeatherStation v1.0 model. It returns all kinds of environmental data
type WindDirection ¶ added in v0.2.0
type WindDirection string
const ( WindDirectionN WindDirection = "Norr" WindDirectionNE WindDirection = "Nordöst" WindDirectionNNE WindDirection = "Nordnordöst" WindDirectionNNW WindDirection = "Nordnordväst" WindDirectionNW WindDirection = "Nordväst" WindDirectionE WindDirection = "Öst" WindDirectionESE WindDirection = "Östsydöst" WindDirectionS WindDirection = "Söder" WindDirectionSE WindDirection = "Sydöst" WindDirectionSSW WindDirection = "Sydsydväst" WindDirectionSW WindDirection = "Sydväst" WindDirectionW WindDirection = "Väst" )