Skip to content

robertobatts/golexa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golexa

Codacy Badge License

Usage

The Golexa struct is the initial interface point with the SDK. Alexa must be initialized first. The struct is defined as:

type Golexa struct {
	Triggerable    Triggerable
	AlexaRequest   *AlexaRequest
	TranslationMap map[string]map[string]string
}

Golexa embeds the Triggerable interface, whose methods must be implemented

type Triggerable interface {
	OnLaunch(ctx context.Context, req AlexaRequest, resp *AlexaResponse) error
	OnIntent(ctx context.Context, req AlexaRequest, resp *AlexaResponse) error
}

By calling

var gxa = &Golexa{...}
gxa.LambdaStart()

the functions defined in the Triggerable interface are triggered.

Example

You can see a complete example of how to use Golexa here

About

Alexa SDK for skills development

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages