View Source Ash.Api.Info (ash v2.9.20)
Introspection tools for Ash.Api
Link to this section Summary
Functions
The allow MFA for an api
Whether or not the api allows unregistered resources to be used with it
When authorization should happen for a given api
Gets the resources of an Api module. Can be used at compile time.
The description of the api
The resource registry for an api
Whether or not the actor is always required for an api
Returns {:ok, resource}
if the resource can be used by the api, or {:error, error}
.
Gets the resources of an Api module. DO NOT USE AT COMPILE TIME.
The short name for an api
The span_name for an api and resource combination
Names a telemetry event for a given api/resource combo
The execution timeout for an api
The trace name for an api
Link to this section Functions
@spec allow(Ash.Api.t() | Spark.Dsl.t()) :: mfa() | nil
The allow MFA for an api
@spec allow_unregistered?(Ash.Api.t() | Spark.Dsl.t()) :: atom() | nil
Whether or not the api allows unregistered resources to be used with it
@spec authorize(Ash.Api.t()) :: :when_requested | :always | :by_default
When authorization should happen for a given api
Gets the resources of an Api 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.Api.t()) :: String.t() | nil
The description of the api
The resource registry for an api
Whether or not the actor is always required for an api
@spec resource(Ash.Api.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 api, or {:error, error}
.
@spec resources(Ash.Api.t()) :: [Ash.Resource.t()]
Gets the resources of an Api module. DO NOT USE AT COMPILE TIME.
If you need the resource list at compile time, use depend_on_resources/1
The short name for an api
@spec span_name(Ash.Api.t(), Ash.Resource.t(), action :: atom() | binary()) :: String.t()
The span_name for an api and resource combination
Names a telemetry event for a given api/resource combo
The execution timeout for an api
The trace name for an api