utils

package
v0.0.0-...-51ece97 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Validate = validator.New()

Functions

func GetAPIKeyFromRequest

func GetAPIKeyFromRequest(r *http.Request) (string, error)

func GetTokenFromRequest

func GetTokenFromRequest(r *http.Request) (string, error)

func ParseJSON

func ParseJSON(r *http.Request, payload interface{}) error

func RespondWithError

func RespondWithError(w http.ResponseWriter, status int, err error)

func RespondWithJSON

func RespondWithJSON(w http.ResponseWriter, status int, v any) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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