Documentation ¶
Index ¶
Constants ¶
View Source
const ( Running = "Running" UnHealthy = "UnHealthy" Error = "Error" Stopped = "Stopped" Installing = "Installing" DownloadErr = "DownloadErr" Upgrading = "Upgrading" UpgradeErr = "UpgradeErr" Rebuilding = "Rebuilding" Syncing = "Syncing" SyncSuccess = "SyncSuccess" Paused = "Paused" UpErr = "UpErr" ContainerPrefix = "1Panel-" AppNormal = "Normal" AppTakeDown = "TakeDown" AppOpenresty = "openresty" AppMysql = "mysql" AppMariaDB = "mariadb" AppPostgresql = "postgresql" AppRedis = "redis" AppPostgres = "postgres" AppMongodb = "mongodb" AppMemcached = "memcached" AppResourceLocal = "local" AppResourceRemote = "remote" CPUS = "CPUS" MemoryLimit = "MEMORY_LIMIT" HostIP = "HOST_IP" ContainerName = "CONTAINER_NAME" )
View Source
const ( Valid = "VALID" DisConnect = "DISCONNECT" VerifyFailed = "VERIFYFAILED" S3 = "S3" OSS = "OSS" Sftp = "SFTP" OneDrive = "OneDrive" MinIo = "MINIO" Cos = "COS" Kodo = "KODO" WebDAV = "WebDAV" Local = "LOCAL" OneDriveRedirectURI = "http://localhost/login/authorized" )
View Source
const ( DB DBContext = "db" SystemRestart = "systemRestart" TypeWebsite = "website" TypePhp = "php" TypeSSL = "ssl" TypeSystem = "system" )
View Source
const ( TimeOut5s = 5 TimeOut20s = 20 TimeOut5m = 300 DateLayout = "2006-01-02" // or use time.DateOnly while go version >= 1.20 DefaultDate = "1970-01-01" DateTimeLayout = "2006-01-02 15:04:05" // or use time.DateTime while go version >= 1.20 DateTimeSlimLayout = "20060102150405" )
View Source
const ( ContainerOpStart = "start" ContainerOpStop = "stop" ContainerOpRestart = "restart" ContainerOpKill = "kill" ContainerOpPause = "pause" ContainerOpUnpause = "unpause" ContainerOpRename = "rename" ContainerOpRemove = "remove" ComposeOpStop = "stop" ComposeOpRestart = "restart" ComposeOpRemove = "remove" DaemonJsonPath = "/etc/docker/daemon.json" )
View Source
const ( CodeSuccess = 200 CodeErrBadRequest = 400 CodeErrNotFound = 404 CodeAuth = 406 CodeGlobalLoading = 407 CodeErrInternalServer = 500 CodeErrIP = 310 CodeErrDomain = 311 CodeErrEntrance = 312 CodePasswordExpired = 313 CodeErrXpack = 410 )
View Source
const ( Supervisord = "supervisord" Supervisor = "supervisor" SupervisorConfigPath = "SupervisorConfigPath" SupervisorServiceName = "SupervisorServiceName" )
View Source
const ( NginxScopeServer = "server" NginxScopeHttp = "http" NginxScopeOut = "out" NginxReload = "reload" NginxCheck = "check" NginxRestart = "restart" ConfigNew = "add" ConfigUpdate = "update" ConfigDel = "delete" )
View Source
const ( ResourceLocal = "local" ResourceAppstore = "appstore" RuntimeNormal = "normal" RuntimeError = "error" RuntimeBuildIng = "building" RuntimeStarting = "starting" RuntimeRunning = "running" RuntimeReCreating = "recreating" RuntimeStopped = "stopped" RuntimeUnhealthy = "unhealthy" RuntimeCreating = "creating" RuntimePHP = "php" RuntimeNode = "node" RuntimeJava = "java" RuntimeGo = "go" RuntimeProxyUnix = "unix" RuntimeProxyTcp = "tcp" RuntimeUp = "up" RuntimeDown = "down" RuntimeRestart = "restart" RuntimeInstall = "install" RuntimeUninstall = "uninstall" RuntimeUpdate = "update" RuntimeNpm = "npm" RuntimeYarn = "yarn" )
View Source
const ( AuthMethodSession = "session" SessionName = "psession" AuthMethodJWT = "jwt" JWTHeaderName = "PanelAuthorization" JWTBufferTime = 3600 JWTIssuer = "1Panel" PasswordExpiredName = "expired" )
View Source
const ( StatusRunning = "Running" StatusDone = "Done" StatusWaiting = "Waiting" StatusSuccess = "Success" StatusFailed = "Failed" StatusUploading = "Uploading" StatusEnable = "Enable" StatusDisable = "Disable" StatusNone = "None" OrderDesc = "descending" OrderAsc = "ascending" )
View Source
const ( WebRunning = "Running" WebStopped = "Stopped" ProtocolHTTP = "HTTP" ProtocolHTTPS = "HTTPS" NewApp = "new" InstalledApp = "installed" Deployment = "deployment" Static = "static" Proxy = "proxy" Runtime = "runtime" SSLExisted = "existed" SSLAuto = "auto" SSLManual = "manual" DNSAccount = "dnsAccount" DnsManual = "dnsManual" Http = "http" Manual = "manual" SelfSigned = "selfSigned" StartWeb = "start" StopWeb = "stop" HTTPSOnly = "HTTPSOnly" HTTPAlso = "HTTPAlso" HTTPToHTTPS = "HTTPToHTTPS" GetLog = "get" DisableLog = "disable" EnableLog = "enable" DeleteLog = "delete" AccessLog = "access.log" ErrorLog = "error.log" ConfigPHP = "php" ConfigFPM = "fpm" SSLInit = "init" SSLError = "error" SSLReady = "ready" SSLApply = "applying" SSLApplyError = "applyError" )
Variables ¶
View Source
var ( DataDir = global.CONF.System.DataDir ResourceDir = path.Join(DataDir, "resource") AppResourceDir = path.Join(ResourceDir, "apps") AppInstallDir = path.Join(DataDir, "apps") LocalAppResourceDir = path.Join(AppResourceDir, "local") LocalAppInstallDir = path.Join(AppInstallDir, "local") RemoteAppResourceDir = path.Join(AppResourceDir, "remote") RuntimeDir = path.Join(DataDir, "runtime") RecycleBinDir = "/.1panel_clash" SSLLogDir = path.Join(global.CONF.System.DataDir, "log", "ssl") )
View Source
var ( ErrCaptchaCode = errors.New("ErrCaptchaCode") ErrAuth = errors.New("ErrAuth") ErrRecordExist = errors.New("ErrRecordExist") ErrRecordNotFound = errors.New("ErrRecordNotFound") ErrStructTransform = errors.New("ErrStructTransform") ErrInitialPassword = errors.New("ErrInitialPassword") ErrNotSupportType = errors.New("ErrNotSupportType") ErrInvalidParams = errors.New("ErrInvalidParams") ErrTokenParse = errors.New("ErrTokenParse") )
internal
View Source
var ( ErrTypeInternalServer = "ErrInternalServer" ErrTypeInvalidParams = "ErrInvalidParams" ErrTypeNotLogin = "ErrNotLogin" ErrTypePasswordExpired = "ErrPasswordExpired" ErrNameIsExist = "ErrNameIsExist" ErrDemoEnvironment = "ErrDemoEnvironment" ErrCmdIllegal = "ErrCmdIllegal" ErrXpackNotFound = "ErrXpackNotFound" ErrXpackNotActive = "ErrXpackNotActive" ErrXpackOutOfDate = "ErrXpackOutOfDate" )
api
View Source
var ( ErrPortInUsed = "ErrPortInUsed" ErrAppLimit = "ErrAppLimit" ErrFileCanNotRead = "ErrFileCanNotRead" ErrNotInstall = "ErrNotInstall" ErrPortInOtherApp = "ErrPortInOtherApp" ErrDbUserNotValid = "ErrDbUserNotValid" ErrUpdateBuWebsite = "ErrUpdateBuWebsite" Err1PanelNetworkFailed = "Err1PanelNetworkFailed" ErrCmdTimeout = "ErrCmdTimeout" ErrFileParse = "ErrFileParse" ErrInstallDirNotFound = "ErrInstallDirNotFound" ErrContainerName = "ErrContainerName" ErrAppNameExist = "ErrAppNameExist" ErrFileNotFound = "ErrFileNotFound" ErrFileParseApp = "ErrFileParseApp" ErrAppParamKey = "ErrAppParamKey" )
app
View Source
var ( ErrDomainIsExist = "ErrDomainIsExist" ErrAliasIsExist = "ErrAliasIsExist" ErrGroupIsUsed = "ErrGroupIsUsed" ErrUsernameIsExist = "ErrUsernameIsExist" ErrUsernameIsNotExist = "ErrUsernameIsNotExist" ErrBackupMatch = "ErrBackupMatch" ErrBackupExist = "ErrBackupExist" ErrDomainIsUsed = "ErrDomainIsUsed" )
website
View Source
var ( ErrSSLCannotDelete = "ErrSSLCannotDelete" ErrAccountCannotDelete = "ErrAccountCannotDelete" ErrSSLApply = "ErrSSLApply" ErrEmailIsExist = "ErrEmailIsExist" ErrEabKidOrEabHmacKeyCannotBlank = "ErrEabKidOrEabHmacKeyCannotBlank" )
ssl
View Source
var ( ErrPathNotFound = "ErrPathNotFound" ErrMovePathFailed = "ErrMovePathFailed" ErrLinkPathNotFound = "ErrLinkPathNotFound" ErrFileIsExist = "ErrFileIsExist" ErrFileUpload = "ErrFileUpload" ErrFileDownloadDir = "ErrFileDownloadDir" ErrCmdNotFound = "ErrCmdNotFound" ErrFavoriteExist = "ErrFavoriteExist" )
file
View Source
var ( ErrUserIsExist = "ErrUserIsExist" ErrDatabaseIsExist = "ErrDatabaseIsExist" ErrExecTimeOut = "ErrExecTimeOut" ErrRemoteExist = "ErrRemoteExist" ErrLocalExist = "ErrLocalExist" )
mysql
View Source
var ( ErrInUsed = "ErrInUsed" ErrObjectInUsed = "ErrObjectInUsed" ErrPortRules = "ErrPortRules" ErrPgImagePull = "ErrPgImagePull" )
container
View Source
var ( ErrDirNotFound = "ErrDirNotFound" ErrFileNotExist = "ErrFileNotExist" ErrImageBuildErr = "ErrImageBuildErr" ErrImageExist = "ErrImageExist" ErrDelWithWebsite = "ErrDelWithWebsite" ErrRuntimeStart = "ErrRuntimeStart" ErrPackageJsonNotFound = "ErrPackageJsonNotFound" ErrScriptsNotFound = "ErrScriptsNotFound" )
runtime
View Source
var ( ErrBackupInUsed = "ErrBackupInUsed" ErrOSSConn = "ErrOSSConn" ErrEntrance = "ErrEntrance" )
View Source
var ( ErrLicense = "ErrLicense" ErrLicenseCheck = "ErrLicenseCheck" ErrLicenseSave = "ErrLicenseSave" ErrLicenseSync = "ErrLicenseSync" )
license
View Source
var (
ErrBashExecute = "ErrBashExecute"
)
cronjob
View Source
var (
ErrFirewall = "ErrFirewall"
)
View Source
var (
ErrNotExistUser = "ErrNotExistUser"
)
View Source
var (
ErrTypeOfRedis = "ErrTypeOfRedis"
)
redis
Functions ¶
This section is empty.
Types ¶
type AppOperate ¶
type AppOperate string
var ( Start AppOperate = "start" Stop AppOperate = "stop" Restart AppOperate = "restart" Delete AppOperate = "delete" Sync AppOperate = "sync" Backup AppOperate = "backup" Update AppOperate = "update" Rebuild AppOperate = "rebuild" Upgrade AppOperate = "upgrade" Reload AppOperate = "reload" )
Click to show internal directories.
Click to hide internal directories.