View Source Ash.Resource.Actions.Implementation behaviour (ash v2.9.11)

An implementation of a generic action.

Link to this section Summary

Link to this section Types

@type context() :: %{
  optional(:actor) => term(),
  optional(:tenant) => term(),
  optional(:authorize?) => boolean(),
  optional(:api) => module(),
  optional(any()) => any()
}

Link to this section Callbacks

@callback run(Ash.ActionInput.t(), opts :: Keyword.t(), context()) ::
  {:ok, term()} | {:ok, [Ash.Notifier.Notification.t()]} | {:error, term()}