errors

package module
v0.0.0-...-6fd46d4 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const CLIENT_400 = `Something was wrong with the request`
View Source
const CLIENT_401 = `You are not allowed to access this ressource`
View Source
const CLIENT_403 = `You are not allowed to access this ressource`
View Source
const CLIENT_404 = `One or many elements were not found`
View Source
const CLIENT_409 = `You are facing a conflict. Please verify what you want and the existing data`
View Source
const CLIENT_440 = `Login informations timeout`
View Source
const CLIENT_498 = `Your token is invalid`
View Source
const CLIENT_499 = `You need a token to access this ressource`
View Source
const SERV_500 = `Unexpected error`

Variables

This section is empty.

Functions

func Handle

func Handle(w http.ResponseWriter)

Handle ********************************************************************** * Handler an error with a recover in order to stop the current process and * to resolve an error to the client *****************************************************************************

func HandleSimple

func HandleSimple()

HandleSimple **************************************************************** * Handler an error with a recover in order to stop the current process *****************************************************************************

func HasError

func HasError(err error) bool

HasError ******************************************************************** * Log l'erreur et return true en cas d'erreur *****************************************************************************

func HasStrError

func HasStrError(err string) bool

HasStrError ***************************************************************** * Log l'erreur (en cas de string) et return true en cas d'erreur *****************************************************************************

func New

func New(err string) error

New ************************************************************************* * Shorthand autour de errors.new pour n'importer qu'un seul package *****************************************************************************

Types

This section is empty.

Jump to

Keyboard shortcuts

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