View Source Ash.Domain.Info (ash v3.4.28)

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

Link to this function

allow_unregistered?(domain)

View Source
@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

Link to this macro

depend_on_resources(domain)

View Source (macro)
This macro is deprecated. Use `Ash.Domain.Info.resources/1` instead. This macro is no longer necessary.
@spec depend_on_resources(Macro.t()) :: Macro.t()

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

Link to this function

find_manage_relationships_with_identity_not_configured(otp_app)

View Source
@spec require_actor?(Ash.Domain.t()) :: boolean()

Whether or not the actor is always required for a domain

Link to this function

resource(domain, resource)

View Source
@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}.

Link to this function

resource_references(domain)

View Source
@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

Link to this function

span_name(domain, resource, action)

View Source
@spec span_name(Ash.Domain.t(), Ash.Resource.t(), action :: atom() | binary()) ::
  String.t()

The span_name for a domain and resource combination

Link to this function

telemetry_event_name(domain, name)

View Source
@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