nova (NOVA vv0.8.0)

Interface module for nova

Link to this section Summary

Functions

Checks if a nova application is loaded
Works as the regular application:get_env/3 but instead of giving a specific application we target the application that started nova.
Returns the name of the main bw-application (The one that started everything)
Sets an environment variable for the main application.

Link to this section Types

Specs

state() ::
    #{req := cowboy_req:req(),
      controller_data := any(),
      method := binary(),
      bindings := [{binary(), binary()}],
      resp_status := integer()}.

Link to this section Functions

Link to this function

application_loaded(Application)

Specs

application_loaded(Application :: atom()) -> boolean().
Checks if a nova application is loaded
Link to this function

get_env(Parameter, Default)

Specs

get_env(Parameter :: atom(), Default :: any()) -> term() | undefined.
Works as the regular application:get_env/3 but instead of giving a specific application we target the application that started nova.

Specs

get_main_app() -> {ok, Application :: atom()} | undefined.
Returns the name of the main bw-application (The one that started everything)
Link to this function

set_env(Key, Value)

Specs

set_env(Key :: atom(), Value :: any()) -> ok | {error, main_app_not_found}.
Sets an environment variable for the main application.