weather

package
v0.0.0-...-5ccaff2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PressureTransferConst = 0.7500637554192
	MinWindDeg            = 0
	EastDeg               = 90
	SouthDeg              = 180
	WestDeg               = 270
	MaxWindDeg            = 360
	LayoutTime            = "15:40"
)

Variables

This section is empty.

Functions

func CloudsAllToEmoji

func CloudsAllToEmoji(cloudsAll int) string

func CurrentByName

func CurrentByName(update *tgbotapi.Update, bot **tgbotapi.BotAPI, userStates *map[int]user.State)

func CurrentSendLocation

func CurrentSendLocation(update *tgbotapi.Update, bot **tgbotapi.BotAPI, userStates *map[int]user.State)

func DegToDirection

func DegToDirection(deg float64) string

func FillWeatherFuncs

func FillWeatherFuncs(stateFuncDict *map[int]user.StateFunc)

func ForecastByLocation

func ForecastByLocation(update *tgbotapi.Update, bot **tgbotapi.BotAPI, userStates *map[int]user.State)

func ForecastByName

func ForecastByName(update *tgbotapi.Update, bot **tgbotapi.BotAPI, userStates *map[int]user.State)

func ForecastOutput

func ForecastOutput(w *owm.Forecast5WeatherList) string

func SendForecast

func SendForecast(w *owm.ForecastWeatherData, update *tgbotapi.Update, bot **tgbotapi.BotAPI)

func SendInternalWeatherAPIError

func SendInternalWeatherAPIError(update *tgbotapi.Update, bot **tgbotapi.BotAPI)

func SendWrongLocation

func SendWrongLocation(update *tgbotapi.Update, bot **tgbotapi.BotAPI)

func SendWrongPlaceName

func SendWrongPlaceName(update *tgbotapi.Update, bot **tgbotapi.BotAPI)

func TransferToMmHg

func TransferToMmHg(pressure float64) float64

func WeatherIdToEmoji

func WeatherIdToEmoji(weatherID int) string

func WeatherOutput

func WeatherOutput(w *owm.CurrentWeatherData) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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