Documentation
¶
Index ¶
- Variables
- type CodeErr
- func (err *CodeErr) Error() string
- func (codeErr *CodeErr) LogErr(ctx context.Context, msg string, err error) *CodeErr
- func (codeErr *CodeErr) LogField(ctx context.Context, msg string, fields ...zap.Field) *CodeErr
- func (codeErr *CodeErr) SetDebugMsg(debugMsg string) *CodeErr
- func (codeErr *CodeErr) WithDebugMsg(debugMsg string) *CodeErr
- type Log
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SystemErr = NewCodeErr(-1, "SystemError") ParamsErr = NewCodeErr(100001, "ParamsError") TokenErr = NewCodeErr(100002, "InvalidToken") EncryptErr = NewCodeErr(100003, "EncryptionError") DecryptErr = NewCodeErr(100004, "DecryptionError") SignErr = NewCodeErr(100005, "SignatureError") )
Functions ¶
This section is empty.
Types ¶
type CodeErr ¶
type CodeErr struct {
Code int64 `json:"code"`
Msg string `json:"msg"`
DebugMsg string `json:"debug_msg"`
}
func GetCodeErr ¶
func NewCodeErr ¶
func (*CodeErr) SetDebugMsg ¶ added in v1.1.10
设置新的debug msg
func (*CodeErr) WithDebugMsg ¶ added in v1.1.10
debug msg初始化新的CodeErr
Click to show internal directories.
Click to hide internal directories.