memory

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAggregateChangeID = errors.New("invalid aggregate change id")
)

Functions

This section is empty.

Types

type InMemory

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

func NewRepository

func NewRepository() *InMemory

func (*InMemory) Delete

func (repo *InMemory) Delete(_ context.Context, agg aggregate.Aggregate[string]) error

func (*InMemory) Exists

func (repo *InMemory) Exists(_ context.Context, agg aggregate.Aggregate[string]) (bool, error)

func (*InMemory) ExistsVersion

func (repo *InMemory) ExistsVersion(_ context.Context, agg aggregate.Aggregate[string], version aggregate.Version) (bool, error)

func (*InMemory) Load

func (repo *InMemory) Load(_ context.Context, agg aggregate.Aggregate[string]) error

func (*InMemory) LoadVersion

func (repo *InMemory) LoadVersion(_ context.Context, agg aggregate.Aggregate[string], version aggregate.Version) error

func (*InMemory) Save

func (repo *InMemory) Save(_ context.Context, agg aggregate.Aggregate[string]) error

func (*InMemory) Search

func (repo *InMemory) Search(_ context.Context, opts ...aggregate.SearchOption) ([]aggregate.Aggregate[string], error)

Jump to

Keyboard shortcuts

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