weather/types.go
2019-08-12 18:18:32 +02:00

26 lines
616 B
Go

package main
// WeatherConfig is the main configuration
type WeatherConfig struct {
WeatherAppID string
WeatherCities []string
WeatherMeasurements []string
InfluxHost string
InfluxPort int
InfluxAddr string
InfluxUser string
InfluxPass string
InfluxDB string
}
// Data is the struct for temperature and humidity for a city
type Data struct {
City string `json:"name"`
Main struct {
Temperature float64 `json:"temp"`
Humidity int64 `json:"humidity"`
Pressure float64 `json:"pressure"`
}
Points map[string]interface{}
}