memory

package
v0.0.0-...-9345043 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReadRepository

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

ReadRepository implements an in memory repository of read models.

func NewReadRepository

func NewReadRepository() *ReadRepository

NewReadRepository creates a new ReadRepository.

func (*ReadRepository) Find

func (r *ReadRepository) Find(id eh.UUID) (interface{}, error)

Find returns one read model with using an id. Returns ErrModelNotFound if no model could be found.

func (*ReadRepository) FindAll

func (r *ReadRepository) FindAll() ([]interface{}, error)

FindAll returns all read models in the repository.

func (*ReadRepository) Remove

func (r *ReadRepository) Remove(id eh.UUID) error

Remove removes a read model with id from the repository. Returns ErrModelNotFound if no model could be found.

func (*ReadRepository) Save

func (r *ReadRepository) Save(id eh.UUID, model interface{}) error

Save saves a read model with id to the repository.

Jump to

Keyboard shortcuts

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