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
Click to show internal directories.
Click to hide internal directories.