Documentation
¶
Overview ¶
Package value supports values files and validation
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateSchemaFile ¶ added in v0.67.0
ValidateSchemaFile validates that a file at schemaPath is a valid JSON Schema. It checks that the file exists, is readable, and can be parsed as a valid JSON Schema.
Types ¶
type InvalidFileExtError ¶
InvalidFileExtError represents an error when a file has an invalid extension
func (*InvalidFileExtError) Error ¶
func (e *InvalidFileExtError) Error() string
type ParseFilesOptions ¶
type ParseFilesOptions struct {
}
ParseFilesOptions provides optional configuration for ParseFiles
type Path ¶
type Path string
Path starts with a . and represents a specific key in a nested hierarchy of keys. For example, .resources.limits.cpu resolves the value for "cpu" within the keyspace of Values.
type SchemaValidationError ¶ added in v0.67.0
type SchemaValidationError struct {
SchemaPath string
Errors []gojsonschema.ResultError
}
SchemaValidationError represents an error when JSON schema validation fails
func (*SchemaValidationError) Error ¶ added in v0.67.0
func (e *SchemaValidationError) Error() string
type ValidateOptions ¶ added in v0.67.0
type ValidateOptions struct {
// SkipRequired skips validation of required fields
SkipRequired bool
}
ValidateOptions provides optional configuration for Values validation
type Values ¶
Values provides a map of keys to values for use in templating and Helm overrides. NOTE(mkcp): Values is NOT thread-safe. If you need concurrent access:
- Use external synchronization (sync.RWMutex)
- Clone before passing to goroutines
func ParseFiles ¶
ParseFiles parses the given files in order, overwriting previous values with later values, and returns a merged Values map.
func ParseLocalFile ¶ added in v0.67.0
ParseLocalFile reads and parses a single local YAML file into a Values map.
func (Values) DeepMerge ¶
DeepMerge merges one or more Values maps recursively into the receiver via mutation. Later maps in the variadic arguments take precedence over earlier ones.
func (Values) Extract ¶
Extract retrieves a value from a nested Values map using dot notation path. Path format: ".key.subkey.value" where each dot represents a map level.
type YAMLDecodeError ¶
YAMLDecodeError represents an error when YAML parsing fails
func (*YAMLDecodeError) Error ¶
func (e *YAMLDecodeError) Error() string
func (*YAMLDecodeError) Unwrap ¶
func (e *YAMLDecodeError) Unwrap() error