Packages

Seven Otters is a set of facilities (macroes, functions, modules, etc.) developed to create CQRS/ES solutions in Elixir on BEAM virtual machine.

Current section

Files

Jump to
seven lib seven projections.ex
Raw

lib/seven/projections.ex

defmodule Seven.Projections do
@moduledoc false
@spec get_projection(String.t()) :: {:ok, module} | {:error, :not_found}
def get_projection(projection_name) do
case Seven.Entities.projections()[String.to_atom(projection_name)] do
nil -> {:error, :projection_not_found}
module -> {:ok, module}
end
end
end