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

Defines the API for a Projection Store adapter.

Link to this section Summary

Callbacks

Returns all projections from a specific projection type from the Projection Store.

Returns a projection record from a specific projection type from the Projection Store.

Insert or updates a projection in the Projection Store.

Link to this section Callbacks

Specs

all(module()) :: list()

Returns all projections from a specific projection type from the Projection Store.

Specs

get(module(), String.t()) :: struct() | nil

Returns a projection record from a specific projection type from the Projection Store.

Specs

project(module(), map()) :: {:ok | :error, map()}

Insert or updates a projection in the Projection Store.

Receives the projection type and the data for the projection.