mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
fix(deps): update github.com/containers/common digest to 3e93a76
Signed-off-by: Renovate Bot <bot@renovateapp.com>
This commit is contained in:
2
vendor/github.com/go-playground/validator/v10/README.md
generated
vendored
2
vendor/github.com/go-playground/validator/v10/README.md
generated
vendored
@ -1,7 +1,7 @@
|
||||
Package validator
|
||||
=================
|
||||
<img align="right" src="https://raw.githubusercontent.com/go-playground/validator/v10/logo.png">[](https://gitter.im/go-playground/validator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||

|
||||

|
||||
[](https://travis-ci.org/go-playground/validator)
|
||||
[](https://coveralls.io/github/go-playground/validator?branch=master)
|
||||
[](https://goreportcard.com/report/github.com/go-playground/validator)
|
||||
|
30
vendor/github.com/go-playground/validator/v10/baked_in.go
generated
vendored
30
vendor/github.com/go-playground/validator/v10/baked_in.go
generated
vendored
@ -33,7 +33,7 @@ type Func func(fl FieldLevel) bool
|
||||
// validation needs. The return value should be true when validation succeeds.
|
||||
type FuncCtx func(ctx context.Context, fl FieldLevel) bool
|
||||
|
||||
// wrapFunc wraps noramal Func makes it compatible with FuncCtx
|
||||
// wrapFunc wraps normal Func makes it compatible with FuncCtx
|
||||
func wrapFunc(fn Func) FuncCtx {
|
||||
if fn == nil {
|
||||
return nil // be sure not to wrap a bad function.
|
||||
@ -73,6 +73,7 @@ var (
|
||||
"required": hasValue,
|
||||
"required_if": requiredIf,
|
||||
"required_unless": requiredUnless,
|
||||
"skip_unless": skipUnless,
|
||||
"required_with": requiredWith,
|
||||
"required_with_all": requiredWithAll,
|
||||
"required_without": requiredWithout,
|
||||
@ -928,7 +929,7 @@ func isNe(fl FieldLevel) bool {
|
||||
return !isEq(fl)
|
||||
}
|
||||
|
||||
// isNe is the validation function for validating that the field's string value does not equal the
|
||||
// isNeIgnoreCase is the validation function for validating that the field's string value does not equal the
|
||||
// provided param value. The comparison is case-insensitive
|
||||
func isNeIgnoreCase(fl FieldLevel) bool {
|
||||
return !isEqIgnoreCase(fl)
|
||||
@ -1648,7 +1649,7 @@ func hasValue(fl FieldLevel) bool {
|
||||
}
|
||||
}
|
||||
|
||||
// requireCheckField is a func for check field kind
|
||||
// requireCheckFieldKind is a func for check field kind
|
||||
func requireCheckFieldKind(fl FieldLevel, param string, defaultNotFoundValue bool) bool {
|
||||
field := fl.Field()
|
||||
kind := field.Kind()
|
||||
@ -1728,10 +1729,10 @@ func excludedIf(fl FieldLevel) bool {
|
||||
|
||||
for i := 0; i < len(params); i += 2 {
|
||||
if !requireCheckFieldValue(fl, params[i], params[i+1], false) {
|
||||
return false
|
||||
return true
|
||||
}
|
||||
}
|
||||
return true
|
||||
return !hasValue(fl)
|
||||
}
|
||||
|
||||
// requiredUnless is the validation function
|
||||
@ -1750,6 +1751,21 @@ func requiredUnless(fl FieldLevel) bool {
|
||||
return hasValue(fl)
|
||||
}
|
||||
|
||||
// skipUnless is the validation function
|
||||
// The field under validation must be present and not empty only unless all the other specified fields are equal to the value following with the specified field.
|
||||
func skipUnless(fl FieldLevel) bool {
|
||||
params := parseOneOfParam2(fl.Param())
|
||||
if len(params)%2 != 0 {
|
||||
panic(fmt.Sprintf("Bad param number for skip_unless %s", fl.FieldName()))
|
||||
}
|
||||
for i := 0; i < len(params); i += 2 {
|
||||
if !requireCheckFieldValue(fl, params[i], params[i+1], false) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return hasValue(fl)
|
||||
}
|
||||
|
||||
// excludedUnless is the validation function
|
||||
// The field under validation must not be present or is empty unless all the other specified fields are equal to the value following with the specified field.
|
||||
func excludedUnless(fl FieldLevel) bool {
|
||||
@ -2593,13 +2609,13 @@ func isIso3166Alpha2(fl FieldLevel) bool {
|
||||
return iso3166_1_alpha2[val]
|
||||
}
|
||||
|
||||
// isIso3166Alpha2 is the validation function for validating if the current field's value is a valid iso3166-1 alpha-3 country code.
|
||||
// isIso3166Alpha3 is the validation function for validating if the current field's value is a valid iso3166-1 alpha-3 country code.
|
||||
func isIso3166Alpha3(fl FieldLevel) bool {
|
||||
val := fl.Field().String()
|
||||
return iso3166_1_alpha3[val]
|
||||
}
|
||||
|
||||
// isIso3166Alpha2 is the validation function for validating if the current field's value is a valid iso3166-1 alpha-numeric country code.
|
||||
// isIso3166AlphaNumeric is the validation function for validating if the current field's value is a valid iso3166-1 alpha-numeric country code.
|
||||
func isIso3166AlphaNumeric(fl FieldLevel) bool {
|
||||
field := fl.Field()
|
||||
|
||||
|
1954
vendor/github.com/go-playground/validator/v10/country_codes.go
generated
vendored
1954
vendor/github.com/go-playground/validator/v10/country_codes.go
generated
vendored
File diff suppressed because it is too large
Load Diff
13
vendor/github.com/go-playground/validator/v10/doc.go
generated
vendored
13
vendor/github.com/go-playground/validator/v10/doc.go
generated
vendored
@ -146,7 +146,7 @@ use the UTF-8 hex representation 0x7C, which is replaced in the code as a pipe,
|
||||
so the above will become excludesall=0x7C
|
||||
|
||||
type Test struct {
|
||||
Field `validate:"excludesall=|"` // BAD! Do not include a a pipe!
|
||||
Field `validate:"excludesall=|"` // BAD! Do not include a pipe!
|
||||
Field `validate:"excludesall=0x7C"` // GOOD! Use the UTF-8 hex representation.
|
||||
}
|
||||
|
||||
@ -239,7 +239,7 @@ Example #2
|
||||
|
||||
map[[2]string]string with validation tag "gt=0,dive,keys,dive,eq=1|eq=2,endkeys,required"
|
||||
// gt=0 will be applied to the map itself
|
||||
// eq=1|eq=2 will be applied to each array element in the the map keys
|
||||
// eq=1|eq=2 will be applied to each array element in the map keys
|
||||
// required will be applied to map values
|
||||
|
||||
# Required
|
||||
@ -916,7 +916,7 @@ this with the omitempty tag.
|
||||
# Base64URL String
|
||||
|
||||
This validates that a string value contains a valid base64 URL safe value
|
||||
according the the RFC4648 spec.
|
||||
according the RFC4648 spec.
|
||||
Although an empty string is a valid base64 URL safe value, this will report
|
||||
an empty string as an error, if you wish to accept an empty string as valid
|
||||
you can use this with the omitempty tag.
|
||||
@ -927,7 +927,7 @@ you can use this with the omitempty tag.
|
||||
# Base64RawURL String
|
||||
|
||||
This validates that a string value contains a valid base64 URL safe value,
|
||||
but without = padding, according the the RFC4648 spec, section 3.2.
|
||||
but without = padding, according the RFC4648 spec, section 3.2.
|
||||
Although an empty string is a valid base64 URL safe value, this will report
|
||||
an empty string as an error, if you wish to accept an empty string as valid
|
||||
you can use this with the omitempty tag.
|
||||
@ -1361,7 +1361,7 @@ More information on https://cve.mitre.org/
|
||||
|
||||
# Credit Card
|
||||
|
||||
This validates that a string value contains a valid credit card number using Luhn algoritm.
|
||||
This validates that a string value contains a valid credit card number using Luhn algorithm.
|
||||
|
||||
Usage: credit_card
|
||||
|
||||
@ -1372,8 +1372,7 @@ This validates that a string value contains a valid credit card number using Luh
|
||||
|
||||
This validates that a string or (u)int value contains a valid checksum using the Luhn algorithm.
|
||||
|
||||
|
||||
#MongoDb ObjectID
|
||||
# MongoDb ObjectID
|
||||
|
||||
This validates that a string is a valid 24 character hexadecimal string.
|
||||
|
||||
|
6
vendor/github.com/go-playground/validator/v10/struct_level.go
generated
vendored
6
vendor/github.com/go-playground/validator/v10/struct_level.go
generated
vendored
@ -62,7 +62,7 @@ type StructLevel interface {
|
||||
// existing namespace that validator is on.
|
||||
// e.g. pass 'User.FirstName' or 'Users[0].FirstName' depending
|
||||
// on the nesting. most of the time they will be blank, unless you validate
|
||||
// at a level lower the the current field depth
|
||||
// at a level lower the current field depth
|
||||
ReportValidationErrors(relativeNamespace, relativeActualNamespace string, errs ValidationErrors)
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ var _ StructLevel = new(validate)
|
||||
// if not is a nested struct.
|
||||
//
|
||||
// this is only called when within Struct and Field Level validation and
|
||||
// should not be relied upon for an acurate value otherwise.
|
||||
// should not be relied upon for an accurate value otherwise.
|
||||
func (v *validate) Top() reflect.Value {
|
||||
return v.top
|
||||
}
|
||||
@ -85,7 +85,7 @@ func (v *validate) Top() reflect.Value {
|
||||
// if not is a nested struct.
|
||||
//
|
||||
// this is only called when within Struct and Field Level validation and
|
||||
// should not be relied upon for an acurate value otherwise.
|
||||
// should not be relied upon for an accurate value otherwise.
|
||||
func (v *validate) Parent() reflect.Value {
|
||||
return v.slflParent
|
||||
}
|
||||
|
2
vendor/github.com/go-playground/validator/v10/util.go
generated
vendored
2
vendor/github.com/go-playground/validator/v10/util.go
generated
vendored
@ -234,7 +234,7 @@ func asInt(param string) int64 {
|
||||
func asIntFromTimeDuration(param string) int64 {
|
||||
d, err := time.ParseDuration(param)
|
||||
if err != nil {
|
||||
// attempt parsing as an an integer assuming nanosecond precision
|
||||
// attempt parsing as an integer assuming nanosecond precision
|
||||
return asInt(param)
|
||||
}
|
||||
return int64(d)
|
||||
|
12
vendor/github.com/go-playground/validator/v10/validator_instance.go
generated
vendored
12
vendor/github.com/go-playground/validator/v10/validator_instance.go
generated
vendored
@ -29,6 +29,7 @@ const (
|
||||
requiredWithAllTag = "required_with_all"
|
||||
requiredIfTag = "required_if"
|
||||
requiredUnlessTag = "required_unless"
|
||||
skipUnlessTag = "skip_unless"
|
||||
excludedWithoutAllTag = "excluded_without_all"
|
||||
excludedWithoutTag = "excluded_without"
|
||||
excludedWithTag = "excluded_with"
|
||||
@ -57,7 +58,7 @@ var (
|
||||
|
||||
// FilterFunc is the type used to filter fields using
|
||||
// StructFiltered(...) function.
|
||||
// returning true results in the field being filtered/skiped from
|
||||
// returning true results in the field being filtered/skipped from
|
||||
// validation
|
||||
type FilterFunc func(ns []byte) bool
|
||||
|
||||
@ -123,7 +124,8 @@ func New() *Validate {
|
||||
switch k {
|
||||
// these require that even if the value is nil that the validation should run, omitempty still overrides this behaviour
|
||||
case requiredIfTag, requiredUnlessTag, requiredWithTag, requiredWithAllTag, requiredWithoutTag, requiredWithoutAllTag,
|
||||
excludedIfTag, excludedUnlessTag, excludedWithTag, excludedWithAllTag, excludedWithoutTag, excludedWithoutAllTag:
|
||||
excludedIfTag, excludedUnlessTag, excludedWithTag, excludedWithAllTag, excludedWithoutTag, excludedWithoutAllTag,
|
||||
skipUnlessTag:
|
||||
_ = v.registerValidation(k, wrapFunc(val), true, true)
|
||||
default:
|
||||
// no need to error check here, baked in will always be valid
|
||||
@ -151,7 +153,7 @@ func (v *Validate) SetTagName(name string) {
|
||||
}
|
||||
|
||||
// ValidateMapCtx validates a map using a map of validation rules and allows passing of contextual
|
||||
// validation validation information via context.Context.
|
||||
// validation information via context.Context.
|
||||
func (v Validate) ValidateMapCtx(ctx context.Context, data map[string]interface{}, rules map[string]interface{}) map[string]interface{} {
|
||||
errs := make(map[string]interface{})
|
||||
for field, rule := range rules {
|
||||
@ -451,7 +453,7 @@ func (v *Validate) StructPartial(s interface{}, fields ...string) error {
|
||||
}
|
||||
|
||||
// StructPartialCtx validates the fields passed in only, ignoring all others and allows passing of contextual
|
||||
// validation validation information via context.Context
|
||||
// validation information via context.Context
|
||||
// Fields may be provided in a namespaced fashion relative to the struct provided
|
||||
// eg. NestedStruct.Field or NestedArrayField[0].Struct.Name
|
||||
//
|
||||
@ -541,7 +543,7 @@ func (v *Validate) StructExcept(s interface{}, fields ...string) error {
|
||||
}
|
||||
|
||||
// StructExceptCtx validates all fields except the ones passed in and allows passing of contextual
|
||||
// validation validation information via context.Context
|
||||
// validation information via context.Context
|
||||
// Fields may be provided in a namespaced fashion relative to the struct provided
|
||||
// i.e. NestedStruct.Field or NestedArrayField[0].Struct.Name
|
||||
//
|
||||
|
Reference in New Issue
Block a user