errors

package
v0.0.0-...-b56e1d8 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RespDBDataInsertFailure = []byte(`{"error": "db data insert failure"}`)
	RespDBDataAccessFailure = []byte(`{"error": "db data access failure"}`)
	RespDBDataUpdateFailure = []byte(`{"error": "db data update failure"}`)
	RespDBDataRemoveFailure = []byte(`{"error": "db data remove failure"}`)

	RespJSONEncodeFailure = []byte(`{"error": "json encode failure"}`)
	RespJSONDecodeFailure = []byte(`{"error": "json decode failure"}`)

	RespInvalidURLParamID = []byte(`{"error": "invalid url param-id"}`)
)

Functions

func BadRequest

func BadRequest(w http.ResponseWriter, reps []byte)

func NotFound

func NotFound(w http.ResponseWriter, reps []byte)

func ServerError

func ServerError(w http.ResponseWriter, reps []byte)

func ValidationErrors

func ValidationErrors(w http.ResponseWriter, reps []byte)

Types

type Error

type Error struct {
	Error string `json:"error"`
}

type Errors

type Errors struct {
	Errors []Error `json:"errors"`
}

Jump to

Keyboard shortcuts

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