View Source Ash.Api.Info (ash v2.0.0-rc.13)
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
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
The allow MFA for an api
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
The resource registry for an api
Whether or not the actor is always required for an api
@spec resource(Ash.Api.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, you will need to introduce a compile time
dependency on all of the resources, and therefore should use the registry directly. Registry |> Ash.Registry.Info.entries()
.
The short name for an api
@spec span_name(Ash.Api.t(), Ash.Resource.t(), action :: atom()) :: 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