Documentation
¶
Overview ¶
Package validatorutil shares the SchemaLookup construction logic the CLI's `prism validate` command and the Twirp `Validate` RPC both need. The function used to live as a private helper in `cmd/prism/cmd_validate.go`; P14's Twirp service forced the move when `rpc/` started needing the same wiring without pulling in `cmd/prism` (circular).
BuildLookup walks the spec's data + datasets bindings and registers each under both an in-memory StaticLookup (so inline values feed semantic rules) and a PulseLookup (so on-disk .pulse files feed field-existence + scale-compat rules). When any Pulse-backed dataset is present the result is a CompositeLookup (Pulse first, Static fallback); pure-inline specs get the StaticLookup alone.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildLookup ¶
BuildLookup builds a SchemaLookup for the spec. fs may be nil; the default is afero.NewOsFs(). The function never returns nil — a spec with no data still gets an empty StaticLookup so callers do not nil-check.
Types ¶
This section is empty.