Specs
primary_action(Ash.Resource.t(), Ash.Resource.Actions.action_type()) :: Ash.Resource.Actions.action() | nil
Returns the primary action of a given type
Introspection for resources
Returns the action with the matching name and type on the resource
Returns all actions of a resource
Get an aggregate by name
Returns all aggregates of a resource
Get an attribute name from the resource
Returns all attributes of a resource
A list of authorizers to be used when accessing
Get a calculation by name
Returns all calculations of a resource
Returns the configured default actions
A list of identities for the resource
Get the multitenancy strategy for a resource
A list of notifiers to be used when accessing
Returns the primary action of a given type
Returns the primary action of the given type
A list of field names corresponding to the primary key
Get an aggregate by name
Returns all public aggregates of a resource
Get a public attribute name from the resource
Returns all public attributes of a resource
Get a public calculation by name
Returns all public calculations of a resource
Get a public relationship by name or path
Returns all public relationships of a resource
Get a relationship by name or path
Returns all relationships of a resource
Whether or not a given module is a resource module
A list of all validations for the resource
action(Ash.Resource.t(), atom(), Ash.Resource.Actions.action_type() | nil) :: Ash.Resource.Actions.action() | nil
Returns the action with the matching name and type on the resource
actions(Ash.Resource.t()) :: [Ash.Resource.Actions.action()]
Returns all actions of a resource
aggregate(Ash.Resource.t(), atom() | String.t()) :: Ash.Resource.Aggregate.t() | nil
Get an aggregate by name
aggregates(Ash.Resource.t()) :: [Ash.Resource.Aggregate.t()]
Returns all aggregates of a resource
attribute(Ash.Resource.t(), String.t() | atom()) :: Ash.Resource.Attribute.t() | nil
Get an attribute name from the resource
attributes(Ash.Resource.t()) :: [Ash.Resource.Attribute.t()]
Returns all attributes of a resource
authorizers(Ash.Resource.t()) :: [module()]
A list of authorizers to be used when accessing
base_filter(Ash.Resource.t()) :: term()
calculation(Ash.Resource.t(), atom() | String.t()) :: Ash.Resource.Calculation.t() | nil
Get a calculation by name
calculations(Ash.Resource.t()) :: [Ash.Resource.Calculation.t()]
Returns all calculations of a resource
default_actions(Ash.Resource.t()) :: [:create | :read | :update | :destroy]
Returns the configured default actions
default_context(Ash.Resource.t()) :: term()
description(Ash.Resource.t()) :: String.t() | nil
embedded?(Ash.Resource.t()) :: boolean()
extensions(Ash.Resource.t()) :: [module()]
get_metadata(Ash.Resource.record(), atom() | [atom()]) :: term()
identities(Ash.Resource.t()) :: [Ash.Resource.Identity.t()]
A list of identities for the resource
interfaces(Ash.Resource.t()) :: [Ash.Resource.Interface.t()]
multitenancy_attribute(Ash.Resource.t()) :: atom() | nil
multitenancy_global?(Ash.Resource.t()) :: atom() | nil
multitenancy_parse_attribute(Ash.Resource.t()) :: {atom(), atom(), [any()]}
multitenancy_source(Ash.Resource.t()) :: atom() | nil
multitenancy_strategy(Ash.Resource.t()) :: :context | :attribute | nil
Get the multitenancy strategy for a resource
multitenancy_template(Ash.Resource.t()) :: atom() | nil
notifiers(Ash.Resource.t()) :: [module()]
A list of notifiers to be used when accessing
primary_action(Ash.Resource.t(), Ash.Resource.Actions.action_type()) :: Ash.Resource.Actions.action() | nil
Returns the primary action of a given type
primary_action!(Ash.Resource.t(), Ash.Resource.Actions.action_type()) :: Ash.Resource.Actions.action() | no_return()
Returns the primary action of the given type
primary_key(Ash.Resource.t()) :: [atom()]
A list of field names corresponding to the primary key
public_aggregate(Ash.Resource.t(), atom() | String.t()) :: Ash.Resource.Aggregate.t() | nil
Get an aggregate by name
public_aggregates(Ash.Resource.t()) :: [Ash.Resource.Aggregate.t()]
Returns all public aggregates of a resource
public_attribute(Ash.Resource.t(), String.t() | atom()) :: Ash.Resource.Attribute.t() | nil
Get a public attribute name from the resource
public_attributes(Ash.Resource.t()) :: [Ash.Resource.Attribute.t()]
Returns all public attributes of a resource
public_calculation(Ash.Resource.t(), atom() | String.t()) :: Ash.Resource.Calculation.t() | nil
Get a public calculation by name
public_calculations(Ash.Resource.t()) :: [Ash.Resource.Calculation.t()]
Returns all public calculations of a resource
Get a public relationship by name or path
public_relationships(Ash.Resource.t()) :: [ Ash.Resource.Relationships.relationship() ]
Returns all public relationships of a resource
put_metadata(Ash.Resource.record(), atom(), term()) :: Ash.Resource.record()
relationship(Ash.Resource.t(), atom() | String.t() | [atom() | String.t()]) :: Ash.Resource.Relationships.relationship() | nil
Get a relationship by name or path
relationships(Ash.Resource.t()) :: [Ash.Resource.Relationships.relationship()]
Returns all relationships of a resource
Whether or not a given module is a resource module
selected?(Ash.Resource.record(), atom()) :: boolean()
set_metadata(Ash.Resource.record(), map()) :: Ash.Resource.record()
validations(Ash.Resource.t()) :: [Ash.Resource.Validation.t()]
A list of all validations for the resource
validations(Ash.Resource.t(), :create | :update | :destroy) :: [ Ash.Resource.Validation.t() ]