validation

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ValidateAnnotations to contain size and data format

Functions

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 ValidateIntegrationClassName

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

ValidateIntegrationClassName validates class name TODO: should be moved to katanomi/pkg

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 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 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