xerr

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const DB_ERROR uint32 = 100005
View Source
const DB_UPDATE_AFFECTED_ZERO_ERROR uint32 = 100006
View Source
const OK uint32 = 200

成功返回

View Source
const REUQEST_PARAM_ERROR uint32 = 100002
View Source
const SERVER_COMMON_ERROR uint32 = 100001

全局错误码

View Source
const TOKEN_EXPIRE_ERROR uint32 = 100003
View Source
const TOKEN_GENERATE_ERROR uint32 = 100004

Variables

This section is empty.

Functions

func IsCodeErr

func IsCodeErr(errcode uint32) bool

func MapErrMsg

func MapErrMsg(errcode uint32) string

Types

type CodeError

type CodeError struct {
	// contains filtered or unexported fields
}

func NewErrCode

func NewErrCode(errCode uint32) *CodeError

func NewErrCodeMsg

func NewErrCodeMsg(errCode uint32, errMsg string) *CodeError

func NewErrMsg

func NewErrMsg(errMsg string) *CodeError

func (*CodeError) Error

func (e *CodeError) Error() string

func (*CodeError) GetErrCode

func (e *CodeError) GetErrCode() uint32

返回给前端的错误码

func (*CodeError) GetErrMsg

func (e *CodeError) GetErrMsg() string

返回给前端显示端错误信息

Jump to

Keyboard shortcuts

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