Documentation ¶
Overview ¶
Package mydemoskill is the core app functionality.
Index ¶
- Variables
- func CreateSkillModels(s *skill.SkillBuilder) (map[string]*skill.Model, error)
- func NewSkill() *skill.SkillBuilder
- type Application
- func (a *Application) Cancel(loc l10n.LocaleInstance, opts ...ResponseFunc) (alexa.Response, error)
- func (a *Application) DoSomething(loc l10n.LocaleInstance, task string, opts ...ResponseFunc) (alexa.Response, error)
- func (a *Application) ElicitServer(loc l10n.LocaleInstance, server string) (alexa.Response, error)
- func (a *Application) Help(loc l10n.LocaleInstance, opts ...ResponseFunc) (alexa.Response, error)
- func (a *Application) Launch(loc l10n.LocaleInstance, opts ...ResponseFunc) (alexa.Response, error)
- func (a *Application) Logger() *logger.Logger
- func (a *Application) Statter() *statter.Statter
- func (a *Application) Stop(loc l10n.LocaleInstance, opts ...ResponseFunc) (alexa.Response, error)
- type Config
- type ResponseFunc
Constants ¶
This section is empty.
Variables ¶
var ErrUnknown = errors.New("something went wrong")
ErrUnknown is the fallback error.
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 *logger.Logger, s *statter.Statter) *Application
NewApplication returns an Application with the logger and statter.
func (*Application) Cancel ¶
func (a *Application) Cancel(loc l10n.LocaleInstance, opts ...ResponseFunc) (alexa.Response, error)
Cancel cancels the skill session.
func (*Application) DoSomething ¶
func (a *Application) DoSomething(loc l10n.LocaleInstance, task string, opts ...ResponseFunc, ) (alexa.Response, error)
DoSomething triggers the start of a server and returns the result.
func (*Application) ElicitServer ¶
func (a *Application) ElicitServer(loc l10n.LocaleInstance, server string) (alexa.Response, error)
ElicitServer reprompts for a valid server name.
func (*Application) Help ¶
func (a *Application) Help(loc l10n.LocaleInstance, opts ...ResponseFunc) (alexa.Response, error)
Help returns a response that explains how to use the skill.
func (*Application) Launch ¶
func (a *Application) Launch(loc l10n.LocaleInstance, opts ...ResponseFunc) (alexa.Response, error)
Launch starts a skill session.
func (*Application) Logger ¶
func (a *Application) Logger() *logger.Logger
Logger returns the application logger.
func (*Application) Statter ¶
func (a *Application) Statter() *statter.Statter
Statter returns the application statter.
func (*Application) Stop ¶
func (a *Application) Stop(loc l10n.LocaleInstance, opts ...ResponseFunc) (alexa.Response, error)
Stop ends the skill session.
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 how to handle requests and returns proper responses.
|
Package lambda defines how to handle requests and returns proper responses. |
middleware
Package middleware contains middlewares for lambda.
|
Package middleware contains middlewares for lambda. |
Package loca contains all translations.
|
Package loca contains all translations. |