validation

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2025 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package validation contains useful validation functions

Index

Constants

View Source
const DNS1123UnderscoreLabelMaxLength int = validation.DNS1123LabelMaxLength

DNS1123UnderscoreLabelMaxLength is a label's max length in DNS (RFC 1123)

Variables

ValidateAnnotations to contain size and data format

Functions

func IsDNS1123UnderscoreLabel

func IsDNS1123UnderscoreLabel(value string) []string

IsDNS1123UnderscoreLabel tests for a string that conforms to the definition of a label in DNS (RFC 1123) but accepting underscores in the middle.

func IsGenericResourceName

func IsGenericResourceName(value string) []string

func ReturnInvalidError

func ReturnInvalidError(gk schema.GroupKind, name string, errs field.ErrorList) error

ReturnInvalidError returns a Invalid error if the error list is not empty

func ValidateAddressable

func ValidateAddressable(addr duckv1.Addressable, optional bool, fld *field.Path) field.ErrorList

ValidateAddressable validates an addressable for non-optional addresses

func ValidateCommonObject

func ValidateCommonObject(obj metav1.Object) field.ErrorList

ValidateCommonObject common validations for objects in katanomi, includes, name, annotations etc.

func ValidateDuplicatedName

func ValidateDuplicatedName(fld *field.Path, name string, names sets.String) (errs field.ErrorList)

ValidateDuplicatedName makes sure there is only one name in the same set

func ValidateGenericResourceName

func ValidateGenericResourceName(name string, fld *field.Path) field.ErrorList

func ValidateItemName

func ValidateItemName(name string, prefix bool, fld *field.Path) field.ErrorList

ValidateItemName validates a name of an item in a slice. this is used in

Integration resources,  volumes and etc

func ValidateItemNameUnderscore

func ValidateItemNameUnderscore(name string, fld *field.Path) field.ErrorList

ValidateItemNameUnderscore validates a name of an item in a slice. this is used in resources, volumes and etc

func ValidateName

func ValidateName(obj metav1.Object, fld *field.Path) field.ErrorList

ValidateName standard name validation for all katanomi types uses the same validation of namespace objects

func ValidateObjectReference

func ValidateObjectReference(objref *corev1.ObjectReference, optional, needsResourceType bool, fld *field.Path) field.ErrorList

ValidateObjectReference validates an object reference

func ValidateRegExp

func ValidateRegExp(pattern string, fld *field.Path) field.ErrorList

ValidateRegExp validates that the string is a valid regular expression.

func ValidateResourceNameWithChinese

func ValidateResourceNameWithChinese(name string, fld *field.Path) field.ErrorList

func ValidateURL

func ValidateURL(uri *apis.URL, path *field.Path) field.ErrorList

ValidateURL validates if a specific URL is valid

Types

This section is empty.

Jump to

Keyboard shortcuts

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