Incident.EventStore.Adapter behaviour (incident v0.6.1) View Source

Defines the API for an Event Store adapter.

Link to this section Summary

Types

Depending the adapter used to store the events, the persisted event will be defined by a different schema.

Callbacks

Appends an event to the Event Store.

Receives an aggregate id and returns a list containing all persisted events from the Event Store.

Link to this section Types

Specs

Depending the adapter used to store the events, the persisted event will be defined by a different schema.

Link to this section Callbacks

Specs

append(map()) :: {:ok, persisted_event()} | {:error, String.t() | struct()}

Appends an event to the Event Store.

Specs

get(String.t()) :: [persisted_event()]

Receives an aggregate id and returns a list containing all persisted events from the Event Store.