Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct { ID int `json:"ID" db:"primary_key"` ParentID int `json:"ParentID,omitempty" db:"append_only"` Location Location `json:"DEVICE_LOCATIONTYPE,omitempty" db:"ignore"` LastUpdated int64 `json:"LastSeen" db:"value,quality"` Latitude float64 `json:"Lat" db:"value,geo"` Longitude float64 `json:"Lon" db:"value,geo"` PM25 float64 `json:"PM2_5Value,string" db:"value,quality"` }
Response encodes the relevant data from the Purple Air api.
func (*Response) UnmarshalJSON ¶
UnmarshalJSON implements a custom unmarshaller for the Response type. This is to transform the location string into the proper enum type.
Click to show internal directories.
Click to hide internal directories.