View Source Ash.Domain.Info (ash v3.4.48)
Introspection tools for Ash.Domain
Summary
Functions
The allow MFA for a domain
Whether or not the domain allows unregistered resources to be used with it
When authorization should happen for a given domain
Gets the resources of a domain module. Can be used at compile time.
The description of the domain
Determine what domain to use when interacting with a related resource.
Whether or not the actor is always required for a domain
Returns {:ok, resource}
if the resource can be used by the domain, or {:error, error}
.
Gets the resource references of a domain module. DO NOT USE AT COMPILE TIME.
Gets the resources of a domain module.
The short name for a domain
The span_name for a domain and resource combination
Names a telemetry event for a given domain/resource combo
The execution timeout for a domain
The trace name for a domain
Functions
@spec allow(Ash.Domain.t() | Spark.Dsl.t()) :: mfa() | nil
The allow MFA for a domain
@spec allow_unregistered?(Ash.Domain.t() | Spark.Dsl.t()) :: atom() | nil
Whether or not the domain allows unregistered resources to be used with it
@spec authorize(Ash.Domain.t()) :: :always | :by_default | :when_requested
When authorization should happen for a given domain
Gets the resources of a domain module. Can be used at compile time.
Liberal use of this can greatly increase compile times, or even cause compiler deadlocks. Use with care.
@spec description(Spark.Dsl.t() | Ash.Domain.t()) :: String.t() | nil
The description of the domain
@spec require_actor?(Ash.Domain.t()) :: boolean()
Whether or not the actor is always required for a domain
@spec resource(Ash.Domain.t() | Spark.Dsl.t(), Ash.Resource.t()) :: {:ok, Ash.Resource.t()} | {:error, Ash.Error.t()}
Returns {:ok, resource}
if the resource can be used by the domain, or {:error, error}
.
@spec resource_references(Spark.Dsl.t() | Ash.Domain.t()) :: [ Ash.Domain.Dsl.ResourceReference.t() ]
Gets the resource references of a domain module. DO NOT USE AT COMPILE TIME.
If you need the resource list at compile time, use depend_on_resources/1
@spec resources(Spark.Dsl.t() | Ash.Domain.t()) :: [Ash.Resource.t()]
Gets the resources of a domain module.
@spec short_name(Ash.Domain.t()) :: atom()
The short name for a domain
@spec span_name(Ash.Domain.t(), Ash.Resource.t(), action :: atom() | binary()) :: String.t()
The span_name for a domain and resource combination
@spec telemetry_event_name(Ash.Domain.t(), atom() | [atom()]) :: [atom()]
Names a telemetry event for a given domain/resource combo
@spec timeout(Ash.Domain.t()) :: nil | :infinity | integer()
The execution timeout for a domain
@spec trace_name(Ash.Domain.t()) :: String.t()
The trace name for a domain