StrawHat.Mailer v0.2.1 StrawHat.Mailer.Template View Source

Interactor module that defines all the functionality for template management.

Link to this section Summary

Functions

Destroy a template

Get a template by id

Get a template by id

Get a template by name

Get the list of templates

Link to this section Functions

Create a template.

Destroy a template.

Link to this function find_template(template_id) View Source
find_template(String.t()) ::
  {:ok, StrawHat.Mailer.Schema.Template.t()} |
  {:error, StrawHat.Error.t()}

Get a template by id.

Link to this function get_template(template_id) View Source
get_template(String.t()) :: Ecto.Schema.t() | nil | no_return()

Get a template by id.

Link to this function get_template_by_name(template_name) View Source
get_template_by_name(String.t()) ::
  {:ok, StrawHat.Mailer.Schema.Template.t()} |
  {:error, Ecto.Changeset.t()}

Get a template by name.

Link to this function get_templates(pagination \\ []) View Source
get_templates(Scrivener.Config.t()) :: Scrivener.Page.t()

Get the list of templates.

Update a template.