API Reference Diffo v#0.4.1

Copy Markdown View Source

Modules

Diffo - TMF Service and Resource Management with a difference

Provider API endpoint

Typed characteristic carrying pool bounds and assignment algorithm.

JSON value struct for AssignableCharacteristic.

Ash Typed Struct for Assignable Characteristic Value

Ash Typed Struct for Assignment

Ash Resource for a pool assignment relationship.

Ash Resource Fragment which is the point of extension for typed TMF Characteristics.

Ash Resource Fragment which is the point of extension for your TMF Service or Resource Instance.

Ash Resource Fragment which is a the point of extension for your TMF Party

Ash Resource Fragment which is the point of extension for your TMF Place.

Ash Resource Fragment which is the shared foundation for TMF Relationship resources.

Reads a field directly from an AssignmentRelationship record.

Reads a field from the source instance of an AssignmentRelationship.

Reads a field from target instances reached via DefinedSimpleRelationship.

Backing calculation for inherited_party DSL declarations.

Backing calculation for inherited_place DSL declarations.

Loads the AssignableCharacteristic pool records associated with an instance, one per pool :name, :thing declaration on the resource module.

Loads all typed BaseCharacteristic-derived records associated with an instance.

After-action change for the standard :assign_* pattern.

After-action change for the standard :define pattern.

After-action change for the standard :relate pattern.

Ash Resource for a TMF Characteristic

Marker extension identifying a module as a valid characteristic resource.

Synthesises default :create and :update actions on BaseCharacteristic-derived resources from the resource's declared public attributes.

Ash Resource for a relationship with an optional single embedded characteristic, set at creation and never changed.

Domain fragment for Ash domains that extend the Diffo Provider.

Ash Resource for a TMF Entity

Ash Resource for a TMF Entity Reference

Ash Resource for a TMF Event

Unified DSL extension for all Diffo provider resource kinds.

DSL entity for an inherited_party declaration inside parties do on an Instance resource.

DSL entity for an inherited_place declaration inside places do on an Instance resource.

DSL entity declaring a role a Party or Place kind plays with respect to Instances

DSL entity declaring a party role on an Instance

DSL entity declaring a role a Party or Place kind plays with respect to Parties

Persists characteristic declarations and bakes characteristics/0

Persists feature declarations and bakes features/0

Persists instance role declarations and bakes instances/0

Persists party declarations/roles and bakes parties/0

Persists place declarations/roles and bakes places/0

Persists pool declarations and bakes pools/0

Normalises specification DSL options, persists them, and bakes specification/0

DSL entity declaring a place role on an Instance

DSL entity declaring a role a Party or Place kind plays with respect to Places

Generates build_before/1 and build_after/2, and injects build arguments into declared create actions

Injects Ash calculations for inherited_place and inherited_party declarations

Resolves the relationships pipeline and bakes permitted_source_roles/0 and permitted_target_roles/0

Verifies that actions declared in behaviour do exist as Ash actions of the correct type

Verifies characteristic names are unique and value_type modules exist and extend BaseCharacteristic

Verifies feature names are unique and feature characteristic value_type modules exist and extend BaseCharacteristic

Verifies instance role declarations — no duplicates, instance_type modules must exist and extend BaseInstance

Verifies party declarations and roles — no duplicates, party_type modules must exist and extend BaseParty

Verifies place declarations and roles — no duplicates, place_type modules must exist and extend BasePlace

Verifies pool names are unique

Verifies that relationship role declarations are atoms, not modules or other invalid values

Verifies specification DSL values satisfy the Specification resource constraints

Ash Resource for a TMF ExternalIdentifier

Ash Resource for a TMF Feature

Ash Resource for a TMF Service or Resource Instance

Marker extension — identifies BaseInstance-derived resources. DSL is in Diffo.Provider.Extension.

PartyDeclaration - DSL entity declaring a party role on an Instance

Persists characteristic declarations and bakes characteristics/0

Persists feature declarations and bakes features/0

Persists party declarations and bakes parties/0

Persists place declarations and bakes places/0

Normalises specification DSL options, persists them, and bakes specification/0

PlaceDeclaration - DSL entity declaring a place role on an Instance

Verifies that actions declared in behaviour do exist as Ash actions of the correct type

Verifies that characteristic names are unique and value_type modules exist

Verifies that feature names are unique, feature characteristic names are unique, and value_type modules exist

Verifies party role declarations — no duplicates, party_type modules must exist

Verifies that the specification DSL values satisfy the Specification resource's attribute constraints

Public introspection API for resources extending Diffo.Provider.BaseInstance

Ash Resource for a TMF Note

Ash Resource for a TMF Party

Marker extension — identifies BaseParty-derived resources. DSL is in Diffo.Provider.Extension.

InstanceRole - DSL entity declaring a role this Party kind plays with respect to Instances

PartyRole - DSL entity declaring a role this Party kind plays with respect to other Parties

Persists instance role declarations and bakes instances/0

Persists party role declarations and bakes parties/0

Persists place role declarations and bakes places/0

PlaceRole - DSL entity declaring a role this Party kind plays with respect to Places

Verifies role declarations across instances, parties, and places sections

Ash Resource for a TMF PartyRef

Ash Resource for a TMF Place

Marker extension — identifies BasePlace-derived resources. DSL is in Diffo.Provider.Extension.

InstanceRole - DSL entity declaring a role this Place kind plays with respect to Instances

PartyRole - DSL entity declaring a role this Place kind plays with respect to Parties

Persists instance role declarations and bakes instances/0

Persists party role declarations and bakes parties/0

Persists place role declarations and bakes places/0

PlaceRole - DSL entity declaring a role this Place kind plays with respect to other Places

Verifies role declarations across instances, parties, and places sections

Ash Resource for a TMF Place Reference

Ash Resource for a TMF ProcessStatus

Ash Resource for a TMF Service or Resource Relationship

Ash Resource for a TMF Service or Resource Specification.

Ash type for a typed characteristic value.

Diffo.Type.Dynamic is an Ash.Type.NewType for values whose exact type is not known until runtime. The :type field holds the Ash.Type.NewType module and :value holds the cast value.

Ash TypedStruct for a named array of primitive values.

Ash TypedStruct for a named primitive value.

Diffo.Type.Primitive is a discriminated union of primitive types: string, integer, float, boolean, date, time, datetime, and duration.

Diffo.Unwrap is a protocol for extracting the underlying Elixir value from Diffo and Ash wrapper types. It is defined with @fallback_to_any true, so any value without an explicit implementation is returned unchanged.

Utility methods

Validate and/or create Uuid

Mix Tasks

Installs Diffo