Store.Project.Entry.StorageBehaviour behaviour (fnord v0.8.88)

View Source

Behaviour definition for persisting project entries in the store.

Implementations of this behaviour manage the physical storage and retrieval of entries, abstracting over the underlying persistence mechanism.

Summary

Callbacks

create(t)

@callback create(Store.Project.Entry.t()) :: :ok

delete(t)

@callback delete(Store.Project.Entry.t()) :: {:ok, [binary()]} | no_return()

exists?(t)

@callback exists?(Store.Project.Entry.t()) :: boolean()

is_incomplete?(t)

@callback is_incomplete?(Store.Project.Entry.t()) :: boolean()

is_stale?(t)

@callback is_stale?(Store.Project.Entry.t()) :: boolean()

read(t)

@callback read(Store.Project.Entry.t()) :: {:ok, map()} | {:error, any()}

save(t, t, t, list)

@callback save(Store.Project.Entry.t(), String.t(), String.t(), [float()]) ::
  :ok | {:error, any()}