Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
AllUnitTypes = []UnitType{UnitTypeScientific, UnitTypeImperial, UnitTypeMetric}
)
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (Handler) GetWeather ¶
func (h Handler) GetWeather(w http.ResponseWriter, r *http.Request)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(weatherClient openweather.Client) Service
type TemperatureType ¶
type TemperatureType string
const ( TemperatureTypeHot TemperatureType = "hot" TemperatureTypeCold TemperatureType = "cold" TemperatureTypeModerate TemperatureType = "moderate" )
type WeatherData ¶
type WeatherData struct { Temperature float64 `json:"temperature"` UnitType UnitType `json:"unit_type"` Conditions []string `json:"conditions"` TemperatureType TemperatureType `json:"temperature_type"` }
Click to show internal directories.
Click to hide internal directories.