validation

package
v0.0.0-...-a85ed07 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2016 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const CIdentifierFmt string = "[A-Za-z_][A-Za-z0-9_]*"
View Source
const DNS1123LabelFmt string = "[a-z0-9]([-a-z0-9]*[a-z0-9])?"
View Source
const DNS1123LabelMaxLength int = 63
View Source
const DNS1123SubdomainFmt string = DNS1123LabelFmt + "(\\." + DNS1123LabelFmt + ")*"
View Source
const DNS1123SubdomainMaxLength int = 253
View Source
const DNS952LabelFmt string = "[a-z]([-a-z0-9]*[a-z0-9])?"
View Source
const DNS952LabelMaxLength int = 24
View Source
const IdentifierNoHyphensBeginEndFmt string = "[a-z0-9]([a-z0-9-]*[a-z0-9])*"
View Source
const LabelValueFmt string = "(" + QualifiedNameFmt + ")?"
View Source
const LabelValueMaxLength int = 63
View Source
const QualifiedNameFmt string = "(" + qnameCharFmt + qnameExtCharFmt + "*)?" + qnameCharFmt
View Source
const QualifiedNameMaxLength int = 63

Variables

This section is empty.

Functions

func IsCIdentifier

func IsCIdentifier(value string) bool

IsCIdentifier tests for a string that conforms the definition of an identifier in C. This checks the format, but not the length.

func IsDNS1123Label

func IsDNS1123Label(value string) bool

IsDNS1123Label tests for a string that conforms to the definition of a label in DNS (RFC 1123).

func IsDNS1123Subdomain

func IsDNS1123Subdomain(value string) bool

IsDNS1123Subdomain tests for a string that conforms to the definition of a subdomain in DNS (RFC 1123).

func IsDNS952Label

func IsDNS952Label(value string) bool

IsDNS952Label tests for a string that conforms to the definition of a label in DNS (RFC 952).

func IsQualifiedName

func IsQualifiedName(value string) bool

func IsValidIPv4

func IsValidIPv4(value string) bool

IsValidIPv4 tests that the argument is a valid IPv4 address.

func IsValidLabelValue

func IsValidLabelValue(value string) bool

func IsValidPercent

func IsValidPercent(percent string) bool

func IsValidPortName

func IsValidPortName(port string) bool

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

func IsValidPortNum(port int) bool

IsValidPortNum tests that the argument is a valid, non-zero port number.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL