Documentation
¶
Overview ¶
Package validate hosts reusable validation primitives for FastConf.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewValidator ¶
NewValidator wraps a Schema into a FastConf-compatible validator function suitable for passing to fastconf.WithValidator[T]. When schema is nil the returned function always reports an error so misconfiguration is surfaced early instead of silently passing every reload.
Types ¶
type Schema ¶
Schema is the minimal contract a schema-style validator must satisfy. Implementations live in sub-modules so the parent fastconf module stays free of their heavy dependencies (cuelang.org/go, go-playground/validator, jsonschema engines, etc.).
ValidateJSON receives the canonical JSON encoding of the FastConf state and returns nil on success or a descriptive error on failure (paths to offending fields recommended).