{"modulePath":"github.com/UnityTech/client-go","version":"v2.0.0+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package validation\n\n## Constants\n\n```go\nconst DNS1035LabelMaxLength int = 63\n```\n\n```go\nconst DNS1123LabelMaxLength int = 63\n```\n\n```go\nconst DNS1123SubdomainMaxLength int = 253\n```\n\n```go\nconst LabelValueMaxLength int = 63\n```\n\n## Functions\n\n```go\nfunc EmptyError() string\n```\nEmptyError returns a string explanation of a \"must not be empty\" validation failure.\n\n```go\nfunc InclusiveRangeError(lo, hi int) string\n```\nInclusiveRangeError returns a string explanation of a numeric \"must be between\" validation failure.\n\n```go\nfunc IsCIdentifier(value string) []string\n```\nIsCIdentifier tests for a string that conforms the definition of an identifier in C. This checks the format, but not the length.\n\n```go\nfunc IsConfigMapKey(value string) []string\n```\nIsConfigMapKey tests for a string that is a valid key for a ConfigMap or Secret\n\n```go\nfunc IsDNS1035Label(value string) []string\n```\nIsDNS1035Label tests for a string that conforms to the definition of a label in DNS (RFC 1035).\n\n```go\nfunc IsDNS1123Label(value string) []string\n```\nIsDNS1123Label tests for a string that conforms to the definition of a label in DNS (RFC 1123).\n\n```go\nfunc IsDNS1123Subdomain(value string) []string\n```\nIsDNS1123Subdomain tests for a string that conforms to the definition of a subdomain in DNS (RFC 1123).\n\n```go\nfunc IsHTTPHeaderName(value string) []string\n```\nIsHTTPHeaderName checks that a string conforms to the Go HTTP library's definition of a valid header field name (a stricter subset than RFC7230).\n\n```go\nfunc IsQualifiedName(value string) []string\n```\nIsQualifiedName tests whether the value passed is what Kubernetes calls a \"qualified name\".  This is a format used in various places throughout the system.  If the value is not valid, a list of error strings is returned. Otherwise an empty list (or nil) is returned.\n\n```go\nfunc IsValidGroupId(gid int64) []string\n```\nIsValidGroupId tests that the argument is a valid Unix GID.\n\n```go\nfunc IsValidIP(value string) []string\n```\nIsValidIP tests that the argument is a valid IP address.\n\n```go\nfunc IsValidLabelValue(value string) []string\n```\nIsValidLabelValue tests whether the value passed is a valid label value.  If the value is not valid, a list of error strings is returned.  Otherwise an empty list (or nil) is returned.\n\n```go\nfunc IsValidPercent(percent string) []string\n```\n\n```go\nfunc IsValidPortName(port string) []string\n```\nIsValidPortName check that the argument is valid syntax. It must be non-empty and no more than 15 characters long. It may contain only \\[-a-z0-9] and must contain at least one letter \\[a-z]. It must not start or end with a hyphen, nor contain adjacent hyphens.\n\nNote: We only allow lower-case characters, even though RFC 6335 is case insensitive.\n\n```go\nfunc IsValidPortNum(port int) []string\n```\nIsValidPortNum tests that the argument is a valid, non-zero port number.\n\n```go\nfunc IsValidUserId(uid int64) []string\n```\nIsValidUserId tests that the argument is a valid Unix UID.\n\n```go\nfunc IsWildcardDNS1123Subdomain(value string) []string\n```\nIsWildcardDNS1123Subdomain tests for a string that conforms to the definition of a wildcard subdomain in DNS (RFC 1034 section 4.3.3).\n\n```go\nfunc MaxLenError(length int) string\n```\nMaxLenError returns a string explanation of a \"string too long\" validation failure.\n\n```go\nfunc RegexError(fmt string, examples ...string) string\n```\nRegexError returns a string explanation of a regex validation failure.\n\n","path":"github.com/UnityTech/client-go/pkg/util/validation","name":"validation","synopsis":"","isRedistributable":true}
