feat(infra): tipos ConfigError y ConfigValidation + funciones puras Go (validate, merge, dump)

- ConfigError y ConfigValidation como tipos producto con sus .md en types/infra/
- config_validate: validacion con tags required/format/min/max/oneof via reflection
- config_merge: merge no-mutante de map[string]string con precedencia de override
- config_dump: serializacion de structs a map con mascara *** para campos secret
- 17 tests unitarios, todos PASS

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-13 02:01:43 +02:00
parent 092f14eff0
commit 3d515aa441
13 changed files with 676 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
package infra
// ConfigError represents a single validation error for a configuration field.
type ConfigError struct {
Field string // struct field name or env var name
Message string // human-readable error description
Tag string // validation tag that triggered the error (e.g. "required", "format")
}