Documentation ¶
Index ¶
- Variables
- type DefaultService
- func (d *DefaultService) ParseValidations(rootStructValidations *govalidatormappervalidations.StructValidations) (interface{}, error)
- func (d *DefaultService) RunAndParseValidations(validatorFns ...func(*govalidatormappervalidations.StructValidations) error) (interface{}, error)
- func (d *DefaultService) ValidateRequiredFields(rootStructValidations *govalidatormappervalidations.StructValidations, ...) error
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNilService = errors.New("mapper validator service cannot be nil")
)
Functions ¶
This section is empty.
Types ¶
type DefaultService ¶ added in v0.3.4
type DefaultService struct {
// contains filtered or unexported fields
}
DefaultService struct
func NewDefaultService ¶ added in v0.3.4
func NewDefaultService( parser govalidatormapperparser.Parser, validator govalidatormappervalidator.Validator, ) (*DefaultService, error)
NewDefaultService creates a new default validator service
func (*DefaultService) ParseValidations ¶ added in v0.4.0
func (d *DefaultService) ParseValidations( rootStructValidations *govalidatormappervalidations.StructValidations, ) (interface{}, error)
ParseValidations parses the validations
func (*DefaultService) RunAndParseValidations ¶ added in v0.4.1
func (d *DefaultService) RunAndParseValidations( validatorFns ...func(*govalidatormappervalidations.StructValidations) error, ) (interface{}, error)
RunAndParseValidations runs and parses the validations
func (*DefaultService) ValidateRequiredFields ¶ added in v0.5.0
func (d *DefaultService) ValidateRequiredFields( rootStructValidations *govalidatormappervalidations.StructValidations, request interface{}, mapper *govalidatormapper.Mapper, ) error
ValidateRequiredFields validates the required fields
type Service ¶
type Service interface { ValidateRequiredFields( rootStructValidations *govalidatormappervalidations.StructValidations, request interface{}, mapper *govalidatormapper.Mapper, ) error ParseValidations(rootStructValidations *govalidatormappervalidations.StructValidations) ( interface{}, error, ) RunAndParseValidations( validatorFns ...func(*govalidatormappervalidations.StructValidations) error, ) (interface{}, error) }
Service interface for the validator service
Click to show internal directories.
Click to hide internal directories.