Documentation
¶
Index ¶
- func GeocodeZip(zipCode string) (float64, float64, string, string, error)
- func GetAlertDisplay(alerts []Alert) (emoji string, color lipgloss.Color, text string)
- func GetEmoji(conditions string) string
- func GetNearestRadarStation(lat, lon float64) (string, error)
- func GetWindArrow(degrees int) string
- type Alert
- type ForecastPeriod
- type WindData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GeocodeZip ¶
GeocodeZip converts a ZIP code to coordinates and location information
func GetAlertDisplay ¶
GetAlertDisplay returns emoji, color, and text for weather alerts
func GetNearestRadarStation ¶
GetNearestRadarStation returns the nearest NWS radar station for given coordinates
func GetWindArrow ¶
GetWindArrow returns the unicode arrow for a compass direction in degrees
Types ¶
type Alert ¶
type Alert struct {
Event string
Severity string
Urgency string
Headline string
Description string
Expires time.Time
}
Alert represents a weather alert
func FetchAlerts ¶
FetchAlerts fetches weather alerts for the given coordinates
type ForecastPeriod ¶
type ForecastPeriod struct {
Name string
Temperature int
TempUnit string
WindSpeed string
WindDir string
ShortFcast string
IsDaytime bool
}
ForecastPeriod represents a single forecast period
func FetchForecast ¶
func FetchForecast(lat, lon float64) []ForecastPeriod
FetchForecast fetches a compact forecast for the given coordinates
Click to show internal directories.
Click to hide internal directories.