validation

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2025 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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