Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiResponse ¶
type DailyRecord ¶
type DailyRecord struct {
Rain int `json:"rain,string"`
Fog int `json:"fog,string"`
Snow int `json:"snow,string"`
Hail int `json:"hail,string"`
Thunder int `json:"thunder,string"`
Tornado int `json:"tornado,string"`
// Humidity float32 `json:"humidity,string"` // sometimes ""
Meantempi DumbFloat `json:"meantempi,string"`
Meanpressurei DumbFloat `json:"meanpressurei,string"`
Precipi DumbFloat `json:"precipi,string"`
}
type HistoryRecord ¶
type HistoryRecord struct {
DailyRecord []DailyRecord `json:"dailysummary"`
HourlyRecords []HourlyRecord `json:"observations"`
}
type HourlyRecord ¶
type HourlyRecord struct {
Time TimeRecord `json:"date"`
Rain int `json:"rain,string"`
Fog int `json:"fog,string"`
Snow int `json:"snow,string"`
Hail int `json:"hail,string"`
Thunder int `json:"thunder,string"`
Tornado int `json:"tornado,string"`
Humidity DumbFloat `json:"hum,string"`
Tempi DumbFloat `json:"tempi,string"`
Pressurei DumbFloat `json:"pressurei,string"`
Precipi DumbFloat `json:"precipi,string"`
// CondString string `json:"conds"`
Cond *Condition `json:"conds"`
}
type Main ¶
type RecordFile ¶
type RecordFile struct {
History HistoryRecord `json:"history"`
Response ApiResponse `json:"response"`
}
type TimeRecord ¶
type WeatherCache ¶
type WeatherCache struct {
URLFile string
// contains filtered or unexported fields
}
func NewWeatherCache ¶
func NewWeatherCache() *WeatherCache
func (*WeatherCache) GetDailyRecord ¶
func (c *WeatherCache) GetDailyRecord(day time.Time) (DailyRecord, error)
func (*WeatherCache) GetHourlyRecord ¶
func (c *WeatherCache) GetHourlyRecord(daytime time.Time) (HourlyRecord, error)
func (*WeatherCache) ReadAll ¶
func (c *WeatherCache) ReadAll() error
Click to show internal directories.
Click to hide internal directories.