# `Skogsra.Env`
[🔗](https://github.com/gmtprime/skogsra/blob/v2.5.2/lib/skogsra/env.ex#L1)

This module defines a `Skogsra` environment variable.

# `app_name`

```elixir
@type app_name() :: nil | atom()
```

Application name.

# `binding`

```elixir
@type binding() :: :config | :system | module()
```

Variable binding.

# `bindings`

```elixir
@type bindings() :: [binding()]
```

Variable binding list.

# `key`

```elixir
@type key() :: atom()
```

Key.

# `keys`

```elixir
@type keys() :: [key()]
```

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

# `namespace`

```elixir
@type namespace() :: nil | atom()
```

Variable namespace.

# `option`

```elixir
@type option() ::
  {:binding_order, bindings()}
  | {:binding_skip, bindings()}
  | {:os_env, binary()}
  | {:type, type()}
  | {:namespace, namespace()}
  | {:default, term()}
  | {:required, boolean()}
  | {:cached, boolean()}
  | {:env_overrides, keyword()}
  | {atom(), term()}
```

Environment variable options.
- `binding_order` - Variable binding load order.
- `binding_skip` - Skips loading a variable from the list of bindings.
- `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.
- `env_overrides` - Options overrides for specific environments.

# `options`

```elixir
@type options() :: [option()]
```

Environment variable options:

# `t`

```elixir
@type t() :: %Skogsra.Env{
  app_name: app_name :: app_name(),
  keys: keys :: keys(),
  namespace: namespace :: namespace(),
  options: options :: options()
}
```

Skogsra environment variable.

# `type`

```elixir
@type type() ::
  :binary
  | :integer
  | :neg_integer
  | :non_neg_integer
  | :pos_integer
  | :float
  | :boolean
  | :atom
  | :module
  | :unsafe_module
  | :any
  | module()
```

Types.

# `__struct__`
*struct* 

Environment variable struct.

# `binding_order`

```elixir
@spec binding_order(t()) :: bindings()
```

Gets the binding order for a `Skogsra` environment variable.

# `cached?`

```elixir
@spec cached?(t()) :: boolean()
```

Whether the `Skogsra` environment variable is cached or not.

# `default`

```elixir
@spec default(t()) :: term()
```

Gets the default value for a `Skogsra` environment variable.

# `extra_options`

```elixir
@spec extra_options(t()) :: keyword()
```

Gets extra options.

# `new`

```elixir
@spec new(namespace(), app_name(), atom() | binary() | [any()], options()) :: t()
```

Creates a new `Skogsra` environment variable.

# `os_env`

```elixir
@spec os_env(t()) :: binary()
```

Gets the OS variable name for the `Skogsra` environment variable.

# `required?`

```elixir
@spec required?(t()) :: boolean()
```

Whether the `Skogsra` environment variable is required or not.

# `type`

```elixir
@spec type(t()) :: type() | tuple()
```

Gets the type of the `Skogsra` environment variable.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
