- Golang >= 1.11
Install dependencies:
go get
Run tests with:
go test -cover ./...
Generate artifact ./dist/deployment.zip
:
./scripts/build
Name | Default Value | Description |
---|---|---|
ES_URL |
http://127.0.0.1:9200 |
The URL to ElasticSearch |
ES_INDEX_TEMPLATE |
{{ .Prefix }}-{{ .Date.Year }}.{{ .Date.Month }}.{{ .Date.Day }} |
ElasticSearch index template. Available objects: - Env - Date - Prefix |
ES_DOC_TYPE_NAME |
notification |
Document type used to index the event message |
DEBUG |
false |
Enable debugging mode |
-
start HTTP debugging server:
docker run --rm \ --name=http-debugger \ --publish 8080:80 \ mendhak/http-https-echo
-
execute lambda function with sample event:
cat ./test-data/event.json | LOCAL_TEST=true DEBUG=true ES_URL='http://localhost:8080' go run ./src/main.go