Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( URL = "https://devapi.qweather.com/v7/" Key = os.Getenv("QWEATHER_KEY") )
WhenIConfess 2021-11-27 00:00
Functions ¶
This section is empty.
Types ¶
type DayPlugin ¶
type DayPlugin struct { }
func NewDayPlugin ¶
func NewDayPlugin() *DayPlugin
func (*DayPlugin) LoveAnniversaryDays ¶
type WeatherPlugin ¶
type WeatherPlugin struct {
// contains filtered or unexported fields
}
func NewWeatherPlugin ¶
func NewWeatherPlugin(key string) *WeatherPlugin
func (*WeatherPlugin) Funcs ¶
func (plugin *WeatherPlugin) Funcs() template.FuncMap
func (*WeatherPlugin) Name ¶
func (plugin *WeatherPlugin) Name() string
func (*WeatherPlugin) Weather ¶
func (plugin *WeatherPlugin) Weather(location string) *WeatherResult
type WeatherResult ¶
type WeatherResult struct { Code string `json:"code"` UpdateTime string `json:"updateTime"` FxLink string `json:"fxLink"` Now struct { ObsTime string `json:"obsTime"` Temp string `json:"temp"` FeelsLike string `json:"feelsLike"` Icon string `json:"icon"` Text string `json:"text"` Wind360 string `json:"wind360"` WindDir string `json:"windDir"` WindScale string `json:"windScale"` WindSpeed string `json:"windSpeed"` Humidity string `json:"humidity"` Precip string `json:"precip"` Pressure string `json:"pressure"` Vis string `json:"vis"` Cloud string `json:"cloud"` Dew string `json:"dew"` } `json:"now"` Refer struct { Sources []string `json:"sources"` License []string `json:"license"` } `json:"refer"` }
Click to show internal directories.
Click to hide internal directories.