Documentation ¶
Index ¶
- func BindAndValidate(ctx *gin.Context, r interface{}) error
- func PerformRequest(r http.Handler, method, path string, data io.Reader, token string) *httptest.ResponseRecorder
- func ResponseError(ctx *gin.Context, code int, err ErrorMessage)
- func ResponseSuccess(ctx *gin.Context, code int, data interface{})
- func ResponseValidationError(ctx *gin.Context, err validator.ValidationErrors)
- type ErrorMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindAndValidate ¶
func PerformRequest ¶
func PerformRequest(r http.Handler, method, path string, data io.Reader, token string) *httptest.ResponseRecorder
Method for tests
func ResponseError ¶
func ResponseError(ctx *gin.Context, code int, err ErrorMessage)
func ResponseSuccess ¶
func ResponseValidationError ¶
Types ¶
type ErrorMessage ¶
Click to show internal directories.
Click to hide internal directories.