validate

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NameMinLen        = 1
	NameMaxLen        = 64
	DescriptionMinLen = 1
	DescriptionMaxLen = 64
)
View Source
const (
	NodePortMin = 30000
	NodePortMax = 32767
)

Variables

Functions

func FormatString

func FormatString(s string) string

func IsIllegalLength

func IsIllegalLength(s string, min int, max int) bool

验证字符长度

func IsReservedBuName

func IsReservedBuName(s string) error

系统保留的关键字

func Restricted

func Restricted(s, regdata string) bool

正则表达式验证字符合法性

func ValidateDescription

func ValidateDescription(s string) error

func ValidateEmail

func ValidateEmail(s string) error

func ValidateKubernetesName

func ValidateKubernetesName(s string) error

func ValidateLabels

func ValidateLabels(object string, labels map[string]string) error

func ValidateName

func ValidateName(s string) error

func ValidateNodePortNum

func ValidateNodePortNum(nodePort int32) error

func ValidatePortNum

func ValidatePortNum(port int32) error

func ValidateString

func ValidateString(s string) error

字符串验证

Types

This section is empty.

Jump to

Keyboard shortcuts

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