Help us shape the future of Go! Take the 2026 Go Developer Survey

alexa

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2018 License: MIT Imports: 15 Imported by: 2

README

FSM

Alexa

Alexa is an Amazon Alexa target for fsm.

License

MIT

Documentation

Index

Constants

View Source
const (
	RequestTypeLaunch       = "LaunchRequest"
	RequestTypeIntent       = "IntentRequest"
	RequestTypeSessionEnded = "SessionEndedRequest"
)
View Source
const AudioDirectiveType = "AudioPlayer.Play"
View Source
const DisplayTemplateDirectiveType = "Display.RenderTemplate"

Variables

This section is empty.

Functions

func GetWebhook

func GetWebhook(stateMachine fsm.StateMachine, store fsm.Store, distillIntent DistillIntent) func(http.ResponseWriter, *http.Request)

GetWebhook returns the webhook that Alexa expects to communicate with

Types

type AudioItem

type AudioItem struct {
	Stream Stream `json:"stream"`
}

type Authority

type Authority struct {
	Authority string      `json:"authority,omitempty"`
	Status    Status      `json:"status,omitempty"`
	Values    []SlotValue `json:"values,omitempty"`
}

Authority Object See the Resolutions Object

type DistillIntent

type DistillIntent func(Intent) string

DistillIntent is a function that is responsible for converting an intent into an input string

type EndSession

type EndSession struct{}

type Error

type Error struct {
	Type    string `json:"type,omitempty"`
	Message string `json:"message,omitempty"`
}

type Intent

type Intent struct {
	Name               string          `json:"name,omitempty"`
	ConfirmationStatus string          `json:"confirmationStatus,omitempty"`
	Slots              map[string]Slot `json:"slots,omitempty"`
}

Intent Object https://developer.amazon.com/docs/custom-skills/request-types-reference.html#intent-object

type Resolutions

type Resolutions struct {
	ResolutionsPerAuthority []Authority `json:"resolutionsPerAuthority,omitempty"`
}

Resolutions Object https://developer.amazon.com/docs/custom-skills/request-types-reference.html#resolutions-object

type ResolvedValue

type ResolvedValue struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

ResolvedValue Object See Resolutions

type Slot

type Slot struct {
	Name               string      `json:"name,omitempty"`
	Value              string      `json:"value,omitempty"`
	ConfirmationStatus string      `json:"confirmationStatus,omitempty"`
	Resolutions        Resolutions `json:"resolutions,omitempty"`
}

Slot Object https://developer.amazon.com/docs/custom-skills/request-types-reference.html#slot-object

type SlotValue

type SlotValue struct {
	Value ResolvedValue `json:"value,omitempty"`
}

SlotValue Object See Resolutions

type StandardCard

type StandardCard struct {
	Title    string
	Content  string
	Text     string
	ImageURL string
}

type Status

type Status struct {
	Code string `json:"code,omitempty"`
}

Status Object See Resolutions

type Stream

type Stream struct {
	URL                  string `json:"url"`
	Token                string `json:"token"`
	OffsetInMilliseconds int    `json:"offsetInMilliseconds"`
}

Jump to

Keyboard shortcuts

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