model

package
v0.0.0-...-6efc50b Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidAggregate = errors.New("invalid aggregate")

ErrInvalidAggregate occurs when a loaded aggregate is not an aggregate.

View Source
var ErrInvalidRepo = errors.New("invalid repo")

ErrInvalidRepo is when a dispatcher is created with a nil repo.

Functions

This section is empty.

Types

type AggregateStore

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

AggregateStore is an aggregate store that uses a read write repo for loading and saving aggregates.

func NewAggregateStore

func NewAggregateStore(repo eh.ReadWriteRepo) (*AggregateStore, error)

NewAggregateStore creates an aggregate store with a read write repo.

func (*AggregateStore) Load

func (r *AggregateStore) Load(ctx context.Context, aggregateType eh.AggregateType, id eh.UUID) (eh.Aggregate, error)

Load implements the Load method of the eventhorizon.AggregateStore interface.

func (*AggregateStore) Save

func (r *AggregateStore) Save(ctx context.Context, aggregate eh.Aggregate) error

Save implements the Save method of the eventhorizon.AggregateStore interface.

Jump to

Keyboard shortcuts

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