errx

package
v0.0.0-...-653fb89 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const CopierError uint32 = 100007
View Source
const DbError uint32 = 100005
View Source
const DbUpdateAffectedError uint32 = 100006
View Source
const OK uint32 = 200

OK 成功返回

View Source
const RequestParamError uint32 = 100002
View Source
const ServerCommonError uint32 = 100001
View Source
const TokenExpireError uint32 = 100003
View Source
const TokenGenerateError 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

GetErrCode 返回给前端的错误码

func (*CodeError) GetErrMsg

func (e *CodeError) GetErrMsg() string

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

Jump to

Keyboard shortcuts

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