fail

package
v0.0.0-...-ea634ce Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2018 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// MissingParameter error represents a missing parameter in the request query.
	MissingParameter = iota
	// MissingProperty error represents a missing property in the request body.
	MissingProperty
	// NotFound error represents an unfound entity in the database.
	NotFound
	// Unauthorized error represents a wrong authentication header.
	Unauthorized
	// WrongPropertyValue error represents an unexpected property value.
	WrongPropertyValue
)

Variables

This section is empty.

Functions

func Answer

func Answer(c *gin.Context, err error, entityLabel string)

Answer sends a JSON response error.

func AnswerCustom

func AnswerCustom(c *gin.Context, errorIndex uint8, target string)

AnswerCustom sends a JSON response error related to a constant-defined error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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