package
7.0.1+incompatible
Repository: https://github.com/apache/trafficcontrol.git
Documentation: pkg.go.dev

# Functions

IsAlphanumericDash returns true if the string consists of only alphanumeric or dash characters.
IsAlphanumericUnderscoreDash returns true if the string consists of only alphanumeric, underscore, or dash characters.
IsGreaterThanZero returns an error if the given value is not nil and is not a pointer to a value that is strictly greater than zero.
IsOneOfString generates a validator function returning whether a passed string is in the given set of strings.
IsOneOfStringICase is a case-insensitive version of IsOneOfString.
IsPtrToSliceOfUniqueStringersICase returns a validator function which returns an error if the argument is a non-nil pointer to a slice of fmt.Stringers whose String() values are not in the set of strings or if the argument contains more than one entry that produce the same value from their String() method.
IsValidIPv6CIDROrAddress returns an error if the given value is not a pointer to a string that is a valid IPv6 address with optional CIDR-notation network prefix.
IsValidPortNumber returns an error if the given value is not nil and is not a valid network port number or a pointer to a valid network port number.
NewDBExistsRule creates a new validation rule that checks if a value is in the given column of the given table.
NewDBUniqueRule creates a validation rule that checks if a value is in the given column of the given table, and that there is exactly one row containing that value in said table.
NoLineBreaks returns true if the string has no line breaks.
NoPeriods returns true if the string has no periods.
NoSpaces returns true if the string has no spaces.
StringIsValidFloat returns a reference to a validation.StringRule function that only returns true if the string value given string argument can be parsed to a 64-bit float that is not NaN.
ToError converts a map of strings to errors into a single error.
ToErrors converts a map of strings to errors into an array of errors.

# Structs

DBExistsRule is a rule used to check if a given value is in a certain column of a specific table.
DBUniqueRule is a rule used to check if a given value is in a certain column of a specific table, and that there is exactly one row containing that value in said table.