Documentation
¶
Index ¶
Constants ¶
View Source
const CreateVehiclesSQL = `` /* 418-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BustimeData ¶
type BustimeResponse ¶
type BustimeResponse struct {
Data BustimeData `json:"bustime-response"`
}
type Storage ¶
func NewStorage ¶
type Vehicle ¶
type Vehicle struct {
Vid string `json:"vid"`
Tmstmp VehicleTimestamp `json:"tmstmp"`
SrvTimstmp VehicleTimestamp `json:"srvtmstmp"`
Lat float64 `json:"lat,string"`
Lon float64 `json:"lon,string"`
Hdg string `json:"hdg"`
Rt string `json:"rt"`
Tatripid string `json:"tatripid"`
Tablockid string `json:"tablockid"`
Zone string `json:"zone"`
Oid string `json:"oid"`
Rid string `json:"rid"`
Des string `json:"des"`
Pdist int `json:"pdist"`
Pid int `json:"pid"`
Spd int `json:"spd"`
Blk int `json:"blk"`
Tripid int `json:"tripid"`
Dly bool `json:"dly"`
Or bool `json:"or"`
}
Vehicle represents an individual reading of a vehicle and it's location at that point in time Example:
{
"vid": "155",
"tmstmp": "20200827 11:51",
"lat": "29.962149326173048",
"lon": "-90.05214051918121",
"hdg": "357",
"pid": 275,
"rt": "5",
"des": "Saratoga at Canal",
"pdist": 10122,
"dly": false,
"spd": 20,
"tatripid": "3130339",
"tablockid": "15",
"zone": "",
"srvtmstmp": "20200827 11:51",
"oid": "445",
"or": true,
"rid": "501",
"blk": 2102,
"tripid": 982856020
}
type VehicleTimestamp ¶
func (*VehicleTimestamp) UnmarshalJSON ¶
func (t *VehicleTimestamp) UnmarshalJSON(data []byte) error
UnmarshalJSON We need a special unmarshal method for this string timetstamp. it's of the form "YYYYMMDD hh:mm"
Click to show internal directories.
Click to hide internal directories.