2022-08-16 15:30:23 +00:00
|
|
|
package constant
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
CodeSuccess = 200
|
|
|
|
CodeErrBadRequest = 400
|
|
|
|
CodeErrUnauthorized = 401
|
2022-09-15 09:15:03 +00:00
|
|
|
CodeErrUnSafety = 402
|
2022-08-16 15:30:23 +00:00
|
|
|
CodeErrForbidden = 403
|
|
|
|
CodeErrNotFound = 404
|
2022-09-29 08:15:59 +00:00
|
|
|
CodePasswordExpired = 405
|
2022-12-05 03:12:07 +00:00
|
|
|
CodeAuth = 406
|
2023-01-31 07:22:05 +00:00
|
|
|
CodeGlobalLoading = 407
|
2022-08-16 15:30:23 +00:00
|
|
|
CodeErrInternalServer = 500
|
|
|
|
CodeErrHeader = 406
|
|
|
|
)
|
|
|
|
|
|
|
|
// internal
|
|
|
|
var (
|
|
|
|
ErrCaptchaCode = errors.New("ErrCaptchaCode")
|
2022-12-02 10:52:43 +00:00
|
|
|
ErrAuth = errors.New("ErrAuth")
|
2022-08-16 15:30:23 +00:00
|
|
|
ErrRecordExist = errors.New("ErrRecordExist")
|
|
|
|
ErrRecordNotFound = errors.New("ErrRecordNotFound")
|
|
|
|
ErrStructTransform = errors.New("ErrStructTransform")
|
2022-09-08 10:47:15 +00:00
|
|
|
ErrInitialPassword = errors.New("ErrInitialPassword")
|
2022-09-16 10:53:45 +00:00
|
|
|
ErrNotSupportType = errors.New("ErrNotSupportType")
|
|
|
|
ErrInvalidParams = errors.New("ErrInvalidParams")
|
2022-08-16 15:30:23 +00:00
|
|
|
|
|
|
|
ErrTokenParse = errors.New("ErrTokenParse")
|
|
|
|
|
|
|
|
ErrPageGenerate = errors.New("generate page info failed")
|
2023-02-10 10:07:29 +00:00
|
|
|
ErrRepoNotValid = "ErrRepoNotValid"
|
2022-08-16 15:30:23 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// api
|
|
|
|
var (
|
2022-09-29 08:15:59 +00:00
|
|
|
ErrTypeInternalServer = "ErrInternalServer"
|
|
|
|
ErrTypeInvalidParams = "ErrInvalidParams"
|
|
|
|
ErrTypeToken = "ErrToken"
|
|
|
|
ErrTypeTokenTimeOut = "ErrTokenTimeOut"
|
|
|
|
ErrTypeNotLogin = "ErrNotLogin"
|
|
|
|
ErrTypePasswordExpired = "ErrPasswordExpired"
|
|
|
|
ErrTypeNotSafety = "ErrNotSafety"
|
2022-12-02 02:31:07 +00:00
|
|
|
ErrNameIsExist = "ErrNameIsExist"
|
2022-08-16 15:30:23 +00:00
|
|
|
)
|
2022-12-01 07:48:40 +00:00
|
|
|
|
|
|
|
// app
|
|
|
|
var (
|
2022-12-02 10:17:16 +00:00
|
|
|
ErrPortInUsed = "ErrPortInUsed"
|
|
|
|
ErrAppLimit = "ErrAppLimit"
|
|
|
|
ErrAppRequired = "ErrAppRequired"
|
|
|
|
ErrFileCanNotRead = "ErrFileCanNotRead"
|
|
|
|
ErrFileToLarge = "ErrFileToLarge"
|
2022-12-04 09:45:54 +00:00
|
|
|
ErrNotInstall = "ErrNotInstall"
|
2023-02-07 08:29:54 +00:00
|
|
|
ErrPortInOtherApp = "ErrPortInOtherApp"
|
2022-12-01 07:48:40 +00:00
|
|
|
)
|
2022-12-04 08:10:48 +00:00
|
|
|
|
|
|
|
//website
|
|
|
|
var (
|
|
|
|
ErrDomainIsExist = "ErrDomainIsExist"
|
|
|
|
ErrAliasIsExist = "ErrAliasIsExist"
|
2022-12-12 07:36:45 +00:00
|
|
|
ErrAppDelete = "ErrAppDelete"
|
2022-12-04 08:10:48 +00:00
|
|
|
)
|
2022-12-05 07:50:53 +00:00
|
|
|
|
|
|
|
//ssl
|
|
|
|
var (
|
|
|
|
ErrSSLCannotDelete = "ErrSSLCannotDelete"
|
|
|
|
ErrAccountCannotDelete = "ErrAccountCannotDelete"
|
2023-01-04 03:44:43 +00:00
|
|
|
ErrSSLApply = "ErrSSLApply"
|
2022-12-05 07:50:53 +00:00
|
|
|
)
|
2023-02-09 06:31:05 +00:00
|
|
|
|
|
|
|
//file
|
|
|
|
var (
|
|
|
|
ErrPathNotFound = "ErrPathNotFound"
|
|
|
|
)
|