weather

package
v1.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2020 License: MIT Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWeatherCommand

func NewWeatherCommand(slackClient client.SlackClient, cfg config.OpenWeather) bot.Command

NewWeatherCommand is using OpenWeatherMap to display current weather and the forecast

Types

type Clouds

type Clouds struct {
	All int `json:"all"`
}

type Coord

type Coord struct {
	Lon float64 `json:"lon"`
	Lat float64 `json:"lat"`
}

type CurrentWeatherResponse

type CurrentWeatherResponse struct {
	Coord   Coord     `json:"coord"`
	Weather []Weather `json:"weather"`
	Main    Main      `json:"main"`
	Wind    Wind      `json:"wind"`
	Rain    Rain      `json:"rain"`
	Clouds  Clouds    `json:"clouds"`
	Sys     Sys       `json:"sys"`
	Dt      int       `json:"dt"`
	ID      int       `json:"id"`
	Name    string    `json:"name"`
}

type Main

type Main struct {
	Temp     float64 `json:"temp"`
	Pressure int     `json:"pressure"`
	Humidity int     `json:"humidity"`
	TempMin  float64 `json:"temp_min"`
	TempMax  float64 `json:"temp_max"`
}

type Rain

type Rain struct {
	Threehr int `json:"3h"`
}

type Sys

type Sys struct {
	Country string `json:"country"`
	Sunrise int    `json:"sunrise"`
	Sunset  int    `json:"sunset"`
}

type Weather

type Weather struct {
	ID          int    `json:"id"`
	Main        string `json:"main"`
	Description string `json:"description"`
	Icon        string `json:"icon"`
}

type Wind

type Wind struct {
	Speed float64 `json:"speed"`
	Deg   float64 `json:"deg"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL