2019-07-07 13:09:55 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
// WeatherConfig is the main configuration
|
|
|
|
type WeatherConfig struct {
|
2019-07-14 21:10:20 +02:00
|
|
|
WeatherAppID string
|
|
|
|
WeatherCities []string
|
|
|
|
WeatherMeasurements []string
|
|
|
|
InfluxHost string
|
|
|
|
InfluxPort int
|
2019-08-12 18:13:30 +02:00
|
|
|
InfluxAddr string
|
2019-07-14 21:10:20 +02:00
|
|
|
InfluxUser string
|
|
|
|
InfluxPass string
|
|
|
|
InfluxDB string
|
|
|
|
}
|
|
|
|
|
2019-08-12 18:13:30 +02:00
|
|
|
// Data is the struct for temperature and humidity for a city
|
2019-07-14 21:10:20 +02:00
|
|
|
type Data struct {
|
2019-08-12 18:13:30 +02:00
|
|
|
City string `json:"name"`
|
|
|
|
Main struct {
|
|
|
|
Temperature float64 `json:"temp"`
|
2019-08-12 18:18:32 +02:00
|
|
|
Humidity int64 `json:"humidity"`
|
2019-08-12 18:13:30 +02:00
|
|
|
Pressure float64 `json:"pressure"`
|
|
|
|
}
|
2019-08-12 18:16:02 +02:00
|
|
|
Points map[string]interface{}
|
2019-07-07 13:09:55 +02:00
|
|
|
}
|