Versions in this module Expand all Collapse all v2 v2.0.1 Jan 22, 2022 Changes in this version + const ColorBlue + const ColorCyan + const ColorGreen + const ColorPurple + const ColorRed + const ColorWhite + const ColorYellow + const ErrorWithColor + const StatusCREATED + const StatusDONE + const StatusFAILED + const StatusINTERNAL + const StatusOPEN + const StatusPROCESS + const SuccessWithColor + const WarningWithColor + var InternalServerErrorMsg = echo.NewHTTPError(http.StatusInternalServerError, BaseError{ ... }) + func BindAndValidate(c echo.Context, i interface{}) error + func ErrorHandler(err error, c echo.Context) + func ResponseMongo(i *vmdb.MongoError) (int, interface{}) + type BaseError struct + Message string + type ErrorResponse struct + Body interface{} + Coll string + Message string + Model string + Status int + func BadRequest(message string, body ...interface{}) (int, *ErrorResponse) + func Conflict(message string, body ...interface{}) (int, *ErrorResponse) + func InternalServerError() (int, ErrorResponse) + func NotFound(message string, body ...interface{}) (int, *ErrorResponse) + type Status struct + StatusMessage string + StatusType string + func NewStatus() *Status + func NewStatusInternal(message error) *Status + func (i *Status) Created(message string) + func (i *Status) Done(message string) + func (i *Status) Error() string + func (i *Status) Failed(message string) + func (i *Status) Internal(message string) + func (i *Status) Open(message string) + func (i *Status) Process(message string) + func (i *Status) Response() (int, interface{}) + func (i *Status) Set(t string, message string) *Status + func (i *Status) ValidateDone() error + type ValidationError struct + Errors []string + func (i *ValidationError) Bind(err error) + func (i *ValidationError) Error() string + func (i *ValidationError) Response() (int, interface{}) + func (i *ValidationError) Valid(err error) + type Validator struct + func (i *Validator) New(v *validator.Validate) *Validator + func (i *Validator) Validate(valid interface{}) error Other modules containing this package github.com/Viva-con-Agua/vcago