13 lines
736 B
Elixir
13 lines
736 B
Elixir
defmodule Mv.Membership.JoinNotifier do
|
|
@moduledoc """
|
|
Behaviour for sending join-related emails (confirmation, already member, already pending).
|
|
|
|
The domain calls this module instead of MvWeb.Emails directly, so the domain layer
|
|
does not depend on the web layer. The default implementation is set in config
|
|
(`config :mv, :join_notifier, MvWeb.JoinNotifierImpl`). Tests can override with a mock.
|
|
"""
|
|
@callback send_confirmation(email :: String.t(), token :: String.t(), opts :: keyword()) ::
|
|
{:ok, term()} | {:error, term()}
|
|
@callback send_already_member(email :: String.t()) :: {:ok, term()} | {:error, term()}
|
|
@callback send_already_pending(email :: String.t()) :: {:ok, term()} | {:error, term()}
|
|
end
|