Documentation
¶
Overview ¶
Package schema provides validation for graph data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ValidationError ¶
ValidationError represents a validation failure.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
type Validator ¶
type Validator struct {
// AllowedNodeTypes restricts node types. If empty, all types are allowed.
AllowedNodeTypes []string
// AllowedEdgeTypes restricts edge types. If empty, all types are allowed.
AllowedEdgeTypes []string
// RequireNodeLabel requires all nodes to have a non-empty label.
RequireNodeLabel bool
}
Validator validates graph data against schema rules.
func NewValidator ¶
func NewValidator() *Validator
NewValidator creates a validator with default settings.
func (*Validator) ValidateEdge ¶
ValidateEdge validates a single edge.
func (*Validator) ValidateEdgeRefs ¶
ValidateEdgeRefs validates that edge references exist in the node set.
func (*Validator) ValidateGraph ¶
ValidateGraph validates an entire graph.
Click to show internal directories.
Click to hide internal directories.