Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct { DeviceID string `json:"deviceid"` CountedCars int `json:"countedcars"` ProcessTime time.Time `json:"appprocesstime"` RoadName string `json:"road_name"` RoadInfo string `json:"road_info"` AverageSpeed float64 `json:"average_speed"` }
Data describes the data returned by the traffic API.
type List ¶
type List []Data
List is a representation of a Data array.
func (List) FilterByRoadName ¶
FilterByRoadName filters a traffic List by the road name and returns a new list that contains only the filtered data.
Click to show internal directories.
Click to hide internal directories.