pgstore

package
v0.0.0-...-11dd352 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Postgres

type Postgres struct {
	// contains filtered or unexported fields
}

Postgres provides a Postgres backed store

func New

func New(options *pg.Options, logger logrus.FieldLogger) *Postgres

New returns a Postgres backed store

func (*Postgres) Load

func (p *Postgres) Load(ctx context.Context, aggregateID string, fromVersion, toVersion int) (eventsourcing.History, eventsourcing.Error)

Load implements the Store interface and retrieve events from Postgres

func (*Postgres) Save

func (p *Postgres) Save(ctx context.Context, aggregateID string, records ...eventsourcing.Record) eventsourcing.Error

Save implements the Store interface and saves records, serialized events, in Postgres

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL