Packages

Plugin to generate a clean architecture scaffold.

Retired package: Package will be published with an organization and other name

Current section

Files

Jump to
elixir_scaffold priv create_structure templates config_holder.txt
Raw

priv/create_structure/templates/config_holder.txt

defmodule {module_name}.Config.ConfigHolder do
use Agent
alias {module_name}.Config.AppConfig
@moduledoc """
Provides Behaviours for handle app-configs
"""
def start_link(%AppConfig{} = conf), do: Agent.start_link(fn -> conf end, name: __MODULE__)
def conf(), do: Agent.get(__MODULE__, & &1)
end