Aliases stored in Sovite's database, managed with sovitectl alias.
As a Sovite.Core.Lookup table, a lookup returns the
destinations of an enabled alias, joined with ", ".
Summary
Functions
Adds destinations to the alias for address, creating the alias if
needed. Returns the alias with its destinations.
Deletes the alias for address and its destinations.
Lists all aliases, by address, with their destinations.
Removes one destination from the alias for address.
Enables or disables an alias.
Functions
@spec add(Sovite.Core.Repo.t(), String.t(), [String.t(), ...]) :: {:ok, Sovite.Core.Repo.Schemas.Alias.t()} | {:error, Ecto.Changeset.t()}
Adds destinations to the alias for address, creating the alias if
needed. Returns the alias with its destinations.
@spec delete(Sovite.Core.Repo.t(), String.t()) :: :ok | {:error, :not_found}
Deletes the alias for address and its destinations.
@spec list(Sovite.Core.Repo.t()) :: [Sovite.Core.Repo.Schemas.Alias.t()]
Lists all aliases, by address, with their destinations.
@spec remove_destination(Sovite.Core.Repo.t(), String.t(), String.t()) :: :ok | {:error, :not_found}
Removes one destination from the alias for address.
@spec set_enabled(Sovite.Core.Repo.t(), String.t(), boolean()) :: {:ok, Sovite.Core.Repo.Schemas.Alias.t()} | {:error, :not_found | Ecto.Changeset.t()}
Enables or disables an alias.