Documentation ¶
Index ¶
- Constants
- func ParseString(text string) string
- type Context
- type DeviceLocationResponse
- type Directives
- type Image
- type Intent
- type Payload
- type Reprompt
- type ReqBody
- type Request
- type ResBody
- type Resolutions
- type Response
- func NewDefaultErrorResponse() Response
- func NewLaunchRequestGetPermissionsResponse() Response
- func NewPermissionsRequestResponse() Response
- func NewSSMLResponse(title string, text string) Response
- func NewSimpleResponse(title string, text string) Response
- func NewUnsupportedLocationResponse() Response
- type SSML
- type SSMLBuilder
- type Session
- type Slot
- type UpdatedIntent
Constants ¶
View Source
const ( HelpIntent = "AMAZON.HelpIntent" CancelIntent = "AMAZON.CancelIntent" StopIntent = "AMAZON.StopIntent" )
Variables ¶
This section is empty.
Functions ¶
func ParseString ¶
Types ¶
type Context ¶
type Context struct { System struct { APIAccessToken string `json:"apiAccessToken"` APIEndpoint string `json:"apiEndpoint"` Device struct { DeviceID string `json:"deviceId,omitempty"` } `json:"device,omitempty"` Application struct { ApplicationID string `json:"applicationId,omitempty"` } `json:"application,omitempty"` } `json:"System,omitempty"` }
type DeviceLocationResponse ¶
type Directives ¶
type Directives struct { Type string `json:"type,omitempty"` SlotToElicit string `json:"slotToElicit,omitempty"` UpdatedIntent *UpdatedIntent `json:"UpdatedIntent,omitempty"` PlayBehavior string `json:"playBehavior,omitempty"` AudioItem struct { Stream struct { Token string `json:"token,omitempty"` URL string `json:"url,omitempty"` OffsetInMilliseconds int `json:"offsetInMilliseconds,omitempty"` } `json:"stream,omitempty"` } `json:"audioItem,omitempty"` }
type Payload ¶
type Payload struct { Type string `json:"type,omitempty"` Title string `json:"title,omitempty"` Text string `json:"text,omitempty"` SSML string `json:"ssml,omitempty"` Content string `json:"content,omitempty"` Image Image `json:"image,omitempty"` Permissions []string `json:"permissions,omitempty"` }
type ResBody ¶
type ResBody struct { OutputSpeech *Payload `json:"outputSpeech,omitempty"` Card *Payload `json:"card,omitempty"` Reprompt *Reprompt `json:"reprompt,omitempty"` Directives []Directives `json:"directives,omitempty"` ShouldEndSession bool `json:"shouldEndSession"` }
type Resolutions ¶
type Response ¶
type Response struct { Version string `json:"version"` SessionAttributes map[string]interface{} `json:"sessionAttributes,omitempty"` Body ResBody `json:"response"` }
func NewDefaultErrorResponse ¶
func NewDefaultErrorResponse() Response
func NewLaunchRequestGetPermissionsResponse ¶
func NewLaunchRequestGetPermissionsResponse() Response
func NewPermissionsRequestResponse ¶
func NewPermissionsRequestResponse() Response
func NewSSMLResponse ¶
func NewSimpleResponse ¶
func NewUnsupportedLocationResponse ¶
func NewUnsupportedLocationResponse() Response
type SSMLBuilder ¶
type SSMLBuilder struct {
SSML []SSML
}
func (*SSMLBuilder) Build ¶
func (builder *SSMLBuilder) Build() string
func (*SSMLBuilder) Pause ¶
func (builder *SSMLBuilder) Pause(pause string)
func (*SSMLBuilder) Say ¶
func (builder *SSMLBuilder) Say(text string)
type Session ¶
type Session struct { New bool `json:"new"` SessionID string `json:"sessionId"` Application struct { ApplicationID string `json:"applicationId"` } `json:"application"` Attributes map[string]interface{} `json:"attributes"` User struct { UserID string `json:"userId"` AccessToken string `json:"accessToken,omitempty"` } `json:"user"` }
type Slot ¶
type Slot struct { Name string `json:"name"` Value string `json:"value"` Resolutions Resolutions `json:"resolutions"` }
type UpdatedIntent ¶
Click to show internal directories.
Click to hide internal directories.