View Source Ash.ActionInput (ash v3.0.0)
Input for a custom action
Summary
Functions
Adds an error to the input errors list, and marks the input as valid?: false
Fetches the value of an argument provided to the input or :error
.
Creates a new input for a generic action
Gets the value of an argument provided to the input.
Set an argument value
Deep merges the provided map into the input context that can be used later
Types
@type t() :: %Ash.ActionInput{ action: Ash.Resource.Actions.Action.t() | nil, arguments: map(), context: map(), domain: Ash.Domain.t(), errors: term(), invalid_keys: MapSet.t(), params: map(), resource: Ash.Resource.t(), tenant: term(), valid?: boolean() }
Functions
Adds an error to the input errors list, and marks the input as valid?: false
Fetches the value of an argument provided to the input or :error
.
@spec for_action( resource_or_input :: Ash.Resource.t() | t(), action :: atom(), params :: map(), opts :: Keyword.t() ) :: t()
Creates a new input for a generic action
Gets the value of an argument provided to the input.
Set an argument value
Deep merges the provided map into the input context that can be used later
Do not use the private
key in your custom context, as that is reserved for internal use.
@spec set_tenant(t(), Ash.ToTenant.t()) :: t()