validation

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: LGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDNS1123Name

func IsDNS1123Name(value string) error

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

func IsDisplayName

func IsDisplayName(value string) error

IsDisplayName test whether the given value meets the specification of the display name.

func IsEmail

func IsEmail(value string) error

IsEmail test whether the given value meets the specification of the email.

func IsHTTPSReachle

func IsHTTPSReachle(host string, port int32, timeout time.Duration) error

IsHTTPSReachle tests that https://host:port is reachble in timeout.

func IsPhoneNumber

func IsPhoneNumber(value string) error

IsPhoneNumber test whether the given value meets the specification of the phone number.

func IsSubNetOverlapped

func IsSubNetOverlapped(net1, net2 *net.IPNet) error

IsSubNetOverlapped test if two subnets are overlapped

func IsURL

func IsURL(value string) error

IsURL test whether the given value is a valid URL address.

func ValidateEnum

func ValidateEnum(value interface{}, fldPath *field.Path, values interface{}) field.ErrorList

ValidateEnum validates a given enum. nil or nil pointer is valid. zero value is invalid.

func ValidateRESTConfig

func ValidateRESTConfig(ctx context.Context, config *rest.Config) error

ValidateRESTConfig validates a given rest.Config.

Types

This section is empty.

Jump to

Keyboard shortcuts

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