DopplerConfigProvider (doppler_config_provider v0.1.0) View Source

DopplerConfigProvider fetches the config from Doppler and merges it with your application config at system boot.

Link to this section Summary

Functions

Perform the request to doppler with the provided HTTP module.

Invoked when initializing the config provider.

Perform the JSON decoding with the provided JSON module.

Loads configuration (typically during system boot).

Link to this section Types

Specs

http_module() :: module() | {atom(), module()}

Specs

json_module() :: module() | {atom(), module()}

Specs

map_options()

Specs

mappings() ::
  %{optional(String.t()) => {atom(), atom()}}
  | %{optional(String.t()) => {atom(), module(), atom()}}

Specs

options() :: [
  service_token: service_token(),
  http_module: http_module(),
  json_module: json_module(),
  mappings: mappings()
]

Specs

service_token() :: String.t()

Link to this section Functions

Link to this function

fetch_doppler_config!(opts, url \\ "https://api.doppler.com/v3/configs/config/secrets/download")

View Source

Specs

fetch_doppler_config!(map_options(), String.t()) :: map() | no_return()

Perform the request to doppler with the provided HTTP module.

Specs

init(options()) :: options()

Invoked when initializing the config provider.

A config provider is typically initialized on the machine where the system is assembled and not on the target machine. The init/1 callback is useful to verify the arguments given to the provider and prepare the state that will be given to load/2.

Link to this function

json_decode!(body, opts)

View Source

Specs

json_decode!(String.t(), map_options()) :: map() | no_return()

Perform the JSON decoding with the provided JSON module.

Loads configuration (typically during system boot).

Note that load/2 is typically invoked very early in the boot process.