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
|
2023-05-19 13:47:46 +00:00
|
|
|
CodeErrIP = 408
|
|
|
|
CodeErrDomain = 409
|
2022-08-16 15:30:23 +00:00
|
|
|
CodeErrInternalServer = 500
|
|
|
|
CodeErrHeader = 406
|
2024-03-25 07:12:07 +00:00
|
|
|
|
|
|
|
CodeErrXpack = 410
|
2022-08-16 15:30:23 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// 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")
|
|
|
|
)
|
|
|
|
|
|
|
|
// api
|
|
|
|
var (
|
2022-09-29 08:15:59 +00:00
|
|
|
ErrTypeInternalServer = "ErrInternalServer"
|
|
|
|
ErrTypeInvalidParams = "ErrInvalidParams"
|
|
|
|
ErrTypeNotLogin = "ErrNotLogin"
|
|
|
|
ErrTypePasswordExpired = "ErrPasswordExpired"
|
2022-12-02 02:31:07 +00:00
|
|
|
ErrNameIsExist = "ErrNameIsExist"
|
2023-02-21 07:19:12 +00:00
|
|
|
ErrDemoEnvironment = "ErrDemoEnvironment"
|
2023-07-17 08:34:29 +00:00
|
|
|
ErrCmdIllegal = "ErrCmdIllegal"
|
2024-03-25 04:20:07 +00:00
|
|
|
ErrXpackNotFound = "ErrXpackNotFound"
|
|
|
|
ErrXpackNotActive = "ErrXpackNotActive"
|
|
|
|
ErrXpackOutOfDate = "ErrXpackOutOfDate"
|
2022-08-16 15:30:23 +00:00
|
|
|
)
|
2022-12-01 07:48:40 +00:00
|
|
|
|
|
|
|
// app
|
|
|
|
var (
|
2023-03-22 10:22:29 +00:00
|
|
|
ErrPortInUsed = "ErrPortInUsed"
|
|
|
|
ErrAppLimit = "ErrAppLimit"
|
|
|
|
ErrFileCanNotRead = "ErrFileCanNotRead"
|
|
|
|
ErrNotInstall = "ErrNotInstall"
|
|
|
|
ErrPortInOtherApp = "ErrPortInOtherApp"
|
|
|
|
ErrDbUserNotValid = "ErrDbUserNotValid"
|
|
|
|
ErrUpdateBuWebsite = "ErrUpdateBuWebsite"
|
|
|
|
Err1PanelNetworkFailed = "Err1PanelNetworkFailed"
|
2023-04-12 06:16:29 +00:00
|
|
|
ErrCmdTimeout = "ErrCmdTimeout"
|
2023-05-15 14:40:05 +00:00
|
|
|
ErrFileParse = "ErrFileParse"
|
|
|
|
ErrInstallDirNotFound = "ErrInstallDirNotFound"
|
2023-05-31 07:39:04 +00:00
|
|
|
ErrContainerName = "ErrContainerName"
|
2023-10-10 11:26:32 +00:00
|
|
|
ErrAppNameExist = "ErrAppNameExist"
|
2023-11-14 10:00:09 +00:00
|
|
|
ErrFileNotFound = "ErrFileNotFound"
|
|
|
|
ErrFileParseApp = "ErrFileParseApp"
|
2024-03-04 03:53:03 +00:00
|
|
|
ErrAppParamKey = "ErrAppParamKey"
|
2022-12-01 07:48:40 +00:00
|
|
|
)
|
2022-12-04 08:10:48 +00:00
|
|
|
|
2023-03-30 08:47:47 +00:00
|
|
|
// website
|
2022-12-04 08:10:48 +00:00
|
|
|
var (
|
2023-04-25 10:10:17 +00:00
|
|
|
ErrDomainIsExist = "ErrDomainIsExist"
|
|
|
|
ErrAliasIsExist = "ErrAliasIsExist"
|
|
|
|
ErrGroupIsUsed = "ErrGroupIsUsed"
|
|
|
|
ErrUsernameIsExist = "ErrUsernameIsExist"
|
|
|
|
ErrUsernameIsNotExist = "ErrUsernameIsNotExist"
|
2023-07-13 11:51:17 +00:00
|
|
|
ErrBackupMatch = "ErrBackupMatch"
|
|
|
|
ErrBackupExist = "ErrBackupExist"
|
2023-10-27 07:13:25 +00:00
|
|
|
ErrDomainIsUsed = "ErrDomainIsUsed"
|
2022-12-04 08:10:48 +00:00
|
|
|
)
|
2022-12-05 07:50:53 +00:00
|
|
|
|
2023-03-30 08:47:47 +00:00
|
|
|
// ssl
|
2022-12-05 07:50:53 +00:00
|
|
|
var (
|
2023-11-14 10:44:09 +00:00
|
|
|
ErrSSLCannotDelete = "ErrSSLCannotDelete"
|
|
|
|
ErrAccountCannotDelete = "ErrAccountCannotDelete"
|
|
|
|
ErrSSLApply = "ErrSSLApply"
|
|
|
|
ErrEmailIsExist = "ErrEmailIsExist"
|
|
|
|
ErrEabKidOrEabHmacKeyCannotBlank = "ErrEabKidOrEabHmacKeyCannotBlank"
|
2022-12-05 07:50:53 +00:00
|
|
|
)
|
2023-02-09 06:31:05 +00:00
|
|
|
|
2023-03-30 08:47:47 +00:00
|
|
|
// file
|
2023-02-09 06:31:05 +00:00
|
|
|
var (
|
2023-03-10 08:01:36 +00:00
|
|
|
ErrPathNotFound = "ErrPathNotFound"
|
|
|
|
ErrMovePathFailed = "ErrMovePathFailed"
|
|
|
|
ErrLinkPathNotFound = "ErrLinkPathNotFound"
|
|
|
|
ErrFileIsExit = "ErrFileIsExit"
|
2023-03-22 10:34:29 +00:00
|
|
|
ErrFileUpload = "ErrFileUpload"
|
2023-05-29 16:00:56 +00:00
|
|
|
ErrFileDownloadDir = "ErrFileDownloadDir"
|
2023-10-16 07:48:06 +00:00
|
|
|
ErrCmdNotFound = "ErrCmdNotFound"
|
2023-10-20 09:56:46 +00:00
|
|
|
ErrFavoriteExist = "ErrFavoriteExist"
|
2023-02-09 06:31:05 +00:00
|
|
|
)
|
2023-03-07 08:44:16 +00:00
|
|
|
|
2023-03-30 08:47:47 +00:00
|
|
|
// mysql
|
2023-03-07 08:44:16 +00:00
|
|
|
var (
|
|
|
|
ErrUserIsExist = "ErrUserIsExist"
|
|
|
|
ErrDatabaseIsExist = "ErrDatabaseIsExist"
|
2023-04-11 06:38:27 +00:00
|
|
|
ErrExecTimeOut = "ErrExecTimeOut"
|
2023-09-16 05:16:15 +00:00
|
|
|
ErrRemoteExist = "ErrRemoteExist"
|
|
|
|
ErrLocalExist = "ErrLocalExist"
|
2023-03-07 08:44:16 +00:00
|
|
|
)
|
2023-03-08 09:02:06 +00:00
|
|
|
|
2023-03-30 08:47:47 +00:00
|
|
|
// redis
|
2023-03-08 09:02:06 +00:00
|
|
|
var (
|
|
|
|
ErrTypeOfRedis = "ErrTypeOfRedis"
|
|
|
|
)
|
2023-03-15 08:48:26 +00:00
|
|
|
|
2023-03-30 08:47:47 +00:00
|
|
|
// container
|
2023-03-15 08:48:26 +00:00
|
|
|
var (
|
2023-03-16 07:03:44 +00:00
|
|
|
ErrInUsed = "ErrInUsed"
|
|
|
|
ErrObjectInUsed = "ErrObjectInUsed"
|
2023-04-28 14:46:20 +00:00
|
|
|
ErrPortRules = "ErrPortRules"
|
2024-01-09 07:53:33 +00:00
|
|
|
ErrPgImagePull = "ErrPgImagePull"
|
2023-03-15 08:48:26 +00:00
|
|
|
)
|
2023-03-30 08:47:47 +00:00
|
|
|
|
2023-03-31 06:02:28 +00:00
|
|
|
// runtime
|
2023-03-30 08:47:47 +00:00
|
|
|
var (
|
2023-09-25 09:50:14 +00:00
|
|
|
ErrDirNotFound = "ErrDirNotFound"
|
|
|
|
ErrFileNotExist = "ErrFileNotExist"
|
|
|
|
ErrImageBuildErr = "ErrImageBuildErr"
|
|
|
|
ErrImageExist = "ErrImageExist"
|
|
|
|
ErrDelWithWebsite = "ErrDelWithWebsite"
|
|
|
|
ErrRuntimeStart = "ErrRuntimeStart"
|
|
|
|
ErrPackageJsonNotFound = "ErrPackageJsonNotFound"
|
|
|
|
ErrScriptsNotFound = "ErrScriptsNotFound"
|
2023-03-30 08:47:47 +00:00
|
|
|
)
|
2023-04-17 08:06:28 +00:00
|
|
|
|
|
|
|
var (
|
|
|
|
ErrBackupInUsed = "ErrBackupInUsed"
|
2023-06-07 06:53:24 +00:00
|
|
|
ErrOSSConn = "ErrOSSConn"
|
2023-09-06 07:00:12 +00:00
|
|
|
ErrEntrance = "ErrEntrance"
|
2023-04-17 08:06:28 +00:00
|
|
|
)
|
2023-09-20 06:18:20 +00:00
|
|
|
|
|
|
|
var (
|
|
|
|
ErrFirewall = "ErrFirewall"
|
|
|
|
)
|
2023-10-23 03:28:33 +00:00
|
|
|
|
|
|
|
// cronjob
|
|
|
|
var (
|
|
|
|
ErrBashExecute = "ErrBashExecute"
|
|
|
|
)
|
2023-12-05 02:46:10 +00:00
|
|
|
|
|
|
|
var (
|
|
|
|
ErrNotExistUser = "ErrNotExistUser"
|
|
|
|
)
|
2024-03-25 04:20:07 +00:00
|
|
|
|
|
|
|
// license
|
|
|
|
var (
|
2024-04-01 08:28:07 +00:00
|
|
|
ErrLicense = "ErrLicense"
|
|
|
|
ErrLicenseCheck = "ErrLicenseCheck"
|
|
|
|
ErrLicenseSave = "ErrLicenseSave"
|
|
|
|
ErrLicenseSync = "ErrLicenseSync"
|
2024-03-25 04:20:07 +00:00
|
|
|
)
|