This example uses the elastic library to connect to Elasticsearch, add a document, and read it out again.
go get gopkg.in/olivere/elastic.v6
go build main.go elasticsearch_example.go
Note: You can find the connection details in the "Overview" tab in the Aiven Console.
./main -url https://<host>:<port> -password <Elasticsearch password>