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
add_partial(repo, template, partial)
View Source
add_partial(repo, template, partial)
View Source
add_partial(
Ecto.Repo.t(),
StrawHat.Mailer.Template.t(),
StrawHat.Mailer.Partial.t()
) :: {:ok, StrawHat.Mailer.TemplatePartial.t()} | {:error, Ecto.Changeset.t()}
add_partial( Ecto.Repo.t(), StrawHat.Mailer.Template.t(), StrawHat.Mailer.Partial.t() ) :: {:ok, StrawHat.Mailer.TemplatePartial.t()} | {:error, Ecto.Changeset.t()}
Link to this function
add_partials(repo, template, partials)
View Source
add_partials(repo, template, partials)
View Source
add_partials(Ecto.Repo.t(), StrawHat.Mailer.Template.t(), [
StrawHat.Mailer.Partial.t()
]) :: [ok: StrawHat.Mailer.Template.t(), error: Ecto.Changeset.t()]
add_partials(Ecto.Repo.t(), StrawHat.Mailer.Template.t(), [ StrawHat.Mailer.Partial.t() ]) :: [ok: StrawHat.Mailer.Template.t(), error: Ecto.Changeset.t()]
Link to this function
change_template(template)
View Source
change_template(template)
View Source
change_template(StrawHat.Mailer.Template.t()) :: Ecto.Changeset.t()
change_template(StrawHat.Mailer.Template.t()) :: Ecto.Changeset.t()
Link to this function
create_template(repo, template_attrs)
View Source
create_template(repo, template_attrs)
View Source
create_template(Ecto.Repo.t(), StrawHat.Mailer.Template.template_attrs()) ::
{:ok, StrawHat.Mailer.Template.t()} | {:error, Ecto.Changeset.t()}
create_template(Ecto.Repo.t(), StrawHat.Mailer.Template.template_attrs()) :: {:ok, StrawHat.Mailer.Template.t()} | {:error, Ecto.Changeset.t()}
Link to this function
destroy_template(repo, template)
View Source
destroy_template(repo, template)
View Source
destroy_template(Ecto.Repo.t(), StrawHat.Mailer.Template.t()) ::
{:ok, StrawHat.Mailer.Template.t()} | {:error, Ecto.Changeset.t()}
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(repo, template_id)
View Source
find_template(Ecto.Repo.t(), String.t()) ::
{:ok, StrawHat.Mailer.Template.t()} | {:error, StrawHat.Error.t()}
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(repo, template_id)
View Source
get_template(Ecto.Repo.t(), String.t()) :: Ecto.Schema.t() | nil | no_return()
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(repo, template_name)
View Source
get_template_by_name(Ecto.Repo.t(), String.t()) ::
{:ok, StrawHat.Mailer.Template.t()} | {:error, StrawHat.Error.t()}
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
get_templates(repo, pagination \\ [])
View Source
get_templates(Ecto.Repo.t(), Scrivener.Config.t()) :: Scrivener.Page.t()
get_templates(Ecto.Repo.t(), Scrivener.Config.t()) :: Scrivener.Page.t()
Link to this function
remove_partial(repo, template, partial)
View Source
remove_partial(repo, template, partial)
View Source
remove_partial(
Ecto.Repo.t(),
StrawHat.Mailer.Template.t(),
StrawHat.Mailer.Partial.t()
) ::
{:ok, StrawHat.Mailer.TemplatePartial.t()}
| {:error, Ecto.Changeset.t() | StrawHat.Error.t()}
remove_partial( Ecto.Repo.t(), StrawHat.Mailer.Template.t(), StrawHat.Mailer.Partial.t() ) :: {:ok, StrawHat.Mailer.TemplatePartial.t()} | {:error, Ecto.Changeset.t() | StrawHat.Error.t()}
Link to this function
update_template(repo, template, template_attrs)
View Source
update_template(repo, template, template_attrs)
View Source
update_template(
Ecto.Repo.t(),
StrawHat.Mailer.Template.t(),
StrawHat.Mailer.Template.template_attrs()
) :: {:ok, StrawHat.Mailer.Template.t()} | {:error, Ecto.Changeset.t()}
update_template( Ecto.Repo.t(), StrawHat.Mailer.Template.t(), StrawHat.Mailer.Template.template_attrs() ) :: {:ok, StrawHat.Mailer.Template.t()} | {:error, Ecto.Changeset.t()}