Documentation
¶
Index ¶
- Constants
- Variables
- func AlsoRequiresEqualBool(expression path.Expression, objs ...attr.Value) validator.Bool
- func AlsoRequiresEqualInt32(expression path.Expression, objs ...attr.Value) validator.Int32
- func AlsoRequiresEqualInt64(expression path.Expression, objs ...attr.Value) validator.Int64
- func AlsoRequiresEqualList(expression path.Expression, objs ...attr.Value) validator.List
- func AlsoRequiresEqualObject(expression path.Expression, objs ...attr.Value) validator.Object
- func AlsoRequiresEqualSet(expression path.Expression, objs ...attr.Value) validator.Set
- func AlsoRequiresEqualString(expression path.Expression, objs ...attr.Value) validator.String
- func AuthAddr() validator.String
- func Cidr() validator.String
- func ConflictsWithEqualBool(expression path.Expression, objs ...attr.Value) validator.Bool
- func ConflictsWithEqualInt32(expression path.Expression, objs ...attr.Value) validator.Int32
- func ConflictsWithEqualInt64(expression path.Expression, objs ...attr.Value) validator.Int64
- func ConflictsWithEqualObject(expression path.Expression, objs ...attr.Value) validator.Object
- func ConflictsWithEqualSet(expression path.Expression, objs ...attr.Value) validator.Set
- func ConflictsWithEqualString(expression path.Expression, objs ...attr.Value) validator.String
- func CrossFieldBool(expression path.Expression, sourceValues, targetValues []attr.Value) validator.Bool
- func CycleCount(monthMinInclude, monthMaxInclude, yearMinInclude, yearMaxInclude int) validator.Int64
- func DBPassword(minLength, maxLength, typeNum int, name, specialChars string) validator.String
- func Desc() validator.String
- func EbmPassword() validator.String
- func EcsName() validator.String
- func EcsPassword() validator.String
- func EipValidate() validator.String
- func Email() validator.String
- func Ip() validator.String
- func Json(key ...string) validator.String
- func KeypairName() validator.String
- func MongodbClusterFieldValidate() validator.String
- func Phone() validator.String
- func Project() validator.String
- func Range(splitter string, min int, max int) validator.String
- func RedisPassword() validator.String
- func ScalingConfigNameValidate() validator.String
- func ScalingConfigPasswordValidate() validator.String
- func ScalingCountValidate() validator.Int32
- func ScalingPolicyDayValidate() validator.Set
- func SecurityGroupValidate() validator.String
- func SetExist(f CheckFunc[types.Set]) validator.Set
- func SfsSize() validator.Int32
- func StringExist(f CheckFunc[types.String]) validator.String
- func StringLetterIn(letters ...int32) validator.String
- func SubnetValidate() validator.String
- func UUID() validator.String
- func ValidateIP(ip string) bool
- func ValidateIPv4(ip string) bool
- func ValidateIPv6(ip string) bool
- func VpcValidate() validator.String
- func Yaml(key ...string) validator.String
- type CheckFunc
Constants ¶
View Source
const ( AuthAddrError = "不满足auth_addr ip CIDR格式" AuthAddrIpError = "auth_addr的ip部分有误" AuthAddrMaskError = "auth_addr的掩码部分有误" )
View Source
const ( ScalingConfigNameError = "不满足scaling config name格式" ScalingConfigNameLength = "名称长度必须为2~15个字符" ScalingConfigNameStart = "不能以点号(.)或连字符(-)开头" ScalingConfigNameEnd = "不能以点号(.)或连字符(-)结尾" ScalingConfigNameNum = "不能仅使用数字" )
View Source
const ( ScalingConfigNamePwError = "不满足scaling config password格式" ScalingConfigNamePwLengthError = "密码长度必须为8~30个字符" ScalingConfigNamePwStartError = "不能以斜线号(/)开头" ScalingConfigNamePwWindowsError = "Windows密码不能包含管理员用户名" ScalingConfigNamePwTypeError = "密码必须包含大写字母、小写字母、数字和特殊符号中的至少3类" ScalingConfigNamePwSeqCharError = "密码不能包含3个及以上连续字符" ScalingConfigNamePwSeqNumError = "密码不能包含3个及以上连续数字" )
View Source
const ( ScalingPolicyDayError = "day取值有误,当cycle=monthly时,取值范围为[1,31],当cycle=weekly时,取值范围为[1,7]" ScalingPolicyDayDailyError = "day取值有误,当cycle=daily时,无需填写" ScalingPolicyDayNullError = "day取值有误,当cycle=monthly和weekly时,day不能为空" )
View Source
const (
CidrError = "不满足cidr格式"
)
View Source
const (
DescError = "" /* 145-byte string literal not displayed */
)
View Source
const (
EipError = "不满足EipID格式"
)
View Source
const (
EmailError = "不满足邮箱格式"
)
View Source
const (
IpError = "不满足ip格式"
)
View Source
const (
JsonError = "不满足JSON格式"
)
View Source
const (
MongodbClusterError = "只有mongodb类型为集群版,该字段才可以填写"
)
View Source
const (
PhoneError = "不满足手机号格式"
)
View Source
const (
ProjectError = "不满足 允许 \"\",\"0\"和长度为32位的数字+小写"
)
View Source
const (
RangeError = "不满足范围格式要求"
)
View Source
const (
ScalingCountError = "弹性伸缩组实例个数有误"
)
View Source
const (
SecurityGroupError = "不满足SecurityGroup格式"
)
View Source
const (
SfsSizeInputError = "sfs_size输入错误,步长为512!"
)
验证并行文件sfs_size输入 要求:步长512
View Source
const (
SubnetError = "不满足Subnet格式"
)
View Source
const (
UUIDError = "不满足UUID格式"
)
View Source
const (
VpcError = "不满足vpc格式"
)
View Source
const (
YamlError = "不满足YAML格式"
)
Variables ¶
View Source
var ProjectRegex = regexp.MustCompile("^(|0|[a-z0-9]{32})$")
Functions ¶
func AlsoRequiresEqualBool ¶
func AlsoRequiresEqualInt32 ¶
func AlsoRequiresEqualInt64 ¶
func AlsoRequiresEqualList ¶
func AlsoRequiresEqualObject ¶
func AlsoRequiresEqualSet ¶
func AlsoRequiresEqualString ¶
func ConflictsWithEqualBool ¶
func ConflictsWithEqualInt32 ¶
func ConflictsWithEqualInt64 ¶
func ConflictsWithEqualSet ¶
func CrossFieldBool ¶
func CycleCount ¶
func DBPassword ¶
func EbmPassword ¶
func EcsPassword ¶
func EipValidate ¶
func KeypairName ¶
func RedisPassword ¶
func ScalingCountValidate ¶
func SecurityGroupValidate ¶
func StringLetterIn ¶
func SubnetValidate ¶
func VpcValidate ¶
Types ¶
Source Files
¶
- validator_also_requires_equal.go
- validator_cidr.go
- validator_conflicts_with_equal.go
- validator_cross_field.go
- validator_cycle_count.go
- validator_db_password.go
- validator_desc.go
- validator_ebm_password.go
- validator_ecs_name.go
- validator_ecs_password.go
- validator_eip.go
- validator_email.go
- validator_exist.go
- validator_hpfs_size.go
- validator_ip.go
- validator_ipv4_ipv6_cidr.go
- validator_json.go
- validator_keypair_name.go
- validator_mongo_cluster.go
- validator_phone.go
- validator_project.go
- validator_range.go
- validator_redis_password.go
- validator_scaling_config_name.go
- validator_scaling_config_password.go
- validator_scaling_count.go
- validator_scaling_policy_day.go
- validator_security_group.go
- validator_string_letter_in.go
- validator_subnet.go
- validator_uuid.go
- validator_vpc.go
- validator_yaml.go
Click to show internal directories.
Click to hide internal directories.