Help us shape the future of Go! Take the 2026 Go Developer Survey

validation

package
v1.154.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 9 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShouldEnforceImmutability

func ShouldEnforceImmutability(newValues, oldValues []string) bool

ShouldEnforceImmutability compares the given slices and returns if a immutability should be enforced. It mainly checks if the order of the same elements in `newValues` and `oldValues` is the same, i.e. only an addition of elements to `newValues` is allowed.

func ValidateClientConnectionConfiguration added in v1.112.0

func ValidateClientConnectionConfiguration(config *componentbaseconfigv1alpha1.ClientConnectionConfiguration, fldPath *field.Path) field.ErrorList

ValidateClientConnectionConfiguration validates a componentbaseconfigv1alpha1.ClientConnectionConfiguration by converting it to the internal version and calling the validation from the k8s.io/component-base/config/validation package.

func ValidateFreeFormText added in v1.128.0

func ValidateFreeFormText(text string, fldPath *field.Path) field.ErrorList

ValidateFreeFormText checks that the given text contains only letters, digits, spaces, or punctuation characters. It uses the unicode package to determine character types, allowing a wide range of characters from various languages.

func ValidateLeaderElectionConfiguration added in v1.112.0

func ValidateLeaderElectionConfiguration(config *componentbaseconfigv1alpha1.LeaderElectionConfiguration, fldPath *field.Path) field.ErrorList

ValidateLeaderElectionConfiguration validates a componentbaseconfigv1alpha1.LeaderElectionConfiguration by converting it to the internal version and calling the validation from the k8s.io/component-base/config/validation package.

Types

This section is empty.

Directories

Path Synopsis
kubernetes

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL