ExIcaoVds.Config (ex_icao_vds v0.3.2)

Copy Markdown

Configuration loading, merging, and secret resolution.

Application config is read from Application.get_env(:ex_icao_vds, key). Runtime opts passed to ExIcaoVds.issue/2 or ExIcaoVds.verify/2 override application config for that call only.

Secret resolvers

FormResolution
{:system, "ENV_NAME"}System.fetch_env!/1
{:file, "/path"}File.read!/1 (trimmed)
{:literal, value}value (discouraged outside tests)
{:mfa, mod, fun, args}apply(mod, fun, args)

Summary

Functions

Return the merged effective config for the given key.

Merge opts keyword list onto base config map.

Resolve a secret value from its resolver form or return it as-is.

Resolve all secret-form values in a config map (top-level values only).

Functions

get(key, opts \\ [])

@spec get(
  atom(),
  keyword()
) :: map()

Return the merged effective config for the given key.

merge_opts(base, opts)

@spec merge_opts(
  map(),
  keyword()
) :: map()

Merge opts keyword list onto base config map.

resolve_secret(value)

@spec resolve_secret(term()) :: term()

Resolve a secret value from its resolver form or return it as-is.

resolve_secrets(config)

@spec resolve_secrets(map()) :: map()

Resolve all secret-form values in a config map (top-level values only).