errors

package
v0.0.0-...-876d392 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound       = srverror.New(errors.New("Not Found in Database"), 404, "Not Found")
	ErrNoResults      = srverror.Basic(204, "Empty", "No results found")
	ErrNameTaken      = srverror.New(errors.New("Id is already in use"), 409, "Name Already Taken")
	ErrCorruptData    = srverror.New(errors.New("unable to decode data from the database"), 500, "Error 010")
	ErrPermission     = srverror.New(errors.New("User does not have appropriate permission"), 403, "Permission Denied")
	ErrIDNotReserved  = srverror.Basic(500, "Error 011", "ID has not been reserved for Insert")
	ErrIDUnrecognized = srverror.Basic(400, "Unrecognized ID")

	FileLoadInProgress = &Processing{Status: 202, Message: "Processing File"}
)

Error types for use across different database implementations

Functions

This section is empty.

Types

type Processing

type Processing struct {
	Status  int    `json:"status" bson:"s"`
	Message string `json:"msg" bson:"m"`
}

Processing is a record of an error that occured during processing of a file, and how to respond

func (*Processing) Equal

func (pe *Processing) Equal(oth *Processing) bool

Equal is true if the status and message are equal

func (*Processing) Error

func (pe *Processing) Error() string

Error implements error, returns message

Jump to

Keyboard shortcuts

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