Stateful in-process registry of validation rules.
Holds mutable process state (the rule registry and execution-tracking atoms), so it lives in the shell — the functional core (wagoe.core.validation.registry) keeps only the pure rule-shape and conflict helpers. Provides registration, lookup, and coverage tracking for validation rules across modules.
Rule format: see wagoe.core.validation.registry.
Stateful in-process registry of validation rules. Holds mutable process state (the rule registry and execution-tracking atoms), so it lives in the shell — the functional core (wagoe.core.validation.registry) keeps only the pure rule-shape and conflict helpers. Provides registration, lookup, and coverage tracking for validation rules across modules. Rule format: see wagoe.core.validation.registry.
(clear-registry!)Clear all rules and execution tracking (primarily for testing).
Clear all rules and execution tracking (primarily for testing).
(conflicting-rules)Return conflict maps for the currently-registered rules (delegates to the pure core/find-conflicting-rules).
Return conflict maps for the currently-registered rules (delegates to the pure core/find-conflicting-rules).
(get-all-rules)Get all registered rules as a vector.
Get all registered rules as a vector.
(get-execution-count rule-id)Get execution count for a rule (0 if never executed).
Get execution count for a rule (0 if never executed).
(get-execution-stats)Get execution statistics for all rules: {:total-rules N :executed-rules N :coverage-percent F :by-rule {...}}.
Get execution statistics for all rules:
{:total-rules N :executed-rules N :coverage-percent F :by-rule {...}}.(get-rule rule-id)Retrieve a rule definition by id, or nil.
Retrieve a rule definition by id, or nil.
(get-rules-by-category category)Get all rules of a specific category keyword.
Get all rules of a specific category keyword.
(get-rules-by-module module)Get all rules for a specific module keyword.
Get all rules for a specific module keyword.
(get-rules-for-field field)Get all rules that validate a specific field keyword.
Get all rules that validate a specific field keyword.
(register-rule! rule)Register a validation rule in the global registry.
Throws ex-info if :rule-id is missing or already registered. Returns the registered rule definition.
Register a validation rule in the global registry. Throws ex-info if :rule-id is missing or already registered. Returns the registered rule definition.
(register-rules! rule-defs)Register multiple validation rules. Returns a vector of registered rules.
Register multiple validation rules. Returns a vector of registered rules.
(registry-ready?)True when the registry has at least one rule registered.
True when the registry has at least one rule registered.
(registry-stats)Get statistics about the rule registry (counts by module, category, etc.).
Get statistics about the rule registry (counts by module, category, etc.).
(reset-execution-tracking!)Reset all execution tracking (for testing/benchmarking).
Reset all execution tracking (for testing/benchmarking).
(track-rule-execution! rule-id)Record that a rule was executed. Returns the updated tracking map.
Record that a rule was executed. Returns the updated tracking map.
(unregister-rule! rule-id)Remove a rule from the registry (primarily for testing). Returns the removed rule definition or nil.
Remove a rule from the registry (primarily for testing). Returns the removed rule definition or nil.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |