kubernetes/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/helpers.go

type ValidationError

// Error returns a human readable error message.
func (ve ValidationError) Error() string {}

type ValidationErrors

// Error returns a human readable error message reporting each error in the
// list.
func (errs ValidationErrors) Error() string {}

// Set the given path to all the validation errors.
func (errs ValidationErrors) WithPath(p string) ValidationErrors {}

// WithPrefix prefixes all errors path with the given pathelement. This
// is useful when unwinding the stack on errors.
func (errs ValidationErrors) WithPrefix(prefix string) ValidationErrors {}

// WithLazyPrefix prefixes all errors path with the given pathelement.
// This is useful when unwinding the stack on errors. Prefix is
// computed lazily only if there is an error.
func (errs ValidationErrors) WithLazyPrefix(fn func() string) ValidationErrors {}

func errorf(format string, args ...interface{}

type atomHandler

func resolveSchema(s *schema.Schema, tr schema.TypeRef, v value.Value, ah atomHandler) ValidationErrors {}

// deduceAtom determines which of the possible types in atom 'atom' applies to value 'val'.
// If val is of a type allowed by atom, return a copy of atom with all other types set to nil.
// if val is nil, or is not of a type allowed by atom, just return the original atom,
// and validation will fail at a later stage. (with a more useful error)
func deduceAtom(atom schema.Atom, val value.Value) schema.Atom {}

func handleAtom(a schema.Atom, tr schema.TypeRef, ah atomHandler) ValidationErrors {}

// Returns the list, or an error. Reminder: nil is a valid list and might be returned.
func listValue(a value.Allocator, val value.Value) (value.List, error) {}

// Returns the map, or an error. Reminder: nil is a valid map and might be returned.
func mapValue(a value.Allocator, val value.Value) (value.Map, error) {}

func getAssociativeKeyDefault(s *schema.Schema, list *schema.List, fieldName string) (interface{}

func keyedAssociativeListItemToPathElement(a value.Allocator, s *schema.Schema, list *schema.List, child value.Value) (fieldpath.PathElement, error) {}

func setItemToPathElement(child value.Value) (fieldpath.PathElement, error) {}

func listItemToPathElement(a value.Allocator, s *schema.Schema, list *schema.List, child value.Value) (fieldpath.PathElement, error) {}