Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { types.BaseAPI Config types.WeatherConfig LastCalled time.Time `json:"-"` // This is the object we get from the backend API - we could possible remove this and just have the ResponseObject DataObject OpenWeatherResponse `json:"-"` // This is the object we are passing to the frontend - only need to rebuild it when its stale ResponseObject types.WeatherResponse `json:"-"` ValidCache bool }
API for weather
func (*API) Configure ¶
func (a *API) Configure(message types.ClientMessage) error
Configure for weather
type OpenWeatherResponse ¶
type OpenWeatherResponse struct { Coord coord Weather []weather Base string Main main Visibility float64 Wind wind Rain rain Clouds clouds DT float64 Sys sys Timezone float64 ID float64 Name string COD float64 }
OpenWeatherResponse is the struct that encodes the API data from openweathermap.org
func (*OpenWeatherResponse) Transform ¶
func (o *OpenWeatherResponse) Transform() interface{}
Transform turns the OpenWeatherResponse into a WeatherResponse
func (*OpenWeatherResponse) Update ¶
func (o *OpenWeatherResponse) Update(arguments interface{}) error
Update builds the data object
Click to show internal directories.
Click to hide internal directories.