Aludel.Interfaces.Storage.Behaviour behaviour (aludel v0.2.0)

Copy Markdown View Source

Behaviour for external document storage adapters.

Summary

Types

config()

@type config() :: keyword()

Callbacks

delete(t, config)

@callback delete(String.t(), config()) :: :ok | {:error, term()}

get(t, config)

@callback get(String.t(), config()) :: {:ok, binary()} | {:error, term()}

put(t, binary, t, config)

@callback put(String.t(), binary(), String.t(), config()) ::
  {:ok, String.t()} | {:error, term()}