Documentation ¶
Overview ¶
Package alfalfa contains base elements of the skill project (app, skill).
Index ¶
- func CreateSkillModels(s *skill.SkillBuilder) (map[string]*skill.Model, error)
- func NewSkill() *skill.SkillBuilder
- type Application
- func (a *Application) AWSStatus(loc l10n.LocaleInstance, area, region string) (alexa.Response, error)
- func (a *Application) AWSStatusAreaElicit(l l10n.LocaleInstance, area string) (alexa.Response, error)
- func (a *Application) AWSStatusRegionElicit(l l10n.LocaleInstance, region string) (alexa.Response, error)
- func (a *Application) Demo(l l10n.LocaleInstance) (alexa.Response, error)
- func (a *Application) Help(l l10n.LocaleInstance) (alexa.Response, error)
- func (a *Application) Launch(l l10n.LocaleInstance) (alexa.Response, error)
- func (a *Application) Logger() log.Logger
- func (a *Application) SSMLDemo(l l10n.LocaleInstance) (alexa.Response, error)
- func (a *Application) SaySomething(loc l10n.LocaleInstance, opts ...ResponseFunc) (alexa.Response, error)
- func (a *Application) Statter() stats.Statter
- func (a *Application) Stop(l l10n.LocaleInstance) (alexa.Response, error)
- type Config
- type ResponseFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSkillModels ¶
CreateSkillModels generates and returns a list of Models.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application defines the base application.
func NewApplication ¶
func NewApplication(l log.Logger, s stats.Statter) *Application
NewApplication returns an Application with the logger and statter.
func (*Application) AWSStatus ¶
func (a *Application) AWSStatus(loc l10n.LocaleInstance, area, region string) (alexa.Response, error)
AWSStatus responds with messages containing 2 slots.
func (*Application) AWSStatusAreaElicit ¶
func (a *Application) AWSStatusAreaElicit(l l10n.LocaleInstance, area string) (alexa.Response, error)
AWSStatusAreaElicit will ask for the Area value.
func (*Application) AWSStatusRegionElicit ¶
func (a *Application) AWSStatusRegionElicit(l l10n.LocaleInstance, region string) (alexa.Response, error)
AWSStatusRegionElicit will ask for the Region value.
func (*Application) Demo ¶
func (a *Application) Demo(l l10n.LocaleInstance) (alexa.Response, error)
Demo is a simple demo response.
func (*Application) Help ¶
func (a *Application) Help(l l10n.LocaleInstance) (alexa.Response, error)
Help is the response to a help request.
func (*Application) Launch ¶
func (a *Application) Launch(l l10n.LocaleInstance) (alexa.Response, error)
Launch is the response to the launch request.
func (*Application) Logger ¶
func (a *Application) Logger() log.Logger
Logger returns the application logger.
func (*Application) SSMLDemo ¶
func (a *Application) SSMLDemo(l l10n.LocaleInstance) (alexa.Response, error)
SSMLDemo is the intent to demonstrate SSML output with Alexa.
func (*Application) SaySomething ¶
func (a *Application) SaySomething(loc l10n.LocaleInstance, opts ...ResponseFunc) (alexa.Response, error)
SaySomething handles simple title + text response.
func (*Application) Statter ¶
func (a *Application) Statter() stats.Statter
Statter returns the application statter.
func (*Application) Stop ¶
func (a *Application) Stop(l l10n.LocaleInstance) (alexa.Response, error)
Stop is the response to stop the skill.
type Config ¶
type Config struct {
User string
}
Config defines additional data that can be provided and used in requests.
type ResponseFunc ¶
type ResponseFunc func(cfg *Config)
ResponseFunc defines the function that can optionally be passed to responses.
func WithUser ¶
func WithUser(user string) ResponseFunc
WithUser returns a ResponseFunc that sets the user.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package lambda defines intents, handles requests and calls Application functions accordingly.
|
Package lambda defines intents, handles requests and calls Application functions accordingly. |
middleware
Package middleware for lambda requests Package middleware for lambda requests
|
Package middleware for lambda requests Package middleware for lambda requests |
Package loca contains all localization for the skill.
|
Package loca contains all localization for the skill. |
pkg
|
|
alexa
Package alexa enables parsing request and building responses.
|
Package alexa enables parsing request and building responses. |
alexa/l10n
Package l10n provides locale helpers (LocaleRegistry) and predefined standard keys for Alexa skills
|
Package l10n provides locale helpers (LocaleRegistry) and predefined standard keys for Alexa skills |
alexa/skill
Package skill serves generating the skill and model.
|
Package skill serves generating the skill and model. |
alexa/ssml
Package ssml provides functions to simplify working with SSML speech.
|
Package ssml provides functions to simplify working with SSML speech. |
Package server is a standalone http server (as replacement for lambda)
|
Package server is a standalone http server (as replacement for lambda) |