Documentation
¶
Index ¶
- Constants
- Variables
- type Alert
- type Arguments
- type Client
- func (c *Client) Get(path string, args Arguments) (Forecast *Forecast, err error)
- func (c *Client) GetCtx(ctx context.Context, path string, args Arguments) (forecast *Forecast, err error)
- func (c *Client) GetForecast(lat, lng string, args Arguments) (forecast *Forecast, err error)
- func (c *Client) GetForecastCtx(ctx context.Context, lat, lng string, args Arguments) (forecast *Forecast, err error)
- func (c *Client) GetRaw(path string, args Arguments, ctx ...context.Context) (body io.ReadCloser, err error)
- func (c *Client) GetTimeMachineForecast(lat, lng string, t time.Time, args Arguments) (forecast *Forecast, err error)
- func (c *Client) GetTimeMachineForecastCtx(ctx context.Context, lat, lng string, t time.Time, args Arguments) (forecast *Forecast, err error)
- type DataBlock
- type DataPoint
- type Flags
- type Forecast
- type Time
Constants ¶
View Source
const DEFAULT_BASEURL = "https://api.darksky.net/forecast"
Variables ¶
View Source
var CurrentOnly = Arguments{"exclude": "minutely,hourly,daily,alerts,flags"}
View Source
var CurrentWithAlerts = Arguments{"exclude": "minutely,hourly,daily,flags"}
View Source
var Defaults = make(Arguments)
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
func (Arguments) ToURLValues ¶
type Client ¶
func (*Client) GetForecast ¶
func (*Client) GetForecastCtx ¶
func (*Client) GetTimeMachineForecast ¶
type DataPoint ¶
type DataPoint struct {
ApparentTemperature float64 `json:"apparentTemperature,omitempty"`
ApparentTemperatureMax float64 `json:"apparentTemperatureMax,omitempty"`
ApparentTemperatureMaxTime *Time `json:"apparentTemperatureMaxTime,omitempty"`
ApparentTemperatureMin float64 `json:"apparentTemperatureMin,omitempty"`
ApparentTemperatureMinTime *Time `json:"apparentTemperatureMinTime,omitempty"`
CloudCover float64 `json:"cloudCover,omitempty"`
DewPoint float64 `json:"dewPoint,omitempty"`
Humidity float64 `json:"humidity,omitempty"`
Icon string `json:"icon,omitempty"`
MoonPhase float64 `json:"moonPhase,omitempty"`
NearestStormBearing float64 `json:"nearestStormBearing,omitempty"`
NearestStormDistance float64 `json:"nearestStormDistance,omitempty"`
Ozone float64 `json:"ozone,omitempty"`
PrecipAccumulation float64 `json:"precipAccumulation"`
PrecipIntensity float64 `json:"precipIntensity"`
PrecipIntensityMax float64 `json:"precipIntensityMax"`
PrecipIntensityMaxTime *Time `json:"precipIntensityMaxTime,omitempty"`
PrecipProbability float64 `json:"precipProbability"`
PrecipType string `json:"precipType"`
Pressure float64 `json:"pressure"`
Summary string `json:"summary"`
SunriseTime float64 `json:"sunriseTime"`
SunsetTime float64 `json:"sunsetTime"`
Temperature float64 `json:"temperature"`
TemperatureMax float64 `json:"temperatureMax"`
TemperatureMaxTime float64 `json:"temperatureMaxTime"`
TemperatureMin float64 `json:"temperatureMin"`
TemperatureMinTime float64 `json:"temperatureMinTime"`
Time Time `json:"time"`
UVIndex float64 `json:"uvIndex"`
UVIndexTime *Time `json:"uvIndexTime,omitempty"`
Visibility float64 `json:"visibility"`
WindBearing float64 `json:"windBearing"`
WindSpeed float64 `json:"windSpeed"`
WindGust float64 `json:"windGust"`
}
type Forecast ¶
type Forecast struct {
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
Timezone string `json:"timezone"`
Currently *DataPoint `json:"currently,omitempty"`
Minutely *DataBlock `json:"minutely,omitempty"`
Hourly *DataBlock `json:"hourly,omitempty"`
Daily *DataBlock `json:"daily,omitempty"`
Alerts []Alert `json:"alerts,omitempty"`
Flags *Flags `json:"flags,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.
