Documentation
¶
Index ¶
- Variables
- func FromJson(v Validator, b []byte) (err error)
- func IntFromJson(iv IntValidator, b []byte) (ii int, err error)
- type Float64Limit
- type Float64LimitExceeded
- type Float64Range
- type Float64Validator
- type Float64Validators
- type IntLimit
- type IntLimitExceeded
- type IntValidator
- type NaturalInt
- type Op
- type PositiveInt
- type Validator
Constants ¶
This section is empty.
Variables ¶
View Source
var Float64Positive = GreaterThan.Float64(0.0)
View Source
var IntNatural = GreaterOrEqual.Int(0)
View Source
var IntPositive = GreaterThan.Int(0)
Functions ¶
func IntFromJson ¶ added in v0.3.0
func IntFromJson(iv IntValidator, b []byte) (ii int, err error)
Types ¶
type Float64Limit ¶
type Float64Limit struct {
// contains filtered or unexported fields
}
func (Float64Limit) Exceeded ¶
func (f Float64Limit) Exceeded(val float64) (fe Float64LimitExceeded)
func (Float64Limit) InLimit ¶
func (f Float64Limit) InLimit(val float64) (b bool)
func (Float64Limit) Validate ¶
func (f Float64Limit) Validate(val float64) (err error)
type Float64LimitExceeded ¶
type Float64LimitExceeded struct {
Float64Limit
// contains filtered or unexported fields
}
func (Float64LimitExceeded) Error ¶
func (f Float64LimitExceeded) Error() (s string)
type Float64Range ¶
type Float64Range struct {
// contains filtered or unexported fields
}
func NewFloat64Range ¶
func NewFloat64Range(min, max float64) (f Float64Range)
func (Float64Range) Validate ¶
func (f Float64Range) Validate(val float64) (err error)
type Float64Validator ¶
type Float64Validators ¶
type Float64Validators struct {
// contains filtered or unexported fields
}
func (Float64Validators) Validate ¶
func (f Float64Validators) Validate(value float64) (err error)
type IntLimit ¶ added in v0.3.0
type IntLimit struct {
// contains filtered or unexported fields
}
func (IntLimit) Exceeded ¶ added in v0.3.0
func (i IntLimit) Exceeded(val int) (ie IntLimitExceeded)
type IntLimitExceeded ¶ added in v0.3.0
type IntLimitExceeded struct {
IntLimit
// contains filtered or unexported fields
}
func (IntLimitExceeded) Error ¶ added in v0.3.0
func (f IntLimitExceeded) Error() (s string)
type IntValidator ¶ added in v0.3.0
type NaturalInt ¶ added in v0.3.0
type NaturalInt int
func (*NaturalInt) UnmarshalJSON ¶ added in v0.3.0
func (n *NaturalInt) UnmarshalJSON(b []byte) (err error)
type PositiveInt ¶ added in v0.3.0
type PositiveInt int
func (*PositiveInt) UnmarshalJSON ¶ added in v0.3.0
func (p *PositiveInt) UnmarshalJSON(b []byte) (err error)
Click to show internal directories.
Click to hide internal directories.