初始化项目框架,完成部分接口开发
This commit is contained in:
17
utility/ecode/common.go
Normal file
17
utility/ecode/common.go
Normal file
@ -0,0 +1,17 @@
|
||||
package ecode
|
||||
|
||||
var (
|
||||
OK = New(0, "success")
|
||||
Sub = New(1, "") // 自定义错误信息
|
||||
Fail = New(2, "server_error")
|
||||
InvalidOperation = New(3, "invalid_operation")
|
||||
Params = New(4, "params_error")
|
||||
Logout = New(5, "not_login")
|
||||
Disabled = New(6, "account_disabled")
|
||||
Denied = New(7, "permission_denied")
|
||||
Expire = New(8, "token_expired")
|
||||
Auth = New(1000, "auth_failed")
|
||||
Password = New(1001, "password_incorrect")
|
||||
EmailExist = New(1002, "email_exists")
|
||||
NotFound = New(1003, "not_found")
|
||||
)
|
||||
Reference in New Issue
Block a user