Documentation ¶
Index ¶
- func AlreadyExists(c echo.Context) error
- func AuthBadScheme(c echo.Context) error
- func AuthForbidden(c echo.Context) error
- func AuthMissing(c echo.Context) error
- func AuthNotFound(c echo.Context) error
- func AuthSyntaxError(c echo.Context) error
- func Created(c echo.Context, id primitive.ObjectID) error
- func DuplicateKey(c echo.Context) error
- func FindOneOperationError(c echo.Context, err error, logger ...*slog.Logger) error
- func InternalError(c echo.Context) error
- func InvalidFormat(c echo.Context, errors validator.ValidationErrors) error
- func MethodNotAllowed(c echo.Context) error
- func NotFound(c echo.Context) error
- func Ok(c echo.Context) error
- func OkWith(c echo.Context, value any) error
- func UnexpectedFormat(c echo.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlreadyExists ¶
func AlreadyExists(c echo.Context) error
AlreadyExists dumps a simple "already exists" message response (409) in the gin context.
func AuthBadScheme ¶
func AuthBadScheme(c echo.Context) error
AuthBadScheme dumps a simple "bad scheme" message response (400) in the gin context.
func AuthForbidden ¶
func AuthForbidden(c echo.Context) error
AuthForbidden dumps a simple "forbidden" message response (403) in the gin context.
func AuthMissing ¶
func AuthMissing(c echo.Context) error
AuthMissing dumps a simple "missing header" message response (401) in the gin context.
func AuthNotFound ¶
func AuthNotFound(c echo.Context) error
AuthNotFound dumps a simple "not found" message response (401, for auth) in the gin context.
func AuthSyntaxError ¶
func AuthSyntaxError(c echo.Context) error
AuthSyntaxError dumps a simple "syntax error" message response (400) in the gin context.
func DuplicateKey ¶
func DuplicateKey(c echo.Context) error
DuplicateKey dumps a "duplicate key" message response (409) with the attempted key combination.
func FindOneOperationError ¶ added in v1.1.0
FindOneOperationError is a helper to render an error for a MongoDB's FindOne operation on a collection.
func InternalError ¶
func InternalError(c echo.Context) error
InternalError dumps a simple "internal error" message response (500) in the gin context.
func InvalidFormat ¶
func InvalidFormat(c echo.Context, errors validator.ValidationErrors) error
InvalidFormat dumps an "invalid format" message response (400) in the gin context, with the errors that must flow to the user.
func MethodNotAllowed ¶
func MethodNotAllowed(c echo.Context) error
MethodNotAllowed dumps a simple "method not allowed" message response (405) in the gin context.
func NotFound ¶
func NotFound(c echo.Context) error
NotFound dumps a simple "not found" message response (404) in the gin context.
func Ok ¶
func Ok(c echo.Context) error
Ok dumps a simple "ok" message response (200) in the gin context
func OkWith ¶
OkWith dumps a 200 message with a given body. Most likely, the body will be a echo.Map instance.
func UnexpectedFormat ¶
func UnexpectedFormat(c echo.Context) error
UnexpectedFormat dumps a simple "unexpected format" message response (400) in the gin context.
Types ¶
This section is empty.