AshOnetime.Scope behaviour (ash_onetime v0.1.0)

Copy Markdown View Source

Closed, explicit scope algebra for collision isolation.

Summary

Types

component()

@type component() ::
  {:tenant, module()}
  | {:argument, atom()}
  | {:attribute, atom()}
  | {:static, binary()}

Callbacks

resolve(arg1, map)

@callback resolve(Ash.Changeset.t() | Ash.ActionInput.t(), map()) ::
  {:ok, AshOnetime.Canonical.value()} | {:error, term()}

Functions

normalize(components)

@spec normalize(term()) :: {:ok, [component()]} | {:error, String.t()}

references(components)

@spec references([component()]) :: %{arguments: [atom()], attributes: [atom()]}