Documentation
¶
Index ¶
- type BetterUptimeResponse
- type BetterUptimeSite
- type DepricatedUptimeConfig
- type DepricatedWeatherConfig
- type OpenWeatherResponse
- type UptimeConfig
- type UptimeManager
- type UptimeRobotResponse
- type UptimeRobotSite
- type UptimeSite
- type WeatherConfig
- type WeatherData
- type WeatherManager
- type WeatherProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BetterUptimeResponse ¶ added in v0.3.5
type BetterUptimeResponse struct {
Monitors []BetterUptimeSite `json:"data"`
}
type BetterUptimeSite ¶ added in v0.3.5
type DepricatedUptimeConfig ¶
type DepricatedWeatherConfig ¶
type DepricatedWeatherConfig struct {
OpenWeather struct {
Provider WeatherProvider `env:"OPENWEATHER_PROVIDER" envDefault:"openweathermap"`
APIKey string `env:"OPENWEATHER_API_KEY"`
Units string `env:"OPENWEATHER_TEMP_UNITS" envDefault:"metric"`
Lat float64 `env:"OPENWEATHER_LAT"`
Lon float64 `env:"OPENWEATHER_LON"`
}
UpdateInterval int `env:"OPENWEATHER_UPDATE_INTERVAL" envDefault:"15"`
}
type OpenWeatherResponse ¶
type UptimeConfig ¶
type UptimeManager ¶
type UptimeManager struct {
// contains filtered or unexported fields
}
func NewUptimeManager ¶
func NewUptimeManager(config *UptimeConfig) *UptimeManager
func (*UptimeManager) GetUptime ¶
func (u *UptimeManager) GetUptime() []UptimeSite
type UptimeRobotResponse ¶
type UptimeRobotResponse struct {
Monitors []UptimeRobotSite `json:"monitors"`
}
type UptimeRobotSite ¶
type UptimeSite ¶ added in v0.3.5
type WeatherConfig ¶
type WeatherConfig struct {
Provider WeatherProvider `env:"WEATHER_PROVIDER" envDefault:"openweathermap"`
APIKey string `env:"WEATHER_API_KEY"`
Units string `env:"WEATHER_TEMP_UNITS" envDefault:"metric"`
Lat float64 `env:"WEATHER_LAT"`
Lon float64 `env:"WEATHER_LON"`
UpdateInterval int `env:"WEATHER_UPDATE_INTERVAL" envDefault:"15"`
}
type WeatherData ¶
type WeatherManager ¶
type WeatherManager struct {
// contains filtered or unexported fields
}
func NewWeatherManager ¶
func NewWeatherManager(config *WeatherConfig) *WeatherManager
func (*WeatherManager) GetWeather ¶
func (c *WeatherManager) GetWeather() WeatherData
type WeatherProvider ¶
type WeatherProvider string
const (
OpenWeatherMap WeatherProvider = "openweathermap"
)
Click to show internal directories.
Click to hide internal directories.