Sovite.Core.Repo.Tables.AddressRewrites (sovite v0.2.0)

Copy Markdown View Source

Address rewrites stored in Sovite's database, managed with sovitectl rewrite (see Sovite.Core.Rewrite).

As a Sovite.Core.Lookup table, the handle names the kind of rewrite to find (:sender, :recipient, or :both) and a lookup returns the replacement.

Summary

Functions

Deletes the rewrite of kind for pattern.

Lists all rewrites, by kind and pattern.

Sets the rewrite of kind for pattern, replacing any earlier one.

Functions

delete(repo, kind, pattern)

@spec delete(Sovite.Core.Repo.t(), atom(), String.t()) :: :ok | {:error, :not_found}

Deletes the rewrite of kind for pattern.

list(repo)

Lists all rewrites, by kind and pattern.

set(repo, kind, pattern, replacement)

Sets the rewrite of kind for pattern, replacing any earlier one.