Documentation ¶
Index ¶
- Variables
- func AsBool(param string) bool
- func AsFloat(param string) float64
- func AsInt(param string) int64
- func AsUint(param string) uint64
- func CheckField(field reflect.Value, kind reflect.Kind, value string) bool
- func HasValue(fl validator.FieldLevel) bool
- func PanicIf(err error)
- func ParseOneOfParam2(s string) []string
- func RequireCheckFieldValue(fl validator.FieldLevel, param string, value string, defaultNotFoundValue bool) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ValidatePlatformID validator.Func = func(fl validator.FieldLevel) bool { field := fl.Field() kind := field.Kind() if kind == reflect.Int || kind == reflect.Int64 { platformID := field.Int() return platform.PlatformIDToName(int(platformID)) != "" } else { panic(fmt.Sprintf("Bad type for %s", fl.FieldName())) } }
Functions ¶
func HasValue ¶
func HasValue(fl validator.FieldLevel) bool
HasValue is the validation function for validating if the current field's value is not the default static value.
func ParseOneOfParam2 ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.