ExDav.Storage.Postgres (ExDav v0.1.0)

Copy Markdown View Source

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

Returns plain maps to keep the CalDAV plug agnostic of Ecto schemas. Each calendar is shaped as %{name, displayname, description, components, ctag, objects} and each object as %{name, ical, etag, uid, component}.

Summary

Functions

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

Postgres-only admin helper.

Postgres-only admin helper.

Postgres-only admin helper.

Postgres-only helper. The plug uses get_calendar_with_objects/2 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_objects(calendar_name, username)

Postgres-only admin helper.

delete_user(username)

Postgres-only admin helper.

get_user(username)

Postgres-only admin helper.

list_objects(username, cal_name)

Postgres-only helper. The plug uses get_calendar_with_objects/2 instead.

list_users()

Postgres-only admin helper.

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

Postgres-only admin helper.