Documentation ¶
Index ¶
- Constants
- type Alexa
- func (a *Alexa) OnIntent(...)
- func (a *Alexa) OnLaunch(handler func(a *Alexa, req *Request, session *Session) *Response)
- func (a *Alexa) OnSessionEnded(handler func(a *Alexa, req *Request, session *Session) *Response)
- func (a *Alexa) Process(msg json.RawMessage) (*Response, error)
- func (a *Alexa) Response() *Response
- type Card
- type Event
- type Handler
- type Intent
- type IntentHandler
- type IntentHandlerFunc
- type LaunchHandler
- type LaunchHandlerFunc
- type OutputSpeech
- type Reprompt
- type Request
- type Response
- func (r *Response) AddLinkAccountCard() *Response
- func (r *Response) AddPlainTextReprompt(text string) *Response
- func (r *Response) AddPlainTextSpeech(text string) *Response
- func (r *Response) AddSSMLReprompt(ssml string) *Response
- func (r *Response) AddSSMLSpeech(ssml string) *Response
- func (r *Response) AddSessionAttributes(attributes SessionAttributes) *Response
- func (r *Response) AddSimpleCard(title, content string) *Response
- func (r *Response) AddStandardCard(title, text, smallImageUrl, largeImageUrl string) *Response
- func (r *Response) KeepSessionAlive() *Response
- type Session
- type SessionAttributes
- type SessionEndedHandler
- type SessionEndedHandlerFunc
- type Slot
Constants ¶
View Source
const ( REQUEST_TYPE_LAUNCH = "LaunchRequest" REQUEST_TYPE_INTENT = "IntentRequest" REQUEST_TYPE_ENDED = "SessionEndedRequest" REASON_USER_INITIATED = "USER_INITIATED" REASON_ERROR = "ERROR" REASON_EXCEEDED_MAX_REPROMPTS = "EXCEEDED_MAX_REPROMPTS" )
View Source
const ( OUTPUT_SPEECH_TYPE_PLAIN = "PlainText" OUTPUT_SPEECH_TYPE_SSML = "SSML" CARD_TYPE_SIMPLE = "Simple" CARD_TYPE_STANDARD = "Standard" CARD_TYPE_LINK_ACCOUNT = "LinkAccount" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alexa ¶
type Alexa struct {
// contains filtered or unexported fields
}
func (*Alexa) OnSessionEnded ¶
type IntentHandler ¶
type IntentHandlerFunc ¶
func (IntentHandlerFunc) HandleIntent ¶
type LaunchHandler ¶
type LaunchHandlerFunc ¶
func (LaunchHandlerFunc) HandleLaunch ¶
func (fn LaunchHandlerFunc) HandleLaunch(a *Alexa, req *Request, session *Session) *Response
type OutputSpeech ¶
type Reprompt ¶
type Reprompt struct {
OutputSpeech OutputSpeech `json:"outputSpeech,omitempty"`
}
type Response ¶
type Response struct { Version string `json:"version"` SessionAttributes SessionAttributes `json:"sessionAttributes,omitempty"` Response innerResponse `json:"response"` }
func (*Response) AddLinkAccountCard ¶
func (*Response) AddPlainTextReprompt ¶
func (*Response) AddPlainTextSpeech ¶
func (*Response) AddSSMLReprompt ¶
func (*Response) AddSSMLSpeech ¶
func (*Response) AddSessionAttributes ¶
func (r *Response) AddSessionAttributes(attributes SessionAttributes) *Response
func (*Response) AddSimpleCard ¶
func (*Response) AddStandardCard ¶
func (*Response) KeepSessionAlive ¶
type Session ¶
type Session struct { Id string `json:"sessionId"` IsNew bool `json:"new"` Attributes SessionAttributes `json:"attributes"` Application application `json:"application"` User user `json:"user"` }
type SessionAttributes ¶
type SessionAttributes map[string]interface{}
type SessionEndedHandler ¶
type SessionEndedHandlerFunc ¶
func (SessionEndedHandlerFunc) HandleSessionEnded ¶
func (fn SessionEndedHandlerFunc) HandleSessionEnded(a *Alexa, req *Request, session *Session) *Response
Click to show internal directories.
Click to hide internal directories.