Versions in this module Expand all Collapse all v0 v0.1.0 May 20, 2024 Changes in this version + type AggregateRoot interface + ID func() ID + Serialize func() SerializationType + type CrudRepository interface + type Deleter interface + Delete func(ctx context.Context, id I) error + type Entity struct + type Getter interface + Get func(ctx context.Context, id I) (A, error) + type InMemoryCrudRepository struct + Mutex sync.RWMutex + Serializations map[I]S + func (r *InMemoryCrudRepository[A, I, S]) Delete(_ context.Context, id I) error + func (r *InMemoryCrudRepository[A, I, S]) Get(_ context.Context, id I) (A, error) + func (r *InMemoryCrudRepository[A, I, S]) Insert(_ context.Context, item A) error + func (r *InMemoryCrudRepository[A, I, S]) Reset() + func (r *InMemoryCrudRepository[A, I, S]) Update(_ context.Context, id I, update func(x A) error) error + func (r *InMemoryCrudRepository[A, I, S]) Upsert(_ context.Context, id I, insert func() (A, error), update func(x A) error) error + type Inserter interface + Insert func(ctx context.Context, x A) error + type Serialization interface + Deserialize func() AggregateRoot + type Updater interface + Update func(ctx context.Context, id I, update func(x A) error) error + type Upserter interface + Upsert func(ctx context.Context, id I, insert func() (A, error), update func(x A) error) error + type Value struct