Documentation ¶
Index ¶
- func NewId(t time.Time) ulid.ULID
- type BadgerEventStore
- func (b *BadgerEventStore) Append(aggregate string, content interface{}) error
- func (b *BadgerEventStore) Close() error
- func (b *BadgerEventStore) ListKeys() ([]string, error)
- func (b *BadgerEventStore) ListKeysForAggregate(aggregate string) ([]string, error)
- func (b *BadgerEventStore) Read(aggregate string) ([]interface{}, error)
- func (b *BadgerEventStore) Register(t interface{})
- type EventStore
- type Record
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BadgerEventStore ¶
type BadgerEventStore struct {
// contains filtered or unexported fields
}
func (*BadgerEventStore) Append ¶
func (b *BadgerEventStore) Append(aggregate string, content interface{}) error
func (*BadgerEventStore) Close ¶
func (b *BadgerEventStore) Close() error
func (*BadgerEventStore) ListKeys ¶
func (b *BadgerEventStore) ListKeys() ([]string, error)
func (*BadgerEventStore) ListKeysForAggregate ¶
func (b *BadgerEventStore) ListKeysForAggregate(aggregate string) ([]string, error)
func (*BadgerEventStore) Read ¶
func (b *BadgerEventStore) Read(aggregate string) ([]interface{}, error)
func (*BadgerEventStore) Register ¶
func (b *BadgerEventStore) Register(t interface{})
type EventStore ¶
type EventStore interface { // Register a type for deserialization Register(t interface{}) // Append append an event to the event store for the fact Append(aggregate string, content interface{}) error // Read the events for a fact from the beginning Read(aggregate string) ([]interface{}, error) // ListKeys will list all keys in the store ListKeys() ([]string, error) // ListKeysForAggregate will list all keys with the aggregate prefix ListKeysForAggregate(aggregate string) ([]string, error) // Close the event store Close() error }
EventStore provides an interface to store events for a topic, and retrieve them later.
func MemoryStore ¶
func MemoryStore() EventStore
Click to show internal directories.
Click to hide internal directories.