constant

package
v0.0.0-...-c7f185a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2026 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AlertEnable      = "Enable"
	AlertDisable     = "Disable"
	AlertSuccess     = "Success"
	AlertPushing     = "Pushing"
	AlertError       = "Error"
	AlertSyncError   = "SyncError"
	AlertPushError   = "PushError"
	AlertPushSuccess = "PushSuccess"
)
View Source
const (
	CommonConfig = "common"
	SMSConfig    = "sms"
	EmailConfig  = "email"
)
View Source
const (
	WeChat   = "wechat"
	SMS      = "sms"
	Email    = "mail"
	WeCom    = "weCom"
	DingTalk = "dingTalk"
	FeiShu   = "feiShu"
	Custom   = "custom"
)
View Source
const (
	ContainerPrefix = "1Panel-"

	AppNormal   = "Normal"
	AppTakeDown = "TakeDown"

	AppOpenresty         = "openresty"
	AppOpenclaw          = "openclaw"
	AppMysql             = "mysql"
	AppMariaDB           = "mariadb"
	AppPostgresql        = "postgresql"
	AppRedis             = "redis"
	AppPostgres          = "postgres"
	AppMongodb           = "mongodb"
	AppMemcached         = "memcached"
	AppMysqlCluster      = "mysql-cluster"
	AppPostgresqlCluster = "postgresql-cluster"
	AppRedisCluster      = "redis-cluster"

	AppResourceLocal  = "local"
	AppResourceRemote = "remote"
	AppResourceCustom = "custom"

	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"
	UPYUN        = "UPYUN"
	ALIYUN       = "ALIYUN"
	GoogleDrive  = "GoogleDrive"
)
View Source
const (
	DB DBContext = "db"

	SystemRestart = "systemRestart"

	TypeWebsite       = "website"
	TypePhp           = "php"
	TypeSSL           = "ssl"
	TypeSystem        = "system"
	TypeTask          = "task"
	TypeApp           = "app"
	TypeImagePull     = "image-pull"
	TypeImagePush     = "image-push"
	TypeImageBuild    = "image-build"
	TypeComposeCreate = "compose-create"

	InterruptedMsg = "the task was interrupted due to the restart of the 1panel service"
)
View Source
const (
	TimeOut5s  = 5
	TimeOut20s = 20
	TimeOut5m  = 300

	DateLayout               = "2006-01-02"          // or use time.DateOnly while go version >= 1.20
	DateTimeLayout           = "2006-01-02 15:04:05" // or use time.DateTime while go version >= 1.20
	DateTimeSlimLayout       = "20060102150405"
	WebsiteDefaultExpireDate = "9999-12-31"
)
View Source
const (
	DirPerm  = 0755
	FilePerm = 0644
)
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"
)
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"

	RuntimePHP    = "php"
	RuntimeNode   = "node"
	RuntimeJava   = "java"
	RuntimeGo     = "go"
	RuntimePython = "python"
	RuntimeDotNet = "dotnet"

	RuntimeProxyUnix = "unix"
	RuntimeProxyTcp  = "tcp"

	RuntimeUp      = "up"
	RuntimeDown    = "down"
	RuntimeRestart = "restart"

	RuntimeInstall   = "install"
	RuntimeUninstall = "uninstall"
	RuntimeUpdate    = "update"

	RuntimeNpm  = "npm"
	RuntimeYarn = "yarn"
)
View Source
const (
	StatusRunning        = "Running"
	StatusCanceled       = "Canceled"
	StatusDone           = "Done"
	StatusWaiting        = "Waiting"
	StatusPending        = "Pending"
	StatusSuccess        = "Success"
	StatusFailed         = "Failed"
	StatusUploading      = "Uploading"
	StatusEnable         = "Enable"
	StatusDisable        = "Disable"
	StatusNone           = "None"
	StatusDeleted        = "Deleted"
	StatusExecuting      = "Executing"
	StatusBuilding       = "Building"
	StatusReCreating     = "Recreating"
	StatusStopped        = "Stopped"
	StatusCreating       = "Creating"
	StatusStartErr       = "StartErr"
	StatusNormal         = "Normal"
	StatusError          = "Error"
	StatusStarting       = "Starting"
	StatusRestarting     = "ReStarting"
	StatusUnHealthy      = "UnHealthy"
	StatusInstalling     = "Installing"
	StatusDownloadErr    = "DownloadErr"
	StatusUpgrading      = "Upgrading"
	StatusUpgradeErr     = "UpgradeErr"
	StatusRebuilding     = "Rebuilding"
	StatusSyncing        = "Syncing"
	StatusSyncSuccess    = "SyncSuccess"
	StatusPaused         = "Paused"
	StatusUpErr          = "UpErr"
	StatusInstallErr     = "InstallErr"
	StatusUninstalling   = "Uninstalling"
	StatusWaitingRestart = "WaitingRestart"
	StatusUnexecuted     = "Unexecuted"

	OrderDesc = "descending"
	OrderAsc  = "ascending"
	Desc      = "desc"
	Asc       = "asc"
)
View Source
const (
	TaskInstall       = "installApp"
	TaskCreateWebsite = "createWebsite"
)
View Source
const (
	WebRunning = "Running"
	WebStopped = "Stopped"

	ProtocolHTTP   = "HTTP"
	ProtocolHTTPS  = "HTTPS"
	ProtocolStream = "TCP/UDP"

	NewApp       = "new"
	InstalledApp = "installed"

	Deployment = "deployment"
	Static     = "static"
	Proxy      = "proxy"
	Runtime    = "runtime"
	Subsite    = "subsite"
	Stream     = "stream"

	SSLExisted = "existed"
	SSLAuto    = "auto"
	SSLManual  = "manual"

	DNSAccount = "dnsAccount"
	DnsManual  = "dnsManual"
	Http       = "http"
	Manual     = "manual"
	SelfSigned = "selfSigned"
	FromMaster = "fromMaster"

	StartWeb = "start"
	StopWeb  = "stop"
	SetHttps = "setHttps"

	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 DaemonJsonPath = "/etc/docker/daemon.json"
View Source
var GoDefaultVolumes = map[string]string{
	"${CODE_DIR}": "/app",
	"./run.sh":    "/run.sh",
	"./.env":      "/.env",
	"./mod":       "/go/pkg/mod",
}
View Source
var PHPDefaultVolumes = map[string]string{
	"${PANEL_WEBSITE_DIR}":                  "/www/",
	"./conf/php.ini":                        "/usr/local/etc/php/php.ini",
	"./conf/conf.d":                         "/usr/local/etc/php/conf.d",
	"./conf/php-fpm.conf":                   "/usr/local/etc/php-fpm.conf",
	"./log":                                 "/var/log/php",
	"./extensions":                          "/usr/local/lib/php/extensions",
	"./supervisor/supervisord.conf":         "/etc/supervisord.conf",
	"./supervisor/supervisor.d/php-fpm.ini": "/etc/supervisor.d/php-fpm.ini",
	"./supervisor/supervisor.d":             "/etc/supervisor.d",
	"./supervisor/log":                      "/var/log/supervisor",
	"./composer":                            "/tmp/composer",
}
View Source
var RuntimeDefaultVolumes = map[string]string{
	"${CODE_DIR}": "/app",
	"./run.sh":    "/run.sh",
	"./.env":      "/.env",
}

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"
	Favorite AppOperate = "favorite"
)

type DBContext

type DBContext string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL