Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Validate = validator.New()
Validate acts a single, cached validator across the app.
Functions ¶
func GetTokenFromRequest ¶
func WriteError ¶
func WriteError(w http.ResponseWriter, status HttpStatus, err error)
WriteError writes a HTTP error as a JSON response.
func WriteJson ¶
func WriteJson(w http.ResponseWriter, status HttpStatus, payload any) error
WriteJson writes the payload as a JSON response.
Types ¶
type HttpStatus ¶
type HttpStatus int
Click to show internal directories.
Click to hide internal directories.