ExESDB.Commanded.Mapper (ex_esdb v0.0.10-alpha)

A mapper for Commanded to use ExESDB as the event store.

Summary

Functions

Converts a Commanded EventData struct to an ExESDB NewEvent struct.

Converts an ExESDB EventRecord struct to a Commanded RecordedEvent struct.

Converts an ExESDB SnapshotRecord struct to a Commanded SnapshotData struct.

Converts an Commanded SnapshotData struct to an ExESDB SnapshotRecord struct.

Functions

to_new_event(event_data)

@spec to_new_event(Commanded.EventStore.EventData.t()) :: ExESDB.NewEvent.t()

Converts a Commanded EventData struct to an ExESDB NewEvent struct.

to_recorded_event(event_record)

@spec to_recorded_event(ExESDB.EventRecord.t()) ::
  Commanded.EventStore.RecordedEvent.t()

Converts an ExESDB EventRecord struct to a Commanded RecordedEvent struct.

to_snapshot_data(snapshot_record)

Converts an ExESDB SnapshotRecord struct to a Commanded SnapshotData struct.

to_snapshot_record(snapshot_data)

Converts an Commanded SnapshotData struct to an ExESDB SnapshotRecord struct.