https://github.com/robertobatts/golexa
Alexa SDK for skills development
https://github.com/robertobatts/golexa
alexa-skills-kit aws golang-library
Last synced: 3 months ago
JSON representation
Alexa SDK for skills development
- Host: GitHub
- URL: https://github.com/robertobatts/golexa
- Owner: robertobatts
- License: mpl-2.0
- Created: 2019-07-27T13:52:11.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-23T20:03:56.000Z (over 6 years ago)
- Last Synced: 2025-10-31T00:39:44.631Z (8 months ago)
- Topics: alexa-skills-kit, aws, golang-library
- Language: Go
- Homepage:
- Size: 19.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# golexa
[](https://app.codacy.com/app/battaroberto/golexa?utm_source=github.com&utm_medium=referral&utm_content=robertobatts/golexa&utm_campaign=Badge_Grade_Dashboard)
[](https://www.mozilla.org/en-US/MPL/2.0/FAQ/)
## Usage
The Golexa struct is the initial interface point with the SDK. Alexa must be
initialized first. The struct is defined as:
```Go
type Golexa struct {
Triggerable Triggerable
AlexaRequest *AlexaRequest
TranslationMap map[string]map[string]string
}
```
Golexa embeds the Triggerable interface, whose methods must be implemented
```Go
type Triggerable interface {
OnLaunch(ctx context.Context, req AlexaRequest, resp *AlexaResponse) error
OnIntent(ctx context.Context, req AlexaRequest, resp *AlexaResponse) error
}
```
By calling
```Go
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](https://github.com/robertobatts/golexa/blob/master/samples/scorekeeper/scorekeeper.go)