Returns the primary action of a given type for a resource
ash v0.3.0 Ash View Source
The primary interface for interrogating apis and resources.
These are tools for interrogating resources to derive behavior based on their configuration. This is how all of the behavior of Ash is ultimately configured.
Link to this section Summary
Functions
Returns the action with the matching name and type on the resource
A list of all actions on the resource
Get an attribute name from the resource
A list of all attributes on the resource
A list of authorizers to be used when accessing the resource
The data layer of the resource, or nil if it does not have one
A short description of the resource, to be included in autogenerated documentation
Returns the primary action of a given type for a resource
A list of field names corresponding to the primary key of a resource
Gets a relationship by name from the resource
A list of relationships on the resource
A list of resource modules for a given API
Link to this section Types
action()
View Sourceaction() :: Ash.Resource.Actions.Create.t() | Ash.Resource.Actions.Read.t() | Ash.Resource.Actions.Update.t() | Ash.Resource.Actions.Destroy.t()
cardinality_many_relationship()
View Sourcecardinality_many_relationship() :: Ash.Resource.Relationships.HasMany.t() | Ash.Resource.Relationships.ManyToMany.t()
cardinality_one_relationship()
View Sourcecardinality_one_relationship() :: Ash.Resource.Relationships.HasOne.t() | Ash.Resource.Relationships.BelongsTo.t()
relationship()
View Sourcerelationship() :: cardinality_one_relationship() | cardinality_many_relationship()
Link to this section Functions
Returns the action with the matching name and type on the resource
A list of all actions on the resource
Get an attribute name from the resource
A list of all attributes on the resource
A list of authorizers to be used when accessing the resource
The data layer of the resource, or nil if it does not have one
A short description of the resource, to be included in autogenerated documentation
A list of field names corresponding to the primary key of a resource
relationship(resource, relationship_name)
View Sourcerelationship(resource(), atom() | String.t()) :: relationship() | nil
Gets a relationship by name from the resource
relationships(resource)
View Sourcerelationships(resource()) :: [relationship()]
A list of relationships on the resource
A list of resource modules for a given API