Files
schemas/internal/validation/decode.go

18 lines
543 B
Go

// Package validation supports the repository's internal contract checks.
package validation
import (
"fmt"
"go.maximumdirect.net/configkit"
)
// LoadDomain acquires a completed domain mapping through the pinned native
// ConfigKit boundary. Schema and semantic validation consume its result directly.
func LoadDomain(label string, data []byte) (map[string]any, error) {
result, err := configkit.Load[map[string]any](configkit.Bytes(label, data))
if err != nil {
return nil, fmt.Errorf("load: %w", err)
}
return result.Config, nil
}