EventStoreDB Client SDK for Golang
This repository contains an EventStoreDB Client SDK written in Go.
Developing
Integration tests run against a server using Docker, with the EventStoreDB gRPC Client Test Container.
Setup dependencies
Some dependencies are required in order to work with the code:
- Certificates for testing TLS requirements, located at
./certs
.
Testing requires Docker and Docker Compose to be installed.
Build the project
On Windows, you need Powershell
. The version that comes standard with Windows is enough. On a Unix system, any bash
compatible shell should work.
Windows
.\build.ps1
Unix (Linux or OSX)
./build.sh
To also regenerate protobuf and gRPC files while building
Windows
.\build.ps1 -generateProtos
Unix (Linux or OSX)
./build.sh --generate-protos
Run tests
Run docker compose for generating certificates:
docker-compose up
docker-compose down
docker-compose -f cluster-docker-compose.yml up -d
go test ./esdb
docker-compose -f cluster-docker-compose.yml down
By default the tests use ghcr.io/eventstore/eventstore:ci
. To override this, set EVENTSTORE_DOCKER_TAG_ENV
to the tag you wish to use:
docker-compose -f cluster-docker-compose.yml up -d
EVENTSTORE_DOCKER_TAG_ENV="21.10.0-focal" go test ./esdb
docker-compose -f cluster-docker-compose.yml down
Contributing
All contributions to the SDK are made via GitHub Pull Requests, and must be licensed under the Apache 2.0 license.