Documentation ¶
Index ¶
- Constants
- func IsCIdentifier(value string) bool
- func IsDNS1123Label(value string) bool
- func IsDNS1123Subdomain(value string) bool
- func IsDNS952Label(value string) bool
- func IsHTTPHeaderName(value string) bool
- func IsQualifiedName(value string) bool
- func IsValidGroupId(gid int64) bool
- func IsValidIP(value string) bool
- func IsValidLabelValue(value string) bool
- func IsValidPercent(percent string) bool
- func IsValidPortName(port string) bool
- func IsValidPortNum(port int) bool
- func IsValidUserId(uid int64) bool
Constants ¶
const CIdentifierFmt string = "[A-Za-z_][A-Za-z0-9_]*"
const DNS1123LabelFmt string = "[a-z0-9]([-a-z0-9]*[a-z0-9])?"
const DNS1123LabelMaxLength int = 63
const DNS1123SubdomainFmt string = DNS1123LabelFmt + "(\\." + DNS1123LabelFmt + ")*"
const DNS1123SubdomainMaxLength int = 253
const DNS952LabelFmt string = "[a-z]([-a-z0-9]*[a-z0-9])?"
const DNS952LabelMaxLength int = 24
const HTTPHeaderNameFmt string = "[-A-Za-z0-9]+"
const IdentifierNoHyphensBeginEndFmt string = "[a-z0-9]([a-z0-9-]*[a-z0-9])*"
const LabelValueFmt string = "(" + QualifiedNameFmt + ")?"
const LabelValueMaxLength int = 63
const QualifiedNameFmt string = "(" + qnameCharFmt + qnameExtCharFmt + "*)?" + qnameCharFmt
const QualifiedNameMaxLength int = 63
Variables ¶
This section is empty.
Functions ¶
func IsCIdentifier ¶
IsCIdentifier tests for a string that conforms the definition of an identifier in C. This checks the format, but not the length.
func IsDNS1123Label ¶
IsDNS1123Label tests for a string that conforms to the definition of a label in DNS (RFC 1123).
func IsDNS1123Subdomain ¶
IsDNS1123Subdomain tests for a string that conforms to the definition of a subdomain in DNS (RFC 1123).
func IsDNS952Label ¶
IsDNS952Label tests for a string that conforms to the definition of a label in DNS (RFC 952).
func IsHTTPHeaderName ¶ added in v1.2.0
IsHTTPHeaderName checks that a string conforms to the Go HTTP library's definition of a valid header field name (a stricter subset than RFC7230).
func IsQualifiedName ¶
func IsValidGroupId ¶ added in v1.2.0
IsValidGroupId tests that the argument is a valid gids.
func IsValidLabelValue ¶
func IsValidPercent ¶
func IsValidPortName ¶
IsValidPortName check that the argument is valid syntax. It must be non empty and no more than 15 characters long It must contains at least one letter [a-z] and it must contains only [a-z0-9-]. Hypens ('-') cannot be leading or trailing character of the string and cannot be adjacent to other hyphens. Although RFC 6335 allows upper and lower case characters but case is ignored for comparison purposes: (HTTP and http denote the same service).
func IsValidPortNum ¶
IsValidPortNum tests that the argument is a valid, non-zero port number.
func IsValidUserId ¶ added in v1.2.0
IsValidUserId tests that the argument is a valid uids.
Types ¶
This section is empty.