# `Aludel.Storage`
[🔗](https://github.com/ccarvalho-eng/aludel/blob/main/lib/aludel/interfaces/storage.ex#L1)

Domain-facing facade for document storage backends.

Test case documents are persisted through the configured storage adapter.

# `config`

```elixir
@type config() :: keyword()
```

# `error_reason`

```elixir
@type error_reason() :: term()
```

# `adapter`

```elixir
@spec adapter() :: module()
```

# `backend_name`

```elixir
@spec backend_name(module()) :: String.t()
```

# `config`

```elixir
@spec config() :: config()
```

# `delete`

```elixir
@spec delete(
  String.t(),
  keyword()
) :: :ok | {:error, error_reason()}
```

# `get`

```elixir
@spec get(
  String.t(),
  keyword()
) :: {:ok, binary()} | {:error, error_reason()}
```

# `put`

```elixir
@spec put(String.t(), binary(), String.t()) ::
  {:ok, String.t()} | {:error, error_reason()}
```

Persists document contents through the configured adapter and returns the
adapter-specific storage key to save with the document row.

# `read`

```elixir
@spec read(Aludel.Evals.TestCaseDocument.t()) ::
  {:ok, binary()} | {:error, error_reason()}
```

# `resolve_backend`

```elixir
@spec resolve_backend(String.t() | nil) ::
  {:ok, module()} | {:error, :unknown_storage_backend}
```

# `storage_key`

```elixir
@spec storage_key(Ecto.UUID.t(), String.t()) :: String.t()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
