speakers

package
v0.0.0-...-6e49c5b Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

All is the ordered list of speakers

View Source
var NoData = "I don't have any forecast information for that time"

NoData means there was no forecast data for the specified time period

Functions

This section is empty.

Types

type Alerts

type Alerts struct{}

func (Alerts) CanSpeak

func (Alerts) CanSpeak(q *alexa.WeatherRequest) bool

func (Alerts) Name

func (Alerts) Name() string

func (Alerts) Speak

func (f Alerts) Speak(loc *tz.Location, forecast *darksky.Forecast, _ *pollen.Forecast, q *alexa.WeatherRequest) string

Speak speaks "the weather|forecast [day] time"

type Current

type Current struct{}

Current handles any request and responds with the current weather information. It is responsible for mainly the following requests but handles any request it is given

the weather the current weather

func (Current) CanSpeak

func (Current) CanSpeak(q *alexa.WeatherRequest) bool

func (Current) Name

func (Current) Name() string

func (Current) Speak

type Forecast

type Forecast struct{}

func (Forecast) CanSpeak

func (Forecast) CanSpeak(*alexa.WeatherRequest) bool

func (Forecast) Name

func (Forecast) Name() string

func (Forecast) Speak

func (f Forecast) Speak(loc *tz.Location, forecast *darksky.Forecast, _ *pollen.Forecast, q *alexa.WeatherRequest) string

Speak speaks "the weather|forecast [day] time"

type LowHigh

type LowHigh struct{}

LowHigh responds to the following queries

the low|high [day] time the low|high

func (LowHigh) CanSpeak

func (lh LowHigh) CanSpeak(q *alexa.WeatherRequest) bool

func (LowHigh) Name

func (LowHigh) Name() string

func (LowHigh) Speak

type Pollen

type Pollen struct{}

Pollen responds to the following queries the pollen for [day]

func (Pollen) CanSpeak

func (Pollen) CanSpeak(q *alexa.WeatherRequest) bool

CanSpeak returns true if this speaker can speak for this query

func (Pollen) Name

func (Pollen) Name() string

Name is the name of this speaker

func (Pollen) Speak

Speak speaks for this query

type Precipitation

type Precipitation struct{}

Precipitation responds to the following queries will it rain|snow [day] time

func (Precipitation) CanSpeak

func (Precipitation) CanSpeak(q *alexa.WeatherRequest) bool

func (Precipitation) Name

func (Precipitation) Name() string

func (Precipitation) Speak

type Speaker

type Speaker interface {
	CanSpeak(*alexa.WeatherRequest) bool
	Speak(*tz.Location, *darksky.Forecast, *pollen.Forecast, *alexa.WeatherRequest) string
	Name() string
}

Jump to

Keyboard shortcuts

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