Documentation ¶
Index ¶
- func ErrorResponse(c *gin.Context, code int, message string, causes ...Cause)
- func InternalErrorResponse(c *gin.Context, err error, logMessage string, v ...interface{})
- func NewJSONValidator() *validator.Validate
- func RegisterValidation(tag string, fn func(fl validator.FieldLevel) bool) error
- func SuccessResponse(c *gin.Context, message string)
- func ValidationErrorResponse(c *gin.Context, causes ...Cause)
- type Cause
- func BindBodyForm(c *gin.Context, val interface{}) (bool, []Cause)
- func BindBodyJSON(c *gin.Context, val interface{}) (bool, []Cause)
- func BindHeaders(c *gin.Context, val interface{}) (bool, []Cause)
- func BindUri(c *gin.Context, val interface{}) (bool, []Cause)
- func NewCause(field, code string) Cause
- func ValidateStruct(s interface{}) (bool, []Cause)
- func ValidateStructWith(v *validator.Validate, s interface{}) (bool, []Cause)
- func ValidateVar(name string, value interface{}, tag string) (bool, []Cause)
- func ValidateVarWith(v *validator.Validate, name string, value interface{}, tag string) (bool, []Cause)
- type GenericErrorResponse
- type GenericResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InternalErrorResponse ¶
func NewJSONValidator ¶
func NewJSONValidator() *validator.Validate
func RegisterValidation ¶
func SuccessResponse ¶
func ValidationErrorResponse ¶
Types ¶
type GenericErrorResponse ¶
type GenericResponse ¶
Click to show internal directories.
Click to hide internal directories.