weather/types.go

25 lines
591 B
Go
Raw Normal View History

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
2019-09-08 12:41:25 +02:00
InfluxURL string
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"`
}
Points map[string]interface{}
2019-07-07 13:09:55 +02:00
}