error

package
v0.0.0-...-7a3a1f4 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServerError  = NewError(http.StatusInternalServerError, 1000, "Server Error", nil)
	BadRequest   = NewError(http.StatusBadRequest, 1001, "Bad Request", nil)
	Forbidden    = NewError(http.StatusForbidden, 1002, "Permission Forbidden", nil)
	Unauthorized = NewError(http.StatusUnauthorized, 1003, "Request is unauthorized", nil)
)

Functions

This section is empty.

Types

type Error

type Error struct {
	HTTPCode  int
	HTTPError error
	Code      int
	LogError  error
}

func NewError

func NewError(httpCode int, code int, httpError string, logError error) *Error

func (*Error) Wrapper

func (e *Error) Wrapper(err error) *Error

Jump to

Keyboard shortcuts

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