errors

package
v0.0.0-...-af5b15e Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GenericError         int = 1
	DBError              int = 2
	GenericNotFoundError int = 3
	InputNotValid        int = 4
	// configuration
	ConfigurationNotReady int = 100
	// mongo errors
	DBDuplicateKey int = 11000
)

Variables

This section is empty.

Functions

func ReplyWithError

func ReplyWithError(w http.ResponseWriter, errorCode int)

func ReplyWithErrorMessage

func ReplyWithErrorMessage(w http.ResponseWriter, errorCode int, msg string)

Types

type ErrorReply

type ErrorReply struct {
	Code    int    `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

Jump to

Keyboard shortcuts

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