confex v3.2.0 Confex.Adapters.FileFromSystemEnvironment
Adapter that resolves Confex values from file which path is specified in an environment variable.
Link to this section Summary
Functions
Fetch value from file which path is specified in an environment variable and trim trailing newline it in it’s content
Link to this section Functions
Link to this function
fetch_value(key)
Fetch value from file which path is specified in an environment variable and trim trailing newline it in it’s content.
Example
iex> :ok = System.delete_env("SOME_TEST_FILE")
...> :error = Elixir.Confex.Adapters.FileFromSystemEnvironment.fetch_value("SOME_TEST_FILE")
...> :ok = System.put_env("SOME_TEST_FILE", "test/fixtures/file_secret.txt")
...> {:ok, "foo_bar"} = Elixir.Confex.Adapters.FileFromSystemEnvironment.fetch_value("SOME_TEST_FILE")
{:ok, "foo_bar"}