memory

package
v0.0.0-...-e43f319 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

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

Repo implements an in memory repository of read models.

func NewRepo

func NewRepo() *Repo

NewRepo creates a new Repo.

func Repository

func Repository(repo eh.ReadRepo) *Repo

Repository returns a parent ReadRepo if there is one.

func (*Repo) Find

func (r *Repo) Find(ctx context.Context, id eh.UUID) (interface{}, error)

Find implements the Find method of the eventhorizon.ReadRepo interface.

func (*Repo) FindAll

func (r *Repo) FindAll(ctx context.Context) ([]interface{}, error)

FindAll implements the FindAll method of the eventhorizon.ReadRepo interface.

func (*Repo) Parent

func (r *Repo) Parent() eh.ReadRepo

Parent implements the Parent method of the eventhorizon.ReadRepo interface.

func (*Repo) Remove

func (r *Repo) Remove(ctx context.Context, id eh.UUID) error

Remove implements the Remove method of the eventhorizon.WriteRepo interface.

func (*Repo) Save

func (r *Repo) Save(ctx context.Context, id eh.UUID, model interface{}) error

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

Jump to

Keyboard shortcuts

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