Versions in this module Expand all Collapse all v0 v0.1.0 Jul 2, 2025 Changes in this version + func WithBaseURL(u string) option + func WithHTTPClient(hc *http.Client) option + func WithResolver(rs func(context.Context, string) (Location, error)) option + func WithUserAgent(ua string) option + type Client struct + BaseURL string + Debug io.Writer + HTTPClient *http.Client + Resolve func(context.Context, string) (Location, error) + UserAgent string + func NewClient(opts ...option) (*Client, error) + func (c *Client) Forecast(ctx context.Context, lat, long float64) (Forecast, error) + func (c *Client) GetWeather(ctx context.Context, place string) (Weather, error) + func (c *Client) GetWeatherForCoordinates(ctx context.Context, lat, long float64) (Weather, error) + type CurrentWeather struct + Precipitation float64 + PressureAtSeaLevel float64 + Temperature float64 + Time time.Time + UpdatedAt time.Time + type Forecast struct + Hourly []HourlyForecast + UpdatedAt time.Time + type HourlyForecast struct + AirPressure float64 + AirTemperature float64 + CloudAreaFraction float64 + PrecipitationAmount float64 + RelativeHumidity float64 + Summary string + Time time.Time + WindFromDirection float64 + WindSpeed float64 + type Location struct + Lat float64 + Long float64 + type Weather struct + Summary string + Temp float64 + func GetWeather(location string) (Weather, error) + func (w Weather) String() string