Mooncore.App behaviour
(mooncore v0.2.5)
Copy Markdown
Behaviour for the app registry.
Users implement this to register their apps with their roles and action modules.
Configure via config :mooncore, app_module: MyApp.App.
Example
defmodule MyApp.App do
@behaviour Mooncore.App
@impl true
def list do
%{
"myapp" => %{
key: "myapp",
name: "My Application",
roles: MyApp.Roles.list(),
action_module: MyApp.Action
}
}
end
@impl true
def info(app_name), do: Map.get(list(), app_name)
end
Summary
Functions
Get app info using the configured app_module.
List all apps using the configured app_module.