Hush.Provider behaviour (hush v0.5.0) View Source

Hush relies on providers to resolve values that the consumer requests.

You can read here on how to write your own provider.

Link to this section Summary

Functions

Fetch a value from a provider

Is the provider a valid one?

Link to this section Functions

Link to this function

fetch(provider, name, options \\ [])

View Source

Specs

fetch(module(), String.t(), Keyword.t()) ::
  {:ok, String.t() | nil} | {:error, :required} | {:error, any()}

Fetch a value from a provider

Specs

valid?(module()) :: :ok | {:error, String.t()}

Is the provider a valid one?

Link to this section Callbacks

Specs

fetch(key :: String.t()) ::
  {:ok, String.t()} | {:error, :not_found} | {:error, any()}

Specs

load(config :: Keyword.t()) :: :ok | {:error, any()}