Versions in this module Expand all Collapse all v0 v0.1.1 Feb 16, 2026 v0.1.0 Feb 16, 2026 Changes in this version + var WarningTypeToSlug = map[string]string + var WeatherConditions = map[int]*WeatherCondition + func ExitCode(err error) int + func GetWeatherIcon(wwCode int, dayNight string) string + type APIError struct + Err error + Message string + StatusCode int + func (e *APIError) Error() string + func (e *APIError) ExitCode() int + func (e *APIError) Unwrap() error + type Animation struct + Country string + LocalisationLayer string + LocalisationLayerRatioX float64 + LocalisationLayerRatioY float64 + Sequence []*RadarFrame + SequenceHint map[string]string + Speed float64 + Threshold []interface{} + Type string + Unit map[string]string + type Client struct + func NewClient(opts ...ClientOption) *Client + func (c *Client) GetForecast(ctx context.Context, lat, lon float64) (*ForecastResponse, error) + func (c *Client) GetRadar(ctx context.Context, lat, lon float64) (*Animation, error) + type ClientOption func(*Client) + func WithHTTPClient(client *http.Client) ClientOption + func WithLanguage(lang string) ClientOption + func WithNoCache(noCache bool) ClientOption + func WithNoLimit(noLimit bool) ClientOption + func WithVerbose(verbose bool) ClientOption + type DailyForecast struct + DD int + DDText map[string]string + DawnRiseSeconds *string + DawnSetSeconds *string + DayName map[string]string + DayNight string + DayNightPeriod string + FF1 int + FF2 *int + FFEvol *int + Period string + PrecipChance json.Number + PrecipQuantity json.Number + SunRise *int + SunRiseUTC *int + SunSet *int + SunSetUTC *int + TempMax *int + TempMin *int + Text map[string]string + Timestamp *string + UVIndex *float64 + WW1 int + WW2 *int + Wind *Wind + WindSpeedKm *int + WwEvol *int + func (d *DailyForecast) ParsePrecipChance() *int + func (d *DailyForecast) ParsePrecipQuantity() *float64 + type Forecast struct + Daily []*DailyForecast + Graph *Graph + Hourly []*HourlyForecast + Warning []*Warning + type ForecastResponse struct + Animation *Animation + CityName string + Country string + For *Forecast + Module []Module + Obs *Observation + TodayObsCount int + type Graph struct + SVG []*SVGChart + type HourlyForecast struct + DateShow *string + DateShowLocalized map[string]string + DayNight string + Hour string + HourUTC *string + PrecipChance json.Number + PrecipQuantity json.Number + Pressure json.Number + Temp int + WW json.Number + WindDirection json.Number + WindDirectionText map[string]string + WindPeakSpeedKm *int + WindSpeedKm json.Number + func (h *HourlyForecast) ParsePrecipChance() *int + func (h *HourlyForecast) ParsePrecipQuantity() *float64 + func (h *HourlyForecast) ParsePressure() *int + func (h *HourlyForecast) ParseWW() *int + func (h *HourlyForecast) ParseWindDirection() *int + func (h *HourlyForecast) ParseWindSpeedKm() *int + type Module struct + Data json.RawMessage + Type string + func (m *Module) IsEphemerides() bool + func (m *Module) IsPollen() bool + func (m *Module) ParseModuleData() interface{} + type NetworkError struct + Err error + func (e *NetworkError) Error() string + func (e *NetworkError) ExitCode() int + func (e *NetworkError) Unwrap() error + type Observation struct + DayNight string + Municipality *string + MunicipalityCode *string + Temp int + Timestamp string + WW int + WindDirection *int + WindDirectionText map[string]string + WindSpeedKm *int + type ObservationModuleData struct + Count int + Title map[string]string + type ParseError struct + Body []byte + Err error + func (e *ParseError) Error() string + func (e *ParseError) ExitCode() int + func (e *ParseError) Unwrap() error + type RadarFrame struct + Position float64 + PositionHigher float64 + PositionLower float64 + Time string + URI string + Value json.Number + func (r *RadarFrame) ParseTimestamp() (*time.Time, error) + func (r *RadarFrame) ParseValue() *float64 + type RateLimitError struct + Err error + RetryAfter time.Duration + func (e *RateLimitError) Error() string + func (e *RateLimitError) ExitCode() int + func (e *RateLimitError) Unwrap() error + type RateLimiter struct + func NewRateLimiter(rate int, interval time.Duration) *RateLimiter + func (r *RateLimiter) Allow() bool + func (r *RateLimiter) Wait(ctx context.Context) error + type RetryTransport struct + Base http.RoundTripper + BaseDelay time.Duration + MaxRetries int + func NewRetryTransport(base http.RoundTripper) *RetryTransport + func (t *RetryTransport) RoundTrip(req *http.Request) (*http.Response, error) + type SVGChart struct + Ratio float64 + URL map[string]string + type SVGModuleData struct + Ratio float64 + URL map[string]string + type UVModuleData struct + Level map[string]string + LevelValue float64 + Title map[string]string + type Warning struct + FromTimestamp string + IconCountry string + Text map[string]string + ToTimestamp string + WarningLevel string + WarningType *WarningType + type WarningType struct + ID string + Name map[string]string + func (w *WarningType) Slug() string + type WeatherCode int + const CodeClearSky + const CodeDenseDrizzle + const CodeDenseFreezingDrizzle + const CodeDepositingRimeFog + const CodeFog + const CodeHeavyFreezingRain + const CodeHeavyRain + const CodeHeavySnow + const CodeHeavySnowShowers + const CodeLightDrizzle + const CodeLightFreezingDrizzle + const CodeLightFreezingRain + const CodeMainlyClear + const CodeModerateDrizzle + const CodeModerateRain + const CodeModerateRainShowers + const CodeModerateSnow + const CodeOvercast + const CodePartlyCloudy + const CodeSlightRain + const CodeSlightRainShowers + const CodeSlightSnow + const CodeSlightSnowShowers + const CodeSnowGrains + const CodeThunderstorm + const CodeThunderstormHeavyHail + const CodeThunderstormSlightHail + const CodeViolentRainShowers + func (w WeatherCode) Description(lang string) string + func (w WeatherCode) Icon() string + func (w WeatherCode) IsPrecipitation() bool + func (w WeatherCode) IsSevere() bool + func (w WeatherCode) IsValid() bool + func (w WeatherCode) String() string + type WeatherCondition struct + Code int + Condition string + DayIcon string + NightIcon string + func GetWeatherCondition(wwCode int) *WeatherCondition + type Wind struct + Dir int + DirText map[string]string + PeakSpeed json.Number + Speed int + func (w *Wind) ParsePeakSpeed() *int