Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoolValidator ¶
type BoolValidator struct {
// contains filtered or unexported fields
}
BoolValidator implements Validator which used to valite a boolean value should be true
func (BoolValidator) Validate ¶
func (v BoolValidator) Validate() error
type ValidatorFunc ¶
type ValidatorFunc func() error
ValidatorFunc represents a function which implements Validator interface
func (ValidatorFunc) Validate ¶
func (v ValidatorFunc) Validate() error
type ValidatorList ¶
type ValidatorList []Validator
ValidatorList holds n Validators, and implements Validator interface too
func NewSet ¶
func NewSet() *ValidatorList
func Require ¶
func Require(val bool, msg string) *ValidatorList
Require returns a ValidatorList which holds a boolValidator created by (val,msg)
func (*ValidatorList) And ¶
func (v *ValidatorList) And(validator Validator) *ValidatorList
And appends a Validator
func (*ValidatorList) AndRequire ¶
func (v *ValidatorList) AndRequire(val bool, msg string) *ValidatorList
AndRequire appends a boolValidator
func (ValidatorList) Validate ¶
func (v ValidatorList) Validate() error
Click to show internal directories.
Click to hide internal directories.