StrawHat.Mailer v2.0.0 StrawHat.Mailer.Templates View Source

Templates management use cases.

Link to this section Summary

Link to this section Functions

Link to this function

create_template(repo, template_attrs) View Source

Link to this function

destroy_template(repo, template) View Source
destroy_template(Ecto.Repo.t(), StrawHat.Mailer.Template.t()) ::
  {:ok, StrawHat.Mailer.Template.t()} | {:error, Ecto.Changeset.t()}

Link to this function

find_template(repo, template_id) View Source
find_template(Ecto.Repo.t(), String.t()) ::
  {:ok, StrawHat.Mailer.Template.t()} | {:error, StrawHat.Error.t()}

Link to this function

get_template(repo, template_id) View Source
get_template(Ecto.Repo.t(), String.t()) :: Ecto.Schema.t() | nil | no_return()

Link to this function

get_template_by_name(repo, template_name) View Source
get_template_by_name(Ecto.Repo.t(), String.t()) ::
  {:ok, StrawHat.Mailer.Template.t()} | {:error, StrawHat.Error.t()}

Link to this function

get_templates(repo, pagination \\ []) View Source

Link to this function

update_template(repo, template, template_attrs) View Source