Exop.Utils (Exop v1.4.4) View Source

A bunch of common functions.

Link to this section Summary

Link to this section Functions

Link to this function

defined_params(contract, received_params)

View Source

Specs

defined_params(list(), map()) :: map()
Link to this function

fetch_inner_checks(contract_item_opts)

View Source

Specs

fetch_inner_checks(list()) :: map() | nil
Link to this function

put_param_value(value, collection, item_name)

View Source

Specs

put_param_value(any(), Keyword.t() | map(), atom() | String.t()) ::
  Keyword.t() | map()
Link to this function

resolve_coercions(received_params, list, coerced_params)

View Source

Specs

resolve_coercions(
  map(),
  [%{name: atom() | String.t(), opts: Keyword.t()}],
  map()
) :: any()
Link to this function

resolve_defaults(received_params, list, resolved_params)

View Source

Specs

resolve_defaults(
  map(),
  [%{name: atom() | String.t(), opts: Keyword.t()}],
  map()
) :: map()
Link to this function

resolve_from(received_params, list, resolved_params)

View Source

Specs

resolve_from(map(), [%{name: atom() | String.t(), opts: Keyword.t()}], map()) ::
  map()

Specs

try_map(any()) :: map() | nil

Tries to make a map from a struct and keyword list