Skogsrå v1.2.0 Skogsra.Env View Source

This module defines a Skogsra environment variable.

Link to this section Summary

Types

Application name

Key

List of keys that lead to the value of the variable

Variable namespace

Environment variable options.

  • skip_system - Skips loading the variable from the OS.
  • skip_config - Skips loading the variable from the config.
  • os_env - The name of the OS environment variable.
  • type - Type to cast the OS environment variable value.
  • namespace - Default namespace for the variable.
  • default - Default value.
  • required - Whether the variable is required or not.
  • cached - Whether the variable is cached or not

Environment variable options

t()

Skogsra environment variable

Types

Functions

Environment variable struct

Creates a new Skogsra environment variable

Link to this section Types

Link to this type

app_name() View Source
app_name() :: nil | atom()

Application name.

Key.

List of keys that lead to the value of the variable.

Link to this type

namespace() View Source
namespace() :: nil | atom()

Variable namespace.

Link to this type

option() View Source
option() ::
  {:skip_system, boolean()}
  | {:skip_config, boolean()}
  | {:os_env, binary()}
  | {:type, type()}
  | {:namespace, namespace()}
  | {:default, term()}
  | {:required, boolean()}
  | {:cached, boolean()}

Environment variable options.

  • skip_system - Skips loading the variable from the OS.
  • skip_config - Skips loading the variable from the config.
  • os_env - The name of the OS environment variable.
  • type - Type to cast the OS environment variable value.
  • namespace - Default namespace for the variable.
  • default - Default value.
  • required - Whether the variable is required or not.
  • cached - Whether the variable is cached or not.
Link to this type

options() View Source
options() :: [option()]

Environment variable options:

Link to this type

t() View Source
t() :: %Skogsra.Env{
  app_name: app_name :: app_name(),
  cache: cache :: :ets.tab(),
  keys: keys :: keys(),
  namespace: namespace :: namespace(),
  options: options :: options()
}

Skogsra environment variable.

Link to this type

type() View Source
type() :: :binary | :integer | :float | :boolean | :atom | {module(), atom()}

Types

Link to this section Functions

Environment variable struct.

Link to this function

new(namespace, app_name, keys, options) View Source
new(namespace(), app_name(), key(), options()) :: t()
new(namespace(), app_name(), keys(), options()) :: t()

Creates a new Skogsra environment variable.