{"modulePath":"github.com/AlaudaDevops/pkg","version":"v0.14.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package validation\n\nPackage validation contains useful validation functions\n\n## Constants\n\n```go\nconst DNS1123UnderscoreLabelMaxLength int = validation.DNS1123LabelMaxLength\n```\nDNS1123UnderscoreLabelMaxLength is a label's max length in DNS (RFC 1123)\n\n## Variables\n\n```go\nvar ValidateAnnotations = apimachineryvalidation.ValidateAnnotations\n```\nValidateAnnotations to contain size and data format\n\n## Functions\n\n```go\nfunc IsDNS1123UnderscoreLabel(value string) []string\n```\nIsDNS1123UnderscoreLabel tests for a string that conforms to the definition of a label in DNS (RFC 1123) but accepting underscores in the middle.\n\n```go\nfunc IsGenericResourceName(value string) []string\n```\n\n```go\nfunc ReturnInvalidError(gk schema.GroupKind, name string, errs field.ErrorList) error\n```\nReturnInvalidError returns a Invalid error if the error list is not empty\n\n```go\nfunc ValidateAddressable(addr duckv1.Addressable, optional bool, fld *field.Path) field.ErrorList\n```\nValidateAddressable validates an addressable for non-optional addresses\n\n```go\nfunc ValidateCommonObject(obj metav1.Object) field.ErrorList\n```\nValidateCommonObject common validations for objects in katanomi, includes, name, annotations etc.\n\n```go\nfunc ValidateDuplicatedName(fld *field.Path, name string, names sets.String) (errs field.ErrorList)\n```\nValidateDuplicatedName makes sure there is only one name in the same set\n\n```go\nfunc ValidateGenericResourceName(name string, fld *field.Path) field.ErrorList\n```\n\n```go\nfunc ValidateItemName(name string, prefix bool, fld *field.Path) field.ErrorList\n```\nValidateItemName validates a name of an item in a slice. this is used in\n\n\tIntegration resources,  volumes and etc\n\n```go\nfunc ValidateItemNameUnderscore(name string, fld *field.Path) field.ErrorList\n```\nValidateItemNameUnderscore validates a name of an item in a slice. this is used in resources,  volumes and etc\n\n```go\nfunc ValidateName(obj metav1.Object, fld *field.Path) field.ErrorList\n```\nValidateName standard name validation for all katanomi types uses the same validation of namespace objects\n\n```go\nfunc ValidateObjectReference(objref *corev1.ObjectReference, optional, needsResourceType bool, fld *field.Path) field.ErrorList\n```\nValidateObjectReference validates an object reference\n\n```go\nfunc ValidateRegExp(pattern string, fld *field.Path) field.ErrorList\n```\nValidateRegExp validates that the string is a valid regular expression.\n\n```go\nfunc ValidateResourceNameWithChinese(name string, fld *field.Path) field.ErrorList\n```\n\n```go\nfunc ValidateURL(uri *apis.URL, path *field.Path) field.ErrorList\n```\nValidateURL validates if a specific URL is valid\n\n","path":"github.com/AlaudaDevops/pkg/apis/validation","name":"validation","synopsis":"Package validation contains useful validation functions","isRedistributable":true}
