Casconf.Loader behaviour (casconf v1.0.0) View Source

Link to this section Summary

Functions

Loads and casts a specific configuration item

Finds Casconf.Config structs in the given term (lists, keyword lists and maps supported) and

Loads a specific configuration item

Returns the configured loaders in order of precedence

Link to this section Functions

Specs

load(Casconf.Config.t()) :: {:ok, value :: term()} | {:error, reason :: term()}

Loads and casts a specific configuration item

It will raise the following errors:

  • Casconf.CastError (in case the supplied value couldn't be converted to the given data type)
  • Casconf.NoValueError (in case none of the loaders have found a value)

Specs

load_in(term()) :: term()

Finds Casconf.Config structs in the given term (lists, keyword lists and maps supported) and

Specs

load_raw(Casconf.Config.t()) ::
  {:found, key :: term(), value :: term(), loader_name :: atom()}
  | {:error, reason :: term()}

Loads a specific configuration item

Returns the configured loaders in order of precedence

Link to this section Callbacks

Specs

describe_load(term()) :: String.t()

Specs

load(term()) :: :not_found | {:found, term()} | {:error, reason :: term()}
Link to this callback

source_description(term)

View Source

Specs

source_description(term()) :: String.t()