Domains stored in Sovite's database, managed with sovitectl domain.
They add to the domains in the [domains] config section; a domain in
the config file wins over the same domain in the database.
The SMTP server and the queue manager read them from a cache
(Sovite.Core.Repo.Tables.DomainCache), refreshed every few seconds, so a change
applies without a restart and a database outage does not make hosted
domains look foreign.
Summary
Functions
Adds a domain of class kind.
The enabled domains and their classes.
Deletes a domain.
The domain classes: :local, :aliased, :hosted, :relay.
Lists all domains, by name.
Enables or disables a domain. Disabled domains are ignored.
Functions
@spec add( Sovite.Core.Repo.t(), String.t(), Sovite.Core.Repo.Schemas.Domain.kind() | String.t() ) :: {:ok, Sovite.Core.Repo.Schemas.Domain.t()} | {:error, Ecto.Changeset.t()}
Adds a domain of class kind.
@spec classes(Sovite.Core.Repo.t()) :: %{ required(String.t()) => Sovite.Core.Repo.Schemas.Domain.kind() }
The enabled domains and their classes.
@spec delete(Sovite.Core.Repo.t(), String.t()) :: :ok | {:error, :not_found}
Deletes a domain.
@spec kinds() :: [Sovite.Core.Repo.Schemas.Domain.kind()]
The domain classes: :local, :aliased, :hosted, :relay.
@spec list(Sovite.Core.Repo.t()) :: [Sovite.Core.Repo.Schemas.Domain.t()]
Lists all domains, by name.
@spec set_enabled(Sovite.Core.Repo.t(), String.t(), boolean()) :: {:ok, Sovite.Core.Repo.Schemas.Domain.t()} | {:error, :not_found | Ecto.Changeset.t()}
Enables or disables a domain. Disabled domains are ignored.