Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Points *PointsService GridPoints *GridPointsService // contains filtered or unexported fields }
Client .
type Fault ¶
type Fault struct { CorrelationID string `json:"correlationId"` Title string `json:"title"` Type string `json:"type"` Status int `json:"status"` Detail string `json:"detail"` Instance string `json:"instance"` }
Fault .
type Forecast ¶
type Forecast struct { Context []interface{} `json:"@context"` Type string `json:"type"` Geometry struct { Type string `json:"type"` Coordinates [][][]float64 `json:"coordinates"` } `json:"geometry"` Properties struct { Updated time.Time `json:"updated"` Units string `json:"units"` ForecastGenerator string `json:"forecastGenerator"` GeneratedAt time.Time `json:"generatedAt"` UpdateTime time.Time `json:"updateTime"` // formatted as => 2020-10-17T15:00:00+00:00/P7DT10H ValidTimes string `json:"validTimes"` Elevation *Elevation `json:"elevation"` Periods []*Period `json:"periods"` } `json:"properties"` }
type GridPoint ¶
type GridPoint struct { ID string `json:"id"` Type string `json:"type"` Geometry struct { Type string `json:"type"` Coordinates []float64 `json:"coordinates"` } `json:"geometry"` Properties struct { ID string `json:"@id"` Type string `json:"@type"` CWA string `json:"cwa"` ForecastOffice string `json:"forecastOffice"` GridID string `json:"gridId"` GridX int `json:"gridX"` GridY int `json:"gridY"` Forecast string `json:"forecast"` ForecastHourly string `json:"forecastHourly"` ForecastGridData string `json:"forecastGridData"` ObservationStations string `json:"observationStations"` RelativeLocation struct { Type string `json:"type"` Geometry struct { Type string `json:"type"` Coordinates []float64 `json:"coordinates"` } `json:"geometry"` Properties struct { City string `json:"city"` State string `json:"state"` Distance struct { Value float64 `json:"value"` UnitCode string `json:"unitCode"` } `json:"distance"` Bearing struct { Value int `json:"value"` UnitCode string `json:"unitCode"` } `json:"bearing"` } `json:"properties"` } `json:"relativeLocation"` ForecastZone string `json:"forecastZone"` County string `json:"county"` FireWeatherZone string `json:"fireWeatherZone"` TimeZone string `json:"timeZone"` RadarStation string `json:"radarStation"` } `json:"properties"` }
GridPoint .
type Option ¶
Option provides a configuration mechanism for a Client
func WithHTTPClient ¶
WithHTTPClient sets the underlying http client.
func WithHTTPTracing ¶
WithHTTPTracing enables tracing http calls.
func WithTransport ¶
func WithTransport(t http.RoundTripper) Option
WithTransport sets the underlying http client transport.
type Period ¶
type Period struct { Number int `json:"number"` Name string `json:"name"` StartTime string `json:"startTime"` EndTime string `json:"endTime"` IsDaytime bool `json:"isDaytime"` Temperature int `json:"temperature"` TemperatureUnit string `json:"temperatureUnit"` TemperatureTrend string `json:"temperatureTrend"` WindSpeed string `json:"windSpeed"` WindDirection string `json:"windDirection"` Icon string `json:"icon"` ShortForecast string `json:"shortForecast"` DetailedForecast string `json:"detailedForecast"` }
type PointsService ¶
type PointsService service
PointsService .
func (*PointsService) Forecast ¶
func (s *PointsService) Forecast(ctx context.Context, opts wx.ForecastOptions) (*Forecast, error)
Forecast weather conditions
func (*PointsService) ForecastHourly ¶
func (s *PointsService) ForecastHourly(ctx context.Context, opts wx.ForecastOptions) (*Forecast, error)
ForecastHourly weather conditions
Click to show internal directories.
Click to hide internal directories.