Documentation
¶
Overview ¶
Package configvalidate runs the struct-tag validation declared on pkg/config's schema.
Kept out of pkg/config so that package stays at its own dependency weight: a caller that only needs the types pays nothing for go-playground/validator, and one that wants validation opts into ~20 extra packages by importing this.
Split out of pkg/config/parser so it can be reached without that package's parsing machinery — obmondo-api-go renders this config server-side and must be able to reject bad output before serving it, which previously meant importing a ~1180-package graph.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StructTags ¶ added in v0.31.4
func StructTags(generalConfig *config.GeneralConfig, secretsConfig *config.SecretsConfig) error
StructTags validates generalConfig and secretsConfig against the validate: tags declared on them.
This is schema validation only — it does not apply defaults, parse URLs, read SSH keys or reach the network, all of which pkg/config/parser does around it. Callers holding a freshly unmarshalled config should apply defaults first, or fields carrying both a default and notblank will fail.
Types ¶
This section is empty.