Proca.Service.EmailTemplateDirectory (proca v3.4.1)

Lookup email templates.

Supports looking up both local and remote templates. The remote templates are cached in an ETS table. The compiled local templates are cached in the ETS table too.

The ETS table

  • name :local_templates key: {service_id, name} value: EmailTemplate struct

  • name :remote_templates key: {org_id, name, locale}

Link to this section Summary

Link to this section Functions

Link to this function

bust_cache_template(t)

Link to this function

by_name(org, name, locale \\ nil, reload \\ false)

return {:ok, nil} when given name is nil.

Link to this function

by_name_local(org, name, locale)

Link to this function

by_name_reload(org, name, locale \\ nil)

Lookup but if not found, reload the templates

Link to this function

by_name_remote(org, name, locale, reload)

Link to this function

by_ref(org, ref)

Link to this function

cache_template(t, store \\ false)

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

delete_remote_templates(org)

Link to this function

list_names(org)

Link to this function

list_names_local(org)

Link to this function

list_names_remote(org)

Link to this function

load_templates(org)

Reload remote template cache for org

Link to this function

load_templates_async(org)

Link to this function

load_templates_sync(org)

Link to this function

local_record(org, tmpl)

Link to this function

remote_record(service, tmpl)

Link to this function

start_link(opts)

Link to this function

table_name(atom)