Documentation
Everything you need to know about Genesis DB.
Go SDK
Official Genesis DB Client for Go

Getting Started

This SDK gives you seamless access to Genesis DB from any Go environment. Stream events, commit new ones, observe events and query events - all over an simple HTTP interface. Fully type-safe, zero boilerplate, and CloudEvents-native. Whether you're building backends, CLIs, or reactive frontends, this SDK gets out of your way and lets you focus on the event-driven logic that matters.

Requirements

Go 1.22 or higher

Installation

To install the SDK, run the following command:

Configuration

The SDK requires the following environment variables to be set:

Usage

To use the SDK, you need to create a client and connect to the Genesis DB instance. The client will handle the connection and the authentication.

Instantiate the client

Stream Events

Stream Events from lower bound

Stream Events with latest by event type

Commit Events

Commit events with preconditions

Usage of referenced data (GDPR)

Deleting referenced data (GDPR)

Observe Events

Observe Events from lower bound (Message queue)

Query Events

Health Checks

Error Handling

All methods return errors when something goes wrong. Make sure to check for errors and handle them appropriately.