ExDav.Storage.Postgres (ExDav v0.4.9)

Copy Markdown View Source

Postgres-backed implementation of ExDav.Storage. Owns its own users, collections, resources, and tombstones tables; the Repo module is configured via config :ex_dav, repo: MyApp.Repo.

Returns plain maps to keep the DAV plugs agnostic of Ecto schemas. Each collection is shaped as %{name, displayname, description, kind, properties, ctag, resources} and each resource as %{name, body, content_type, etag, uid}.

Summary

Functions

Verify a username/password pair against the users table. Postgres-only.

Postgres-only admin helper.

Postgres-only admin helper.

Postgres-only helper. The plug uses get_collection_with_resources/3 instead.

Postgres-only admin helper.

Postgres-only admin helper.

Functions

authenticate(username, password)

Verify a username/password pair against the users table. Postgres-only.

count_resources(collection_name, username, kind \\ :calendar)

Postgres-only admin helper.

delete_user(username)

Postgres-only admin helper.

get_user(username)

Postgres-only admin helper.

list_resources(username, kind, col_name)

Postgres-only helper. The plug uses get_collection_with_resources/3 instead.

list_users()

Postgres-only admin helper.

upsert_user(username, password, opts \\ [])

Postgres-only admin helper.