Tech News
← Back to articles

Chronicle – idiomatic, type safe event sourcing framework for Go

read original related products more articles

Chronicle

A pragmatic and type-safe toolkit for

modern event sourcing in Go. Want to hire me?

Quickstart

Warning I recommend going through the quickstart, since all examples use the Account struct used below from the account package.

Install the library

go get github.com/DeluxeOwl/chronicle # for debugging go get github.com/sanity-io/litter

Define your aggregate and embed aggregate.Base . This embedded struct handles the versioning of the aggregate for you.

We'll use a classic yet very simplified bank account example:

package account import ( "errors" "fmt" "time" "github.com/DeluxeOwl/chronicle/aggregate" "github.com/DeluxeOwl/chronicle/event" ) type Account struct { aggregate. Base }

... continue reading