StrawHat.Mailer v1.0.0 StrawHat.Mailer.Templates View Source

Interactor module that defines all the functionality for template management.

Link to this section Summary

Functions

Adds a partial to the template

Adds partials to template

Returns an %Ecto.Changeset{} for tracking template changes

Creates a template

Destroys a template

Gets a template by id

Gets a template by id

Gets a template by name

Returns the list of templates

Removes a partial from the template

Link to this section Functions

Adds a partial to the template.

Adds partials to template.

Returns an %Ecto.Changeset{} for tracking template changes.

Link to this function create_template(template_attrs) View Source

Creates a template.

Link to this function destroy_template(template) View Source
destroy_template(StrawHat.Mailer.Template.t()) ::
  {:ok, StrawHat.Mailer.Template.t()} | {:error, Ecto.Changeset.t()}

Destroys a template.

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

Gets a template by id.

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

Gets 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.Template.t()} | {:error, StrawHat.Error.t()}

Gets a template by name.

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

Returns the list of templates.

Removes a partial from the template.

Updates a template.