errors

package
v0.0.0-...-80bf6b7 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InternalError       = "internalError"
	UserNotFound        = "userNotFound"
	InvalidBindingModel = "invalidBindingModel"
	EntityCreationError = "entityCreationError"
)

Variables

This section is empty.

Functions

func ErrorText

func ErrorText(code string) string

Types

type Boom

type Boom struct {
	Code    string      `json:"code"`
	Message string      `json:"message"`
	Details interface{} `json:"details"`
}

boom represent the basic structure of an json error

func NewBoom

func NewBoom(code, msg string, details interface{}) Boom

type Booms

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

Booms can contain multiple boom errors

func NewBooms

func NewBooms() Booms

func (*Booms) Add

func (b *Booms) Add(e Boom)

Jump to

Keyboard shortcuts

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