# `ExDav.Storage.Memory`
[🔗](https://git.sr.ht/~sbr/ExDav)

In-memory implementation of `ExDav.Storage`. Backed by a single Agent
registered under the module name, for use in dev demos and tests.

Add `ExDav.Storage.Memory` to your supervision tree (it has no init
args), or call `start_link/1` from a test setup. Use `reset/0` between
tests to clear state.

    children = [ExDav.Storage.Memory]
    Supervisor.start_link(children, strategy: :one_for_one)

    ExDav.Storage.Memory.upsert_user("alice", "secret")
    {:ok, _} = ExDav.Storage.Memory.create_calendar("alice", "default", displayname: "Default")

Plug wiring:

    plug ExDav.CalDav.Plug,
      storage: ExDav.Storage.Memory,
      authenticator: {ExDav.Authenticator.Basic,
                      verify: {ExDav.Storage.Memory, :authenticate}}

# `authenticate`

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `reset`

Reset all state. Intended for tests.

# `start_link`

# `upsert_user`

---

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