View Source Exop.Utils (Exop v1.4.5)

A bunch of common functions.

Summary

Functions

Link to this function

defined_params(contract, received_params)

View Source
@spec defined_params(list(), map()) :: map()
Link to this function

fetch_inner_checks(contract_item_opts)

View Source
@spec fetch_inner_checks(list()) :: map() | nil
Link to this function

put_param_value(value, collection, item_name)

View Source
@spec 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
@spec 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
@spec 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
@spec resolve_from(map(), [%{name: atom() | String.t(), opts: Keyword.t()}], map()) ::
  map()
@spec try_map(any()) :: map() | nil

Tries to make a map from a struct and keyword list