Documentation
¶
Overview ¶
Package weather provides support for managing weather data in the database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("weather not found")
)
Set of error variables for CRUD operations.
Functions ¶
This section is empty.
Types ¶
type City ¶
type City struct {
ID string `json:"id"`
}
City is used to capture the city id in relationships.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages the set of API's for city access.
func (Store) QueryByCity ¶
QueryByCity returns the specified weather from the database by the city id.
type Weather ¶
type Weather struct { ID string `json:"id,omitempty"` City City `json:"city"` CityName string `json:"city_name"` Visibility string `json:"visibility"` Desc string `json:"description"` Temp float64 `json:"temp"` FeelsLike float64 `json:"feels_like"` MinTemp float64 `json:"temp_min"` MaxTemp float64 `json:"temp_max"` Pressure int `json:"pressure"` Humidity int `json:"humidity"` WindSpeed float64 `json:"wind_speed"` WindDirection int `json:"wind_direction"` Sunrise int `json:"sunrise"` Sunset int `json:"sunset"` }
Weather contains the weather data points captured from the API.
Click to show internal directories.
Click to hide internal directories.