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.
You can see a complete example of how to use Golexa here