memory

package
v4.0.0-beta.11 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoEventData = errors.New("Cannot scan, no event data")

Functions

func NewMemoryEventStore

func NewMemoryEventStore() cqrs.EventStore

func NewSnapshotStore

func NewSnapshotStore() cqrs.SnapshotStore

Types

type EventStore

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

func (*EventStore) LoadStream

func (s *EventStore) LoadStream(aggregateName string, aggregateId cqrs.AggregateId, version int) (cqrs.EventStream, error)

func (*EventStore) WriteEvent

func (s *EventStore) WriteEvent(aggregateName string, events ...cqrs.Event) error

type EventStream

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

func (*EventStream) AggregateId

func (s *EventStream) AggregateId() cqrs.AggregateId

func (*EventStream) Error

func (s *EventStream) Error() error

func (*EventStream) EventType

func (s *EventStream) EventType() cqrs.EventType

func (*EventStream) Next

func (s *EventStream) Next() bool

func (*EventStream) Scan

func (s *EventStream) Scan(event cqrs.EventData) error

func (*EventStream) Timestamp

func (s *EventStream) Timestamp() time.Time

func (*EventStream) Version

func (s *EventStream) Version() int

Jump to

Keyboard shortcuts

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