types

package
v2.2.27 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2024 License: AGPL-3.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

View Source
const (
	StatusNormal = iota
	StatusMaintain
	StatusClosed
	StatusUpgrade
	StatusFailed
)

定义面板状态常量

Variables

View Source
var PluginFail2ban = Plugin{
	Name:        "Fail2ban",
	Description: "Fail2ban 扫描系统日志文件并从中找出多次尝试失败的IP地址,将该IP地址加入防火墙的拒绝访问列表中",
	Slug:        "fail2ban",
	Version:     "1.0.2",
	Requires:    []string{},
	Excludes:    []string{},
	Install:     `bash /www/panel/scripts/fail2ban/install.sh`,
	Uninstall:   `bash /www/panel/scripts/fail2ban/uninstall.sh`,
	Update:      `bash /www/panel/scripts/fail2ban/update.sh`,
}
View Source
var PluginFrp = Plugin{
	Name:        "Frp",
	Description: "frp 是一个专注于内网穿透的高性能的反向代理应用",
	Slug:        "frp",
	Version:     "0.58.0",
	Requires:    []string{},
	Excludes:    []string{},
	Install:     `bash /www/panel/scripts/frp/install.sh`,
	Uninstall:   `bash /www/panel/scripts/frp/uninstall.sh`,
	Update:      `bash /www/panel/scripts/frp/update.sh`,
}
View Source
var PluginGitea = Plugin{
	Name:        "Gitea",
	Description: "Gitea 是一款极易搭建的自助 Git 服务,它包括 Git 托管、代码审查、团队协作、软件包注册和 CI/CD",
	Slug:        "gitea",
	Version:     "1.22.0",
	Requires:    []string{},
	Excludes:    []string{},
	Install:     `bash /www/panel/scripts/gitea/install.sh`,
	Uninstall:   `bash /www/panel/scripts/gitea/uninstall.sh`,
	Update:      `bash /www/panel/scripts/gitea/update.sh`,
}
View Source
var PluginMySQL57 = Plugin{
	Name:        "MySQL-5.7",
	Description: "MySQL 是最流行的关系型数据库管理系统之一,Oracle 旗下产品(已停止维护,不建议使用!预计 2025 年 12 月移除)",
	Slug:        "mysql57",
	Version:     "5.7.44",
	Requires:    []string{},
	Excludes:    []string{"mysql80", "mysql84"},
	Install:     `bash /www/panel/scripts/mysql/install.sh 57`,
	Uninstall:   `bash /www/panel/scripts/mysql/uninstall.sh 57`,
	Update:      `bash /www/panel/scripts/mysql/update.sh 57`,
}
View Source
var PluginMySQL80 = Plugin{
	Name:        "MySQL-8.0",
	Description: "MySQL 是最流行的关系型数据库管理系统之一,Oracle 旗下产品(建议内存 > 2G 安装)",
	Slug:        "mysql80",
	Version:     "8.0.37",
	Requires:    []string{},
	Excludes:    []string{"mysql57", "mysql84"},
	Install:     `bash /www/panel/scripts/mysql/install.sh 80`,
	Uninstall:   `bash /www/panel/scripts/mysql/uninstall.sh 80`,
	Update:      `bash /www/panel/scripts/mysql/update.sh 80`,
}
View Source
var PluginMySQL84 = Plugin{
	Name:        "MySQL-8.4",
	Description: "MySQL 是最流行的关系型数据库管理系统之一,Oracle 旗下产品(建议内存 > 2G 安装)",
	Slug:        "mysql84",
	Version:     "8.4.0",
	Requires:    []string{},
	Excludes:    []string{"mysql57", "mysql80"},
	Install:     `bash /www/panel/scripts/mysql/install.sh 84`,
	Uninstall:   `bash /www/panel/scripts/mysql/uninstall.sh 84`,
	Update:      `bash /www/panel/scripts/mysql/update.sh 84`,
}
View Source
var PluginOpenResty = Plugin{
	Name:        "OpenResty",
	Description: "OpenResty® 是一款基于 NGINX 和 LuaJIT 的 Web 平台",
	Slug:        "openresty",
	Version:     "1.25.3.1",
	Requires:    []string{},
	Excludes:    []string{},
	Install:     "bash /www/panel/scripts/openresty/install.sh",
	Uninstall:   "bash /www/panel/scripts/openresty/uninstall.sh",
	Update:      "bash /www/panel/scripts/openresty/install.sh",
}
View Source
var PluginPHP74 = Plugin{
	Name:        "PHP-7.4",
	Description: "PHP 是一种创建动态交互性站点的强有力的服务器端脚本语言(已停止维护,不建议使用!预计 2024 年 12 月移除)",
	Slug:        "php74",
	Version:     "7.4.33",
	Requires:    []string{},
	Excludes:    []string{},
	Install:     `bash /www/panel/scripts/php/install.sh 74`,
	Uninstall:   `bash /www/panel/scripts/php/uninstall.sh 74`,
	Update:      `bash /www/panel/scripts/php/install.sh 74`,
}
View Source
var PluginPHP80 = Plugin{
	Name:        "PHP-8.0",
	Description: "PHP 是一种创建动态交互性站点的强有力的服务器端脚本语言(已停止维护,不建议使用!预计 2025 年 12 月移除)",
	Slug:        "php80",
	Version:     "8.0.30",
	Requires:    []string{},
	Excludes:    []string{},
	Install:     `bash /www/panel/scripts/php/install.sh 80`,
	Uninstall:   `bash /www/panel/scripts/php/uninstall.sh 80`,
	Update:      `bash /www/panel/scripts/php/install.sh 80`,
}
View Source
var PluginPHP81 = Plugin{
	Name:        "PHP-8.1",
	Description: "PHP 是一种创建动态交互性站点的强有力的服务器端脚本语言",
	Slug:        "php81",
	Version:     "8.1.29",
	Requires:    []string{},
	Excludes:    []string{},
	Install:     `bash /www/panel/scripts/php/install.sh 81`,
	Uninstall:   `bash /www/panel/scripts/php/uninstall.sh 81`,
	Update:      `bash /www/panel/scripts/php/install.sh 81`,
}
View Source
var PluginPHP82 = Plugin{
	Name:        "PHP-8.2",
	Description: "PHP 是一种创建动态交互性站点的强有力的服务器端脚本语言",
	Slug:        "php82",
	Version:     "8.2.20",
	Requires:    []string{},
	Excludes:    []string{},
	Install:     `bash /www/panel/scripts/php/install.sh 82`,
	Uninstall:   `bash /www/panel/scripts/php/uninstall.sh 82`,
	Update:      `bash /www/panel/scripts/php/install.sh 82`,
}
View Source
var PluginPHP83 = Plugin{
	Name:        "PHP-8.3",
	Description: "PHP 是一种创建动态交互性站点的强有力的服务器端脚本语言",
	Slug:        "php83",
	Version:     "8.3.8",
	Requires:    []string{},
	Excludes:    []string{},
	Install:     `bash /www/panel/scripts/php/install.sh 83`,
	Uninstall:   `bash /www/panel/scripts/php/uninstall.sh 83`,
	Update:      `bash /www/panel/scripts/php/install.sh 83`,
}
View Source
var PluginPHPMyAdmin = Plugin{
	Name:        "phpMyAdmin",
	Description: "phpMyAdmin 是一个以 PHP 为基础,以 Web-Base 方式架构在网站主机上的 MySQL 数据库管理工具",
	Slug:        "phpmyadmin",
	Version:     "5.2.1",
	Requires:    []string{"openresty"},
	Excludes:    []string{},
	Install:     `bash /www/panel/scripts/phpmyadmin/install.sh`,
	Uninstall:   `bash /www/panel/scripts/phpmyadmin/uninstall.sh`,
	Update:      `bash /www/panel/scripts/phpmyadmin/uninstall.sh && bash /www/panel/scripts/phpmyadmin/install.sh`,
}
View Source
var PluginPodman = Plugin{
	Name:        "Podman",
	Description: "Podman(POD MANager)是一款用于管理容器和镜像、挂载到这些容器中的卷以及由容器组构成的 Pod 的工具",
	Slug:        "podman",
	Version:     "4.0.0",
	Requires:    []string{},
	Excludes:    []string{"docker"},
	Install:     `bash /www/panel/scripts/podman/install.sh`,
	Uninstall:   `bash /www/panel/scripts/podman/uninstall.sh`,
	Update:      `bash /www/panel/scripts/podman/update.sh`,
}
View Source
var PluginPostgreSQL15 = Plugin{
	Name:        "PostgreSQL-15",
	Description: "PostgreSQL 是世界上最先进的开源关系数据库,在类似 BSD 与 MIT 许可的 PostgreSQL 许可下发行",
	Slug:        "postgresql15",
	Version:     "15.7",
	Requires:    []string{},
	Excludes:    []string{"postgresql16"},
	Install:     `bash /www/panel/scripts/postgresql/install.sh 15`,
	Uninstall:   `bash /www/panel/scripts/postgresql/uninstall.sh 15`,
	Update:      `bash /www/panel/scripts/postgresql/update.sh 15`,
}
View Source
var PluginPostgreSQL16 = Plugin{
	Name:        "PostgreSQL-16",
	Description: "PostgreSQL 是世界上最先进的开源关系数据库,在类似 BSD 与 MIT 许可的 PostgreSQL 许可下发行",
	Slug:        "postgresql16",
	Version:     "16.3",
	Requires:    []string{},
	Excludes:    []string{"postgresql15"},
	Install:     `bash /www/panel/scripts/postgresql/install.sh 16`,
	Uninstall:   `bash /www/panel/scripts/postgresql/uninstall.sh 16`,
	Update:      `bash /www/panel/scripts/postgresql/update.sh 16`,
}
View Source
var PluginPureFTPd = Plugin{
	Name:        "Pure-FTPd",
	Description: "Pure-Ftpd 是一个快速、高效、轻便、安全的 FTP 服务器,它以安全和配置简单为设计目标,支持虚拟主机,IPV6,PAM 等功能",
	Slug:        "pureftpd",
	Version:     "1.0.50",
	Requires:    []string{},
	Excludes:    []string{},
	Install:     `bash /www/panel/scripts/pureftpd/install.sh`,
	Uninstall:   `bash /www/panel/scripts/pureftpd/uninstall.sh`,
	Update:      `bash /www/panel/scripts/pureftpd/update.sh`,
}
View Source
var PluginRedis = Plugin{
	Name:        "Redis",
	Description: "Redis 是一个开源的使用 ANSI C 语言编写、支持网络、可基于内存亦可持久化的日志型、Key-Value 数据库,并提供多种语言的 API",
	Slug:        "redis",
	Version:     "7.2.5",
	Requires:    []string{},
	Excludes:    []string{},
	Install:     `bash /www/panel/scripts/redis/install.sh`,
	Uninstall:   `bash /www/panel/scripts/redis/uninstall.sh`,
	Update:      `bash /www/panel/scripts/redis/update.sh`,
}
View Source
var PluginRsync = Plugin{
	Name:        "Rsync",
	Description: "Rsync 是一款提供快速增量文件传输的开源工具",
	Slug:        "rsync",
	Version:     "3.2.7",
	Requires:    []string{},
	Excludes:    []string{},
	Install:     `bash /www/panel/scripts/rsync/install.sh`,
	Uninstall:   `bash /www/panel/scripts/rsync/uninstall.sh`,
	Update:      `bash /www/panel/scripts/rsync/install.sh`,
}
View Source
var PluginS3fs = Plugin{
	Name:        "S3fs",
	Description: "S3fs 通过 FUSE 挂载兼容 S3 标准的存储桶,例如 Amazon S3、阿里云 OSS、腾讯云 COS、七牛云 Kodo 等",
	Slug:        "s3fs",
	Version:     "1.9",
	Requires:    []string{},
	Excludes:    []string{},
	Install:     `bash /www/panel/scripts/s3fs/install.sh`,
	Uninstall:   `bash /www/panel/scripts/s3fs/uninstall.sh`,
	Update:      `bash /www/panel/scripts/s3fs/update.sh`,
}
View Source
var PluginSupervisor = Plugin{
	Name:        "Supervisor",
	Description: "Supervisor 是一个客户端/服务器系统,允许用户监视和控制类 UNIX 操作系统上的多个进程",
	Slug:        "supervisor",
	Version:     "4.2.5",
	Requires:    []string{},
	Excludes:    []string{},
	Install:     `bash /www/panel/scripts/supervisor/install.sh`,
	Uninstall:   `bash /www/panel/scripts/supervisor/uninstall.sh`,
	Update:      `bash /www/panel/scripts/supervisor/update.sh`,
}
View Source
var PluginToolBox = Plugin{
	Name:        "系统工具箱",
	Description: "可视化调整一些常用的配置项,如 DNS、SWAP、时区等",
	Slug:        "toolbox",
	Version:     "1.0.0",
	Requires:    []string{},
	Excludes:    []string{},
	Install:     `panel writePlugin toolbox 1.0.0`,
	Uninstall:   `panel deletePlugin toolbox`,
	Update:      `panel writePlugin toolbox 1.0.0`,
}
View Source
var Status = StatusNormal

Functions

This section is empty.

Types

type BackupFile

type BackupFile struct {
	Name string `json:"name"`
	Size string `json:"size"`
}

type ContainerNetwork

type ContainerNetwork struct {
	Enabled bool   `form:"enabled" json:"enabled"`
	Gateway string `form:"gateway" json:"gateway"`
	IPRange string `form:"ip_range" json:"ip_range"`
	Subnet  string `form:"subnet" json:"subnet"`
}

type ContainerPort

type ContainerPort struct {
	ContainerStart int    `form:"container_start" json:"container_start"`
	ContainerEnd   int    `form:"container_end" json:"container_end"`
	Host           string `form:"host" json:"host"`
	HostStart      int    `form:"host_start" json:"host_start"`
	HostEnd        int    `form:"host_end" json:"host_end"`
	Protocol       string `form:"protocol" json:"protocol"`
}

type ContainerVolume

type ContainerVolume struct {
	Host      string `form:"host" json:"host"`
	Container string `form:"container" json:"container"`
	Mode      string `form:"mode" json:"mode"`
}

type Fail2banJail

type Fail2banJail struct {
	Name     string `json:"name"`
	Enabled  bool   `json:"enabled"`
	LogPath  string `json:"log_path"`
	MaxRetry int    `json:"max_retry"`
	FindTime int    `json:"find_time"`
	BanTime  int    `json:"ban_time"`
}

type KV

type KV struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type MySQLDatabase

type MySQLDatabase struct {
	Name string `json:"name"`
}

type MySQLUser

type MySQLUser struct {
	User   string   `json:"user"`
	Host   string   `json:"host"`
	Grants []string `json:"grants"`
}

type NV

type NV struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type PHPExtension

type PHPExtension struct {
	Name        string `json:"name"`
	Slug        string `json:"slug"`
	Description string `json:"description"`
	Installed   bool   `json:"installed"`
}

type Plugin

type Plugin struct {
	Name        string
	Description string
	Slug        string
	Version     string
	Requires    []string
	Excludes    []string
	Install     string
	Uninstall   string
	Update      string
}

Plugin 插件元数据结构

type PostgresDatabase

type PostgresDatabase struct {
	Name     string `json:"name"`
	Owner    string `json:"owner"`
	Encoding string `json:"encoding"`
}

type PostgresUser

type PostgresUser struct {
	Role       string   `json:"role"`
	Attributes []string `json:"attributes"`
}

type PureFtpdUser

type PureFtpdUser struct {
	Username string `json:"username"`
	Path     string `json:"path"`
}

type RsyncModule

type RsyncModule struct {
	Name       string `json:"name"`
	Path       string `json:"path"`
	Comment    string `json:"comment"`
	ReadOnly   bool   `json:"read_only"`
	AuthUser   string `json:"auth_user"`
	Secret     string `json:"secret"`
	HostsAllow string `json:"hosts_allow"`
}

type S3fsMount

type S3fsMount struct {
	ID     int64  `json:"id"`
	Path   string `json:"path"`
	Bucket string `json:"bucket"`
	Url    string `json:"url"`
}

type WebsiteSetting

type WebsiteSetting struct {
	Name              string   `json:"name"`
	Domains           []string `json:"domains"`
	Ports             []string `json:"ports"`
	SSLPorts          []string `json:"ssl_ports"`
	QUICPorts         []string `json:"quic_ports"`
	Root              string   `json:"root"`
	Path              string   `json:"path"`
	Index             string   `json:"index"`
	PHP               string   `json:"php"`
	OpenBasedir       bool     `json:"open_basedir"`
	SSL               bool     `json:"ssl"`
	SSLCertificate    string   `json:"ssl_certificate"`
	SSLCertificateKey string   `json:"ssl_certificate_key"`
	SSLNotBefore      string   `json:"ssl_not_before"`
	SSLNotAfter       string   `json:"ssl_not_after"`
	SSLDNSNames       []string `json:"ssl_dns_names"`
	SSLIssuer         string   `json:"ssl_issuer"`
	SSLOCSPServer     []string `json:"ssl_ocsp_server"`
	HTTPRedirect      bool     `json:"http_redirect"`
	HSTS              bool     `json:"hsts"`
	OCSP              bool     `json:"ocsp"`
	Waf               bool     `json:"waf"`
	WafMode           string   `json:"waf_mode"`
	WafCcDeny         string   `json:"waf_cc_deny"`
	WafCache          string   `json:"waf_cache"`
	Rewrite           string   `json:"rewrite"`
	Raw               string   `json:"raw"`
	Log               string   `json:"log"`
}

WebsiteSetting 网站设置

Jump to

Keyboard shortcuts

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