Documentation ¶
Index ¶
- Constants
- func FetchHourly(sid string, start, end time.Time, c *colly.Collector, ...) *sync.WaitGroup
- func FetchRecent(c *colly.Collector, cb MeasurementListCallback, ecb cfac.ErrorCallback) *sync.WaitGroup
- func FetchStationMeasurements(c *colly.Collector, cb StationCallback, ecb cfac.ErrorCallback) *sync.WaitGroup
- func FetchStations(c *colly.Collector, cb StationListCallback, ecb cfac.ErrorCallback) *sync.WaitGroup
- func NewMeasurable() cfac.Measurable
- type Measurable
- type Measurement
- type MeasurementListCallback
- type ResponseHourly
- type ResponseRecent
- type ResponseStations
- type Station
- type StationCallback
- type StationListCallback
Constants ¶
View Source
const ( UrlApi = "https://data.waag.org/api/gammasense" UrlApiStations = UrlApi + "/stations" UrlApiHourly = UrlApi + "/hourly?sensor_id={sensor_id}&start={start}&end={end}" // TS: 2021-07-07T20:00:00.000Z UrlApiRecent = UrlApi + "/recent" )
Variables ¶
This section is empty.
Functions ¶
func FetchHourly ¶
func FetchHourly(sid string, start, end time.Time, c *colly.Collector, cb MeasurementListCallback, ecb cfac.ErrorCallback) *sync.WaitGroup
func FetchRecent ¶
func FetchRecent(c *colly.Collector, cb MeasurementListCallback, ecb cfac.ErrorCallback) *sync.WaitGroup
func FetchStationMeasurements ¶
func FetchStationMeasurements(c *colly.Collector, cb StationCallback, ecb cfac.ErrorCallback) *sync.WaitGroup
func FetchStations ¶
func FetchStations(c *colly.Collector, cb StationListCallback, ecb cfac.ErrorCallback) *sync.WaitGroup
func NewMeasurable ¶
func NewMeasurable() cfac.Measurable
Types ¶
type Measurable ¶
type Measurable struct{}
func (*Measurable) Fetch ¶
func (m *Measurable) Fetch(c *colly.Collector, cb cfac.MeasurementCallback, ecb cfac.ErrorCallback) *sync.WaitGroup
type Measurement ¶
type MeasurementListCallback ¶
type MeasurementListCallback func([]Measurement)
type ResponseHourly ¶
type ResponseHourly []Measurement
type ResponseRecent ¶
type ResponseRecent []Measurement
type ResponseStations ¶
type ResponseStations []Station
type Station ¶
type Station struct { SensorType string `json:"sensor_type"` ID string `json:"id"` Coordinates []float32 `json:"coordinates"` Measurement *Measurement `json:"-,omitempty"` }
func (Station) Measure ¶
func (s Station) Measure() []cfac.Measurement
type StationCallback ¶
type StationCallback func(Station)
type StationListCallback ¶
type StationListCallback func([]Station)
Click to show internal directories.
Click to hide internal directories.