package
0.0.0-20250301080608-94dd30a0f6c7
Repository: https://github.com/gurch101/gowebutils.git
Documentation: pkg.go.dev
# Functions
BadRequestResponse sends a JSON-formatted error message with 400 Bad Request status code.
EditConflictResponse method is used to send a 409 Conflict status code.
FailedValidationResponse sends JSON-formatted error message to client with 400 Bad Request status code.
No description provided by the author
No description provided by the author
HandleErrorResponse method is a utility function that will return the appropriate error from the service layer of our application.
No description provided by the author
No description provided by the author
NewSlogLogFormatter creates a new SlogLogFormatter.
NotFoundResponse method is used to send a 404 Not Found status code.
RateLimitExceededResponse method is used to send a 429 Too Many Requests status code.
No description provided by the author
ReadJSON decodes request Body into corresponding Go type.
No description provided by the author
serverErrorResponse method is used when our application encounters an unexpected problem at runtime.
No description provided by the author
No description provided by the author
UnauthorizedResponse method is used to send a 401 Unauthorized status code.
UnprocessableEntityResponse method is used to send a 422 Unprocessable Entity status code.
WriteJSON marshals data structure to encoded JSON response and writes it to the response body.
# Constants
No description provided by the author
No description provided by the author
# Variables
ErrInvalidJSON is returned when the body is not valid JSON.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author