Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GooKitValidator ¶
type GooKitValidator struct {
StopOnError bool
}
func NewGooKitValidator ¶
func NewGooKitValidator() *GooKitValidator
func (*GooKitValidator) GetConfiguredValidator ¶
func (c *GooKitValidator) GetConfiguredValidator(toValidate any, scene ...string) *validate.Validation
GetConfiguredValidator returns validate.Validation instance with required_uuid validator
func (*GooKitValidator) Validate ¶
func (c *GooKitValidator) Validate(i interface{}) error
func (*GooKitValidator) ValidateStruct ¶
func (c *GooKitValidator) ValidateStruct(toValidate any, scene ...string) error
ValidateStruct validates struct fulfill validate tags validations
It adds a custom required validation:
- required_uuid
This was created to validate uuid.UUID type from google UUID package.
type ValidationError ¶
type ValidationError struct {
Errors interface{} `json:"errors,inline"`
}
func (*ValidationError) Error ¶
func (c *ValidationError) Error() string
func (*ValidationError) StatusCode ¶
func (c *ValidationError) StatusCode() int
Click to show internal directories.
Click to hide internal directories.