error

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CodeBasic    int = 1000
	CodeResource int = 2000
	CodeAuth     int = 3000
	CodeNull     int = 4000
	CodeSystem   int = 5000
	CodeParam    int = 6000
	CodeConvert  int = 7000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpError

type HttpError struct {
	HttpStatusCode int    `json:"-"`
	Code           int    `json:"err_code"`
	Message        string `json:"err_message"`
}

func ErrToHttpError

func ErrToHttpError(err error, code int) *HttpError

func Error

func Error(code int, msg string) *HttpError

func (*HttpError) Error

func (err *HttpError) Error() string

func (*HttpError) WithHttpStatusCode

func (err *HttpError) WithHttpStatusCode(httpStatusCode int) *HttpError

Jump to

Keyboard shortcuts

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