init: taotie-api 项目初始化
This commit is contained in:
18
common/errsys.go
Normal file
18
common/errsys.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"github.com/duke-git/lancet/v2/xerror"
|
||||
)
|
||||
|
||||
var (
|
||||
ErrSysOk = xerror.New("ok").Id("0") // 成功
|
||||
|
||||
ErrSysInternal = xerror.New("未知内部错误").Id("50") // 未知内部错误
|
||||
ErrSysNil = xerror.New("空指针").Id("51") // 空指针
|
||||
ErrSysValidationFailed = xerror.New("校验失败").Id("52") // 校验失败
|
||||
ErrSysDbError = xerror.New("数据库错误").Id("53") // 数据库错误
|
||||
|
||||
ErrSysDuplicate = xerror.New("重复数据").Id("s0001") // 重复数据
|
||||
ErrSysInvalid = xerror.New("数据无效").Id("s0002") // 数据无效
|
||||
ErrSysDataNotFound = xerror.New("数据不存在").Id("s0003") // 数据不存在
|
||||
)
|
||||
Reference in New Issue
Block a user