Validates %Artefact{} structs against the structural rules
documented in Artefact.
Public predicates and validators are surfaced through Artefact
itself via defdelegate; this module is the implementation home.
An artefact is valid when:
- its uuid is a valid UUIDv7
:title,:description,:base_labelare eachnilor a string:graphis%Artefact.Graph{}with list:nodesand:relationships- every node has a non-empty string
:id, a UUIDv7:uuid, a list of string:labels, and a map:properties - every relationship has a non-empty string
:id, a non-empty string:type,:from_idand:to_idreferring to extant nodes, and a map:properties - node uuids, node ids and relationship ids are unique within the graph
Summary
Functions
Returns true when value is an %Artefact{} struct.
Returns true when value is a valid artefact.
Validate an artefact. Returns :ok or {:error, %Artefact.Error.Invalid{reasons: [...]}}.
Validate an artefact. Returns :ok or raises Artefact.Error.Invalid
with the collected reasons.
Functions
Returns true when value is an %Artefact{} struct.
Returns true when value is a valid artefact.
Validate an artefact. Returns :ok or {:error, %Artefact.Error.Invalid{reasons: [...]}}.
:reasons is a list of human-readable strings, one per rule
violation, in source order.
Validate an artefact. Returns :ok or raises Artefact.Error.Invalid
with the collected reasons.