Modules
GuardedStruct macro: build structs with validation, sanitization, constructors, and nested-struct support.
A Spark DSL extension that adds the GuardedStruct DSL to an Ash resource.
An Ash.Resource.Change module that plugs __guarded_change__/1 into the
Ash changeset pipeline.
Runtime introspection for the GuardedStruct.AshResource extension.
Define custom derive validators / sanitizers via a Spark DSL.
Built-in sanitizer ops. Every clause follows the pipe-friendly
sanitize(value, op) argument order
Field-level diffs between two GuardedStruct instances.
Splode error aggregator for GuardedStruct runtime errors.
Single field-level validation error.
Runtime introspection of guardedstruct DSL state.
This module is used to define the messages that are used in the guarded_struct library. You can define your own messages by creating a module that uses this module and implements the callbacks defined in this module. It can be used to define messages in multiple languages like using Gettext.
Standalone validators that reuse a GuardedStruct schema without going
through the full builder/1 pipeline.
Mix Tasks
One-command project setup for guarded_struct