handlers

package
v0.0.0-...-bae6b6e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrorResponse

func NewErrorResponse(w http.ResponseWriter, status int, err string)

NewErrorResponse writes an error response to the provided http.ResponseWriter with the given status code and error message.

func ValidationError

func ValidationError(errs validator.ValidationErrors) string

ValidationError generates a string message from the provided validation errors.

Types

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

ErrorResponse represents an error response returned by the API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL