Kantoor. Dav. View
(Kantoor v1.0.0)
A collection as one user sees it: their own, or one shared with them.
access is :owner, :write or :read. ref is the path segment the
collection has in the viewer's DAV home (the real slug for their own,
shared-<id> for a share), which is what the in-app writers
(Kantoor.Dav.Local) address it by. owner is the owning Kantoor.Accounts.User
for a shared collection and nil for the viewer's own.
Views are always built from the database on each call, never cached: a revoked share or a deleted collection is gone on the next read.
Summary
Functions
Whether the events of this calendar count as busy time in free/busy.
The name of a collection as a person reads it. The three collections made for every user keep the English names DAV clients see ("Calendar", "Tasks", "Contacts"); the web pages show them in the language of the request. A name the user chose is shown as it is.
The collection's id.
A short label for lists: the name, with the owner for a shared collection.
The collection's display name.
The owner's display name, else their email; nil for the viewer's own.
True when the collection belongs to somebody else.
True for a calendar that is filled from an external feed.
True when the viewer may create, change and delete members. Never true for a
subscribed calendar (Kantoor.Feeds): a feed fills it, whoever owns it.
Types
@type access() :: :owner | :write | :read
@type t() :: %Kantoor.Dav.View{ access: access(), collection: Kantoor.Dav.Collection.t(), owner: struct() | nil, ref: String.t() }
Functions
Whether the events of this calendar count as busy time in free/busy.
@spec display_name(Kantoor.Dav.Collection.t()) :: String.t()
The name of a collection as a person reads it. The three collections made for every user keep the English names DAV clients see ("Calendar", "Tasks", "Contacts"); the web pages show them in the language of the request. A name the user chose is shown as it is.
@spec id(t()) :: Ecto.UUID.t()
The collection's id.
A short label for lists: the name, with the owner for a shared collection.
The collection's display name.
The owner's display name, else their email; nil for the viewer's own.
True for a calendar that is filled from an external feed.
True when the viewer may create, change and delete members. Never true for a
subscribed calendar (Kantoor.Feeds): a feed fills it, whoever owns it.