Documentation ¶
Index ¶
- func KVToMap(kvs []KV) map[string]string
- func KVToSlice(kvs []KV) []string
- type App
- type AppCenter
- type BackupFile
- type CPU
- type CertList
- type Container
- type ContainerContainerNetwork
- type ContainerContainerVolume
- type ContainerImage
- type ContainerNetwork
- type ContainerNetworkIPAM
- type ContainerNetworkIPAMConfig
- type ContainerPort
- type ContainerVolume
- type CurrentInfo
- type KV
- type LV
- type LVInt
- type Load
- type Mem
- type MonitorData
- type MySQLDatabase
- type MySQLUser
- type NV
- type Network
- type PanelAppConfig
- type PanelConfig
- type PanelDatabaseConfig
- type PanelHTTPConfig
- type PostgresDatabase
- type PostgresUser
- type ProcessData
- type SWAP
- type WebsiteListen
- type WebsiteSetting
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct { Slug string `json:"slug"` // 应用标识 Route func(r chi.Router) `json:"-"` // 路由 }
App 应用元数据结构
type AppCenter ¶
type AppCenter struct { Icon string `json:"icon"` Name string `json:"name"` Description string `json:"description"` Slug string `json:"slug"` Channels []struct { Slug string `json:"slug"` Name string `json:"name"` Panel string `json:"panel"` Install string `json:"-"` Uninstall string `json:"-"` Update string `json:"-"` Subs []struct { Log string `json:"log"` Version string `json:"version"` } `json:"subs"` } `json:"channels"` Installed bool `json:"installed"` InstalledChannel string `json:"installed_channel"` InstalledVersion string `json:"installed_version"` UpdateExist bool `json:"update_exist"` Show bool `json:"show"` }
AppCenter 应用中心结构
type BackupFile ¶
type CertList ¶
type CertList struct { ID uint `json:"id"` AccountID uint `json:"account_id"` WebsiteID uint `json:"website_id"` DNSID uint `json:"dns_id"` Type string `json:"type"` Domains []string `json:"domains"` AutoRenew bool `json:"auto_renew"` Cert string `json:"cert"` Key string `json:"key"` NotBefore time.Time `json:"not_before"` NotAfter time.Time `json:"not_after"` Issuer string `json:"issuer"` OCSPServer []string `json:"ocsp_server"` DNSNames []string `json:"dns_names"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type Container ¶
type Container struct { ID string `json:"id"` Name string `json:"name"` Image string `json:"image"` ImageID string `json:"image_id"` Command string `json:"command"` State string `json:"state"` Status string `json:"status"` CreatedAt time.Time `json:"created_at"` Ports []ContainerPort `json:"ports"` Labels []KV `json:"labels"` }
type ContainerImage ¶
type ContainerNetwork ¶
type ContainerNetwork struct { ID string `json:"id"` Name string `json:"name"` Driver string `json:"driver"` IPv6 bool `json:"ipv6"` Internal bool `json:"internal"` Attachable bool `json:"attachable"` Ingress bool `json:"ingress"` Scope string `json:"scope"` CreatedAt time.Time `json:"created_at"` IPAM ContainerNetworkIPAM `json:"ipam"` Options []KV `json:"options"` Labels []KV `json:"labels"` }
type ContainerNetworkIPAM ¶
type ContainerNetworkIPAM struct { Driver string `json:"driver"` Options []KV `json:"options"` Config []ContainerNetworkIPAMConfig `json:"config"` }
ContainerNetworkIPAM represents IP Address Management
type ContainerNetworkIPAMConfig ¶
type ContainerNetworkIPAMConfig struct { Subnet string `json:"subnet"` IPRange string `json:"ip_range"` Gateway string `json:"gateway"` AuxAddress map[string]string `json:"aux_address"` }
ContainerNetworkIPAMConfig represents IPAM configurations
type ContainerPort ¶
type ContainerPort struct { ContainerStart uint `form:"container_start" json:"container_start"` ContainerEnd uint `form:"container_end" json:"container_end"` Host string `form:"host" json:"host"` HostStart uint `form:"host_start" json:"host_start"` HostEnd uint `form:"host_end" json:"host_end"` Protocol string `form:"protocol" json:"protocol"` }
type ContainerVolume ¶
type ContainerVolume struct { Name string `json:"name"` Driver string `json:"driver"` Scope string `json:"scope"` MountPoint string `json:"mount_point"` CreatedAt time.Time `json:"created_at"` Labels []KV `json:"labels"` Options []KV `json:"options"` RefCount int64 `json:"ref_count"` Size string `json:"size"` }
type CurrentInfo ¶
type CurrentInfo struct { Cpus []cpu.InfoStat `json:"cpus"` Percent float64 `json:"percent"` // 总使用率 Percents []float64 `json:"percents"` // 每个核心使用率 Load *load.AvgStat `json:"load"` Host *host.InfoStat `json:"host"` Mem *mem.VirtualMemoryStat `json:"mem"` Swap *mem.SwapMemoryStat `json:"swap"` Net []net.IOCountersStat `json:"net"` DiskIO []disk.IOCountersStat `json:"disk_io"` Disk []disk.PartitionStat `json:"disk"` DiskUsage []disk.UsageStat `json:"disk_usage"` Time time.Time `json:"time"` }
CurrentInfo 监控信息
type MonitorData ¶
type MySQLDatabase ¶
type PanelAppConfig ¶
type PanelConfig ¶
type PanelConfig struct { App PanelAppConfig `yaml:"app"` HTTP PanelHTTPConfig `yaml:"http"` Database PanelDatabaseConfig `yaml:"database"` }
PanelConfig 面板配置结构体
type PanelDatabaseConfig ¶
type PanelDatabaseConfig struct {
Debug bool `yaml:"debug"`
}
type PanelHTTPConfig ¶
type PostgresDatabase ¶
type PostgresUser ¶
type ProcessData ¶
type ProcessData struct { PID int32 `json:"pid"` Name string `json:"name"` PPID int32 `json:"ppid"` Username string `json:"username"` Status string `json:"status"` Background bool `json:"background"` StartTime string `json:"start_time"` NumThreads int32 `json:"num_threads"` CPU float64 `json:"cpu"` DiskRead uint64 `json:"disk_read"` DiskWrite uint64 `json:"disk_write"` CmdLine string `json:"cmd_line"` RSS uint64 `json:"rss"` VMS uint64 `json:"vms"` HWM uint64 `json:"hwm"` Data uint64 `json:"data"` Stack uint64 `json:"stack"` Locked uint64 `json:"locked"` Swap uint64 `json:"swap"` Envs []string `json:"envs"` OpenFiles []process.OpenFilesStat `json:"open_files"` Connections []net.ConnectionStat `json:"connections"` Nets []net.IOCountersStat `json:"nets"` }
type WebsiteListen ¶
type WebsiteListen struct { Address string `form:"address" json:"address" validate:"required"` // 监听地址 e.g. 80 0.0.0.0:80 [::]:80 HTTPS bool `form:"https" json:"https"` // 是否启用HTTPS QUIC bool `form:"quic" json:"quic"` // 是否启用QUIC }
WebsiteListen 网站监听配置
type WebsiteSetting ¶
type WebsiteSetting struct { ID uint `json:"id"` Name string `json:"name"` Listens []WebsiteListen `form:"listens" json:"listens" validate:"required"` Domains []string `json:"domains"` Path string `json:"path"` // 网站目录 Root string `json:"root"` // 运行目录 Index []string `json:"index"` PHP int `json:"php"` OpenBasedir bool `json:"open_basedir"` HTTPS bool `json:"https"` 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"` Rewrite string `json:"rewrite"` Raw string `json:"raw"` Log string `json:"log"` }
WebsiteSetting 网站设置
Source Files ¶
Click to show internal directories.
Click to hide internal directories.