Documentation ¶
Index ¶
- type Checker
- func (c *Checker) AddError(token interface{}, code, format string, args ...interface{})
- func (c *Checker) Check(token interface{}, v bool, code, format string, args ...interface{}) bool
- func (c *Checker) CheckArrayLengthMax(token interface{}, value interface{}, max int) bool
- func (c *Checker) CheckArrayLengthMin(token interface{}, value interface{}, min int) bool
- func (c *Checker) CheckArrayLengthMinMax(token interface{}, value interface{}, min, max int) bool
- func (c *Checker) CheckArrayNotEmpty(token interface{}, value interface{}) bool
- func (c *Checker) CheckFloatMax(token interface{}, i, max float64) bool
- func (c *Checker) CheckFloatMin(token interface{}, i, min float64) bool
- func (c *Checker) CheckFloatMinMax(token interface{}, i, min, max float64) bool
- func (c *Checker) CheckIntMax(token interface{}, i, max int) bool
- func (c *Checker) CheckIntMin(token interface{}, i, min int) bool
- func (c *Checker) CheckIntMinMax(token interface{}, i, min, max int) bool
- func (c *Checker) CheckObject(token interface{}, value interface{}) bool
- func (c *Checker) CheckObjectArray(token interface{}, value interface{}) bool
- func (c *Checker) CheckObjectMap(token interface{}, value interface{}) bool
- func (c *Checker) CheckOptionalObject(token interface{}, value interface{}) bool
- func (c *Checker) CheckStringHTTPURI(token interface{}, s string) bool
- func (c *Checker) CheckStringLengthMax(token interface{}, s string, max int) bool
- func (c *Checker) CheckStringLengthMin(token interface{}, s string, min int) bool
- func (c *Checker) CheckStringLengthMinMax(token interface{}, s string, min, max int) bool
- func (c *Checker) CheckStringMatch(token interface{}, s string, re *regexp.Regexp) bool
- func (c *Checker) CheckStringMatch2(token interface{}, s string, re *regexp.Regexp, code, format string, ...) bool
- func (c *Checker) CheckStringNotEmpty(token interface{}, s string) bool
- func (c *Checker) CheckStringURI(token interface{}, s string) bool
- func (c *Checker) CheckStringValue(token interface{}, value interface{}, values interface{}) bool
- func (c *Checker) Error() error
- func (c *Checker) Pop()
- func (c *Checker) Push(token interface{})
- func (c *Checker) WithChild(token interface{}, fn func())
- type Object
- type ValidationError
- type ValidationErrors
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct { Pointer djson.Pointer Errors ValidationErrors }
func NewChecker ¶
func NewChecker() *Checker
func (*Checker) CheckArrayLengthMax ¶
func (*Checker) CheckArrayLengthMin ¶
func (*Checker) CheckArrayLengthMinMax ¶
func (*Checker) CheckArrayNotEmpty ¶
func (*Checker) CheckFloatMax ¶
func (*Checker) CheckFloatMin ¶
func (*Checker) CheckFloatMinMax ¶
func (*Checker) CheckIntMax ¶
func (*Checker) CheckIntMin ¶
func (*Checker) CheckIntMinMax ¶
func (*Checker) CheckObject ¶
func (*Checker) CheckObjectArray ¶
func (*Checker) CheckObjectMap ¶
func (*Checker) CheckOptionalObject ¶
func (*Checker) CheckStringHTTPURI ¶
func (*Checker) CheckStringLengthMax ¶
func (*Checker) CheckStringLengthMin ¶
func (*Checker) CheckStringLengthMinMax ¶
func (*Checker) CheckStringMatch ¶
func (*Checker) CheckStringMatch2 ¶
func (*Checker) CheckStringNotEmpty ¶
func (*Checker) CheckStringURI ¶
func (*Checker) CheckStringValue ¶
type ValidationError ¶
type ValidationError struct { Pointer djson.Pointer `json:"pointer"` Code string `json:"code"` Message string `json:"message"` }
func (ValidationError) Error ¶
func (err ValidationError) Error() string
func (ValidationError) GoString ¶
func (err ValidationError) GoString() string
func (ValidationError) String ¶
func (err ValidationError) String() string
type ValidationErrors ¶
type ValidationErrors []*ValidationError
func (ValidationErrors) Error ¶
func (errs ValidationErrors) Error() string
Click to show internal directories.
Click to hide internal directories.