Diffo.Provider.Instance.Info (Diffo v0.2.1)

Copy Markdown View Source

Public introspection API for resources extending Diffo.Provider.BaseInstance

Summary

Functions

Returns the named characteristic declaration, or nil

Returns the list of characteristic declarations for the resource

Returns the named feature declaration, or nil

Returns the named characteristic within a feature, or nil

Returns the list of feature declarations for the resource

Returns the list of party role declarations for the resource

Returns the party declaration for the given role, or nil

Returns the place declaration for the given role, or nil

Returns the list of place role declarations for the resource

Returns the normalised specification keyword list for the resource

Functions

characteristic(resource, name)

@spec characteristic(Ash.Resource.t(), atom()) :: struct() | nil

Returns the named characteristic declaration, or nil

characteristics(resource)

@spec characteristics(Ash.Resource.t()) :: list() | []

Returns the list of characteristic declarations for the resource

feature(resource, name)

@spec feature(Ash.Resource.t(), atom()) :: struct() | nil

Returns the named feature declaration, or nil

feature_characteristic(resource, feature_name, char_name)

@spec feature_characteristic(Ash.Resource.t(), atom(), atom()) :: struct() | nil

Returns the named characteristic within a feature, or nil

features(resource)

@spec features(Ash.Resource.t()) :: list() | []

Returns the list of feature declarations for the resource

parties(resource)

@spec parties(Ash.Resource.t()) :: list() | []

Returns the list of party role declarations for the resource

party(resource, role)

@spec party(Ash.Resource.t(), atom()) :: struct() | nil

Returns the party declaration for the given role, or nil

place(resource, role)

@spec place(Ash.Resource.t(), atom()) :: struct() | nil

Returns the place declaration for the given role, or nil

places(resource)

@spec places(Ash.Resource.t()) :: list() | []

Returns the list of place role declarations for the resource

specification(resource)

@spec specification(Ash.Resource.t()) :: keyword() | nil

Returns the normalised specification keyword list for the resource