eventsourcing/memory_store

Types

pub opaque type MemoryStore(entity, command, event, error)

Functions

pub fn load_aggregate(
  memory_store: MemoryStore(a, b, c, d),
  aggregate_id: String,
) -> AggregateContext(a, b, c, d)
pub fn load_events(
  memory_store: MemoryStore(a, b, c, d),
  aggregate_id: String,
) -> List(EventEnvelop(c))
pub fn new(
  emtpy_entity empty_entity: a,
  handle_command_function handle: fn(a, b) -> Result(List(c), d),
  apply_function apply: fn(a, c) -> a,
) -> EventStore(MemoryStore(a, b, c, d), a, b, c, d)
Search Document