Documentation ¶
Index ¶
- Constants
- func FetchData(c *colly.Collector, cb func(Sensor), ecb cfac.ErrorCallback)
- func FetchDataRadius(center cfac.Coordinate, radius float64, c *colly.Collector, cb func(Sensor), ...)
- func FetchDataURL(url string, c *colly.Collector, cb func(Sensor), ecb cfac.ErrorCallback)
- func FetchDust(c *colly.Collector, cb func(Sensor), ecb cfac.ErrorCallback)
- func FetchLabs(coord cfac.Coordinate, c *colly.Collector, cb func(Lab), ...)
- func FetchNoise(c *colly.Collector, cb func(Sensor), ecb cfac.ErrorCallback)
- func FetchTemp(c *colly.Collector, cb func(Sensor), ecb cfac.ErrorCallback)
- type Lab
- type ResponseLabs
- type Sensor
- type SensorDataValues
- type SensorInfo
- type SensorLocation
- type SensorType
Constants ¶
View Source
const ( UrlDataApi = "https://data.sensor.community" UrlDataApiData = UrlDataApi + "/static/v2/data.json" UrlMapsApi = "https://maps.sensor.community" UrlMapsApiData24 = UrlMapsApi + "/data/v2/data.24h.json" UrlMapsApiNoise = UrlMapsApi + "/data/v1/data.noise.json" UrlMapsApiTemp = UrlMapsApi + "/data/v1/data.temp.json" UrlMapsApiDust = UrlMapsApi + "/data/v1/data.dust.json" UrlMapsApiLabs = UrlMapsApi + "/local-labs/labs.json" )
Variables ¶
This section is empty.
Functions ¶
func FetchData ¶
func FetchData(c *colly.Collector, cb func(Sensor), ecb cfac.ErrorCallback)
func FetchDataRadius ¶
func FetchDataRadius(center cfac.Coordinate, radius float64, c *colly.Collector, cb func(Sensor), ecb cfac.ErrorCallback)
func FetchDataURL ¶
func FetchDataURL(url string, c *colly.Collector, cb func(Sensor), ecb cfac.ErrorCallback)
func FetchDust ¶
func FetchDust(c *colly.Collector, cb func(Sensor), ecb cfac.ErrorCallback)
func FetchLabs ¶
func FetchLabs(coord cfac.Coordinate, c *colly.Collector, cb func(Lab), ecb cfac.ErrorCallback)
func FetchNoise ¶
func FetchNoise(c *colly.Collector, cb func(Sensor), ecb cfac.ErrorCallback)
func FetchTemp ¶
func FetchTemp(c *colly.Collector, cb func(Sensor), ecb cfac.ErrorCallback)
Types ¶
type Lab ¶
type Lab struct { Lat float64 `json:"lat"` Lon float64 `json:"lon"` Title string `json:"title"` Text string `json:"text"` MeetingsTitle string `json:"meetings_title"` Meetings []struct { Text string `json:"text"` } `json:"meetings"` ContactsTitle string `json:"contacts_title"` Contacts []struct { Name string `json:"name"` URL string `json:"url"` } `json:"contacts"` Website string `json:"website,omitempty"` Twitter string `json:"twitter,omitempty"` Github string `json:"github,omitempty"` Meetup string `json:"meetup,omitempty"` FacebookPage string `json:"facebook_page,omitempty"` Instagram string `json:"instagram,omitempty"` Telegram string `json:"telegram,omitempty"` Facebook string `json:"facebook,omitempty"` FacebookGroup string `json:"facebook_group,omitempty"` TelegramGroup string `json:"telegram_group,omitempty"` Mastodon string `json:"mastodon,omitempty"` }
type ResponseLabs ¶
type ResponseLabs []Lab
type Sensor ¶
type Sensor struct { Sensor SensorInfo `json:"sensor"` Location SensorLocation `json:"location"` ID int `json:"id"` DataValues []SensorDataValues `json:"sensordatavalues"` Timestamp string `json:"timestamp"` SamplingRate interface{} `json:"sampling_rate"` }
type SensorDataValues ¶
type SensorInfo ¶
type SensorInfo struct { Pin string `json:"pin"` ID int `json:"id"` SensorType SensorType `json:"sensor_type"` }
type SensorLocation ¶
type SensorType ¶
Click to show internal directories.
Click to hide internal directories.