validation

package
v0.2.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DNSName              string = `^([a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62}){1}(\.[a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62})*[\._]?$`
	SkipVerifyAnnotation        = "onex.io/skip-verify"
)

Variables

This section is empty.

Functions

func GetValidateFuncs

func GetValidateFuncs(v any) map[string]reflect.Value

func IsAdminUser

func IsAdminUser(userID string) bool

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 IsPhoneNumber

func IsPhoneNumber(value string) error

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

func IsURL

func IsURL(value string) error

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

func IsValiadURL

func IsValiadURL(url string, timeout time.Duration) error

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

func IsValidDNSName

func IsValidDNSName(str string) bool

func IsValidIP

func IsValidIP(str string) bool

func SkipVerify

func SkipVerify(obj metav1.Object) bool

func ValidateHostPort

func ValidateHostPort(input string, fldPath *field.Path) field.ErrorList

Types

This section is empty.

Jump to

Keyboard shortcuts

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