Documentation ¶
Index ¶
- Variables
- type DefaultService
- func (d *DefaultService) CheckValidations(validations govalidatorvalidations.Validations) error
- func (d *DefaultService) ModeFlag() *goflagmode.Flag
- func (d *DefaultService) ValidateBirthdate(birthdateField string, birthdate *timestamppb.Timestamp, ...)
- func (d *DefaultService) ValidateEmail(emailField string, email string, ...)
- func (d *DefaultService) ValidateNilFields(request interface{}, mapper *govalidatormapper.Mapper) (govalidatorvalidations.Validations, error)
- type Service
Constants ¶
This section is empty.
Variables ¶
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( generator govalidatorvalidations.Generator, validator govalidatorvalidations.Validator, mode *goflagmode.Flag, ) (*DefaultService, error)
NewDefaultService creates a new default validator service
func (*DefaultService) CheckValidations ¶ added in v0.3.4
func (d *DefaultService) CheckValidations( validations govalidatorvalidations.Validations, ) error
CheckValidations checks the validations and returns a pointer to the error message
func (*DefaultService) ModeFlag ¶ added in v0.3.4
func (d *DefaultService) ModeFlag() *goflagmode.Flag
ModeFlag returns the mode flag
func (*DefaultService) ValidateBirthdate ¶ added in v0.3.4
func (d *DefaultService) ValidateBirthdate( birthdateField string, birthdate *timestamppb.Timestamp, validations govalidatorvalidations.Validations, )
ValidateBirthdate validates the birthdate field
func (*DefaultService) ValidateEmail ¶ added in v0.3.4
func (d *DefaultService) ValidateEmail( emailField string, email string, validations govalidatorvalidations.Validations, )
ValidateEmail validates the email address field
func (*DefaultService) ValidateNilFields ¶ added in v0.3.4
func (d *DefaultService) ValidateNilFields( request interface{}, mapper *govalidatormapper.Mapper, ) (govalidatorvalidations.Validations, error)
ValidateNilFields validates the nil fields
type Service ¶
type Service interface { ModeFlag() *goflagmode.Flag ValidateEmail( emailField string, email string, validations govalidatorvalidations.Validations, ) ValidateBirthdate( birthdateField string, birthdate *timestamppb.Timestamp, validations govalidatorvalidations.Validations, ) ValidateNilFields( request interface{}, mapper *govalidatormapper.Mapper, ) ( govalidatorvalidations.Validations, error, ) CheckValidations(validations govalidatorvalidations.Validations) error }
Service interface for the validator service
Click to show internal directories.
Click to hide internal directories.