CommBus.Storage.EntryStore behaviour (CommBus v0.1.0)

Copy Markdown View Source

Behaviour for entry persistence.

Summary

Callbacks

delete_entry(term)

@callback delete_entry(term()) :: :ok | {:error, term()}

get_entry(term)

@callback get_entry(term()) :: {:ok, CommBus.Entry.t()} | {:error, :not_found}

list_entries(keyword)

@callback list_entries(keyword()) :: {:ok, [CommBus.Entry.t()]} | {:error, term()}

store_entry(t)

@callback store_entry(CommBus.Entry.t()) :: {:ok, CommBus.Entry.t()} | {:error, term()}