Documentation ¶
Index ¶
- func LogAndRespondWithError(logger logrus.FieldLogger, err error, errorMessage string, statusCode int) error
- func ParseRequestBodyToStruct(ctx echo.Context, targetStruct interface{}) error
- func RespondWithoutBody(ctx echo.Context, code int) error
- func WriteResponse(ctx echo.Context, code int, body interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogAndRespondWithError ¶
func LogAndRespondWithError(logger logrus.FieldLogger, err error, errorMessage string, statusCode int) error
LogAndRespondWithError logs the error and returns an HTTP error.
func ParseRequestBodyToStruct ¶
func ParseRequestBodyToStruct(ctx echo.Context, targetStruct interface{}) error
ParseRequestBodyToStruct parses json bytes into a struct
func RespondWithoutBody ¶
RespondWithoutBody wraps error echo bodiless responses.
func WriteResponse ¶
WriteResponse parses a struct into a json and writes in the response
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.