AshDiagram.Data.Extension behaviour (AshDiagram v0.1.2)
View SourceProvides functions to extend AshDiagram generated diagrams.
Can be implemented in spark extensions to resources and domains to add custom data to the diagrams.
Summary
Callbacks
Extends the diagram with additional data. The function should return the extended diagram.
Checks if the extension creator supports the given creator.
Types
Callbacks
@callback extend_diagram( creator :: creator(), diagram :: AshDiagram.t(implementation) ) :: AshDiagram.t(implementation) when implementation: AshDiagram.implementation()
Extends the diagram with additional data. The function should return the extended diagram.
@callback supports?(creator :: creator()) :: boolean()
@callback supports?(creator :: module()) :: false
Checks if the extension creator supports the given creator.
Returns true
if the creator is supported, false
otherwise.
The function can add additional creators over time, false
must be returned
for all creators that are not supported.