Documentation
¶
Overview ¶
Package alexa is a framework ready-to-go to build Apps for Lambda servers for Amazon Alexa
Index ¶
- Constants
- Variables
- func AddHandlerIntent(id string, fct func(request.AlexaRequest) (*response.AlexaResponse, error))
- func AddHandlerType(id string, fct func(request.AlexaRequest) (*response.AlexaResponse, error))
- func AddHandlersIntent(m map[string]func(request.AlexaRequest) (*response.AlexaResponse, error))
- func AddHandlersType(m map[string]func(request.AlexaRequest) (*response.AlexaResponse, error))
- func BuildDefaultMap()
- func DefaultFallbackHandler(req request.AlexaRequest) (*response.AlexaResponse, error)
- func DefaultHandler(req request.AlexaRequest) (*response.AlexaResponse, error)
- func DefaultIntentHandler(req request.AlexaRequest) (*response.AlexaResponse, error)
- func DefaultIntentTypeHandler(req request.AlexaRequest) (*response.AlexaResponse, error)
- func DefaultLaunchHandler(req request.AlexaRequest) (*response.AlexaResponse, error)
- func DefaultSessionEndedHandler(req request.AlexaRequest) (*response.AlexaResponse, error)
- func GetAccountEmail(request *request.AlexaRequest) (string, error)
- func GetAccountFullName(request *request.AlexaRequest) (string, error)
- func GetAccountGivenName(request *request.AlexaRequest) (string, error)
- func GetAccountMobileNumber(request *request.AlexaRequest) (map[string]interface{}, error)
- func GetDeviceAddress(request *request.AlexaRequest) (string, error)
- func GetDeviceCountry(request *request.AlexaRequest) (string, error)
- func GetDeviceDistanceUnit(request *request.AlexaRequest) (string, error)
- func GetDeviceTemperatureUnit(request *request.AlexaRequest) (string, error)
- func GetDeviceTimeZone(request *request.AlexaRequest) (string, error)
- func LoadPersistentAttributes(req request.AlexaRequest, container interface{}) error
- func SavePersistentAttributes(req request.AlexaRequest, data interface{}) error
- func SetErrorCapture(status bool)
- func SetSessionUnmarshalerHandler(unmarshaler func(data []byte, s *request.Session) error)
- func Start() error
- func WithAutoCreateTable(auto bool)
- func WithDynamoDbClient(api string, reg string)
- func WithTableName(name string)
Constants ¶
View Source
const ( APITIMEZONE = "/v2/devices/{deviceId}/settings/System.timeZone" APIDISTANCEUNIT = "/v2/devices/{deviceId}/settings/System.distanceUnits" APITEMPERATUREUNIT = "/v2/devices/{deviceId}/settings/System.temperatureUnit" APINAME = "/v2/accounts/~current/settings/Profile.name" APIGIVENNAME = "/v2/accounts/~current/settings/Profile.givenName" APIEMAIL = "/v2/accounts/~current/settings/Profile.email" APIMOBILENUMBER = "/v2/accounts/~current/settings/Profile.mobileNumber" APICOUNTRY = "/v1/devices/{deviceId}/settings/address/countryAndPostalCode" APIADDRESS = "/v1/devices/{deviceId}/settings/address" )
View Source
const ( // Requests types LaunchRequest = "LaunchRequest" SessionEndedRequest = "SessionEndedRequest" IntentRequest = "IntentRequest" Fallback = "Fallback" // Intents names CancelIntent = "AMAZON.CancelIntent" HelpIntent = "AMAZON.HelpIntent" LoopOffIntent = "AMAZON.LoopOffIntent" LoopOnIntent = "AMAZON.LoopOnIntent" NextIntent = "AMAZON.NextIntent" NoIntent = "AMAZON.NoIntent" PauseIntent = "AMAZON.PauseIntent" PreviousIntent = "AMAZON.PreviousIntent" RepeatIntent = "AMAZON.RepeatIntent" ResumeIntent = "AMAZON.ResumeIntent" ShuffleOffIntent = "AMAZON.ShuffleOffIntent" ShuffleOnIntent = "AMAZON.ShuffleOnIntent" StartOverIntent = "AMAZON.StartOverIntent" StopIntent = "AMAZON.StopIntent" YesIntent = "AMAZON.YesIntent" // ==== DISPLAY HANDLERS INTENTS ==== ScrollUpIntent = "AMAZON.ScrollUpIntent" ScrollLeftIntent = "AMAZON.ScrollLeftIntent" ScrollDownIntent = "AMAZON.ScrollDownIntent" ScrollRightIntent = "AMAZON.ScrollRightIntent" PageUpIntent = "AMAZON.PageUpIntent" PageDownIntent = "AMAZON.PageDownIntent" MoreIntent = "AMAZON.MoreIntent" // ==== LOCAL DEVICE NOTIFICATION ==== ElementSelectedHandler = "Display.ElementSelected" )
View Source
const VERSION = "0.4.0"
Variables ¶
View Source
var DEVEL = false
View Source
var ERRORCAPTURE = true
View Source
var HandlerIntentMap map[string]func(request.AlexaRequest) (*response.AlexaResponse, error)
View Source
var HandlerTypeMap map[string]func(request.AlexaRequest) (*response.AlexaResponse, error)
Functions ¶
func AddHandlerIntent ¶
func AddHandlerIntent(id string, fct func(request.AlexaRequest) (*response.AlexaResponse, error))
func AddHandlerType ¶
func AddHandlerType(id string, fct func(request.AlexaRequest) (*response.AlexaResponse, error))
func AddHandlersIntent ¶
func AddHandlersIntent(m map[string]func(request.AlexaRequest) (*response.AlexaResponse, error))
func AddHandlersType ¶
func AddHandlersType(m map[string]func(request.AlexaRequest) (*response.AlexaResponse, error))
func BuildDefaultMap ¶
func BuildDefaultMap()
func DefaultFallbackHandler ¶
func DefaultFallbackHandler(req request.AlexaRequest) (*response.AlexaResponse, error)
func DefaultHandler ¶
func DefaultHandler(req request.AlexaRequest) (*response.AlexaResponse, error)
func DefaultIntentHandler ¶
func DefaultIntentHandler(req request.AlexaRequest) (*response.AlexaResponse, error)
func DefaultIntentTypeHandler ¶
func DefaultIntentTypeHandler(req request.AlexaRequest) (*response.AlexaResponse, error)
func DefaultLaunchHandler ¶
func DefaultLaunchHandler(req request.AlexaRequest) (*response.AlexaResponse, error)
func DefaultSessionEndedHandler ¶
func DefaultSessionEndedHandler(req request.AlexaRequest) (*response.AlexaResponse, error)
func GetAccountEmail ¶
func GetAccountEmail(request *request.AlexaRequest) (string, error)
func GetAccountFullName ¶
func GetAccountFullName(request *request.AlexaRequest) (string, error)
ACCOUNT API
func GetAccountGivenName ¶
func GetAccountGivenName(request *request.AlexaRequest) (string, error)
func GetAccountMobileNumber ¶
func GetAccountMobileNumber(request *request.AlexaRequest) (map[string]interface{}, error)
func GetDeviceAddress ¶
func GetDeviceAddress(request *request.AlexaRequest) (string, error)
func GetDeviceCountry ¶
func GetDeviceCountry(request *request.AlexaRequest) (string, error)
DEVICE ADDRESS AND COUNTRY
func GetDeviceDistanceUnit ¶
func GetDeviceDistanceUnit(request *request.AlexaRequest) (string, error)
func GetDeviceTemperatureUnit ¶
func GetDeviceTemperatureUnit(request *request.AlexaRequest) (string, error)
func GetDeviceTimeZone ¶
func GetDeviceTimeZone(request *request.AlexaRequest) (string, error)
DEVICE PARAMS (temp, zone, locale, etc)
func LoadPersistentAttributes ¶
func LoadPersistentAttributes(req request.AlexaRequest, container interface{}) error
func SavePersistentAttributes ¶
func SavePersistentAttributes(req request.AlexaRequest, data interface{}) error
func SetErrorCapture ¶
func SetErrorCapture(status bool)
func WithAutoCreateTable ¶
func WithAutoCreateTable(auto bool)
func WithDynamoDbClient ¶
func WithTableName ¶
func WithTableName(name string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.