Documentation ¶
Index ¶
- func GetValidatedBody(req *http.Request, validatorMap VMap) (map[string]interface{}, error)
- func ValidateBody(body map[string]interface{}, validatorMap VMap) (map[string]interface{}, error)
- func ValidateMap(dictionary map[string]interface{}, validatorMap VMap) []gohttplib.Error
- func ValidateValue(value interface{}, validators []Validator) []gohttplib.Error
- type FloatRange
- type Int64Range
- type IntRange
- type VMap
- type Validator
- func ArrayValidator(key string) Validator
- func BoolValidator(key string) Validator
- func CountryValidator(key string) Validator
- func DateTimeValidator(key string, t *time.Time) Validator
- func DistanceValidator(key string) Validator
- func FloatInRangeValidator(key string, floatRange FloatRange) Validator
- func FloatValidator(key string) Validator
- func Int64InRangeValidator(key string, intRange Int64Range) Validator
- func IntInRangeValidator(key string, intRange IntRange) Validator
- func IntValidator(key string) Validator
- func LanguageValidator(key string) Validator
- func LatitudeValidators(key string) []Validator
- func LongitudeValidators(key string) []Validator
- func NotEmptyValidator(key string) Validator
- func RequiredBoolValidators(key string, validators ...Validator) []Validator
- func RequiredFloatValidators(key string, validators ...Validator) []Validator
- func RequiredIntValidators(key string, validators ...Validator) []Validator
- func RequiredStringValidators(key string, validators ...Validator) []Validator
- func SexValidator(key string) Validator
- func StringArrayValidator(key string, each []Validator) Validator
- func StringContainsValidator(key string, values []string) Validator
- func StringLengthValidator(length int, key string) Validator
- func StringValidator(key string) Validator
- func TimezoneValidator(key string) Validator
- func URLValidator(key string) Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetValidatedBody ¶
func ValidateBody ¶
func ValidateMap ¶
func ValidateValue ¶
Types ¶
type FloatRange ¶
type Int64Range ¶
type Validator ¶
type Validator func(value interface{}) error
func ArrayValidator ¶
func BoolValidator ¶
func CountryValidator ¶
func DistanceValidator ¶ added in v0.0.2
func FloatInRangeValidator ¶
func FloatInRangeValidator(key string, floatRange FloatRange) Validator
func FloatValidator ¶
func Int64InRangeValidator ¶
func Int64InRangeValidator(key string, intRange Int64Range) Validator
func IntInRangeValidator ¶
func IntValidator ¶
func LanguageValidator ¶
func LatitudeValidators ¶ added in v0.0.2
func LongitudeValidators ¶ added in v0.0.2
func NotEmptyValidator ¶
func RequiredBoolValidators ¶
func RequiredFloatValidators ¶
func RequiredIntValidators ¶
func SexValidator ¶
func StringArrayValidator ¶
func StringContainsValidator ¶
func StringLengthValidator ¶
func StringValidator ¶
func TimezoneValidator ¶
func URLValidator ¶
Click to show internal directories.
Click to hide internal directories.