server

package
v0.0.0-...-38067d3 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 91 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDeploymentInProgress = errors.New("deployment already in progress")

Functions

func NewSSE

func NewSSE(w http.ResponseWriter) (*sse, error)

func ParseFormAll

func ParseFormAll(r *http.Request) error

ParseFormAll parses both urlencoded and multipart form data. Use this instead of r.ParseForm() when handling POST requests that may come from fetch() with FormData (multipart/form-data).

func RegisterCloseHook

func RegisterCloseHook(hook CloseHook)

func RegisterInitHook

func RegisterInitHook(hook InitHook)

func RegisterInitSchemaHook

func RegisterInitSchemaHook(hook InitSchemaHook)

func RegisterMigrateHook

func RegisterMigrateHook(hook MigrateHook)

Types

type ACMEAccount

type ACMEAccount struct {
	ID           int64  `json:"id"`
	ProviderID   int64  `json:"provider_id"`
	ProviderName string `json:"provider_name"`
	AccountURL   string `json:"account_url"`
	Email        string `json:"email"`
	Status       string `json:"status"` // valid, deactivated, revoked
	KeyPem       string `json:"-"`      // Private key PEM (do not expose in JSON)
	Thumbprint   string `json:"thumbprint"`
	AgreedTerms  bool   `json:"agreed_terms"`
	CreatedAt    string `json:"created_at"`
	UpdatedAt    string `json:"updated_at"`
}

ACMEAccount represents an ACME account

type ACMEAuthorization

type ACMEAuthorization struct {
	ID         int64           `json:"id"`
	OrderID    int64           `json:"order_id"`
	AuthzURL   string          `json:"authz_url"`
	Status     string          `json:"status"` // pending, valid, invalid
	Identifier Identifier      `json:"identifier"`
	Expires    time.Time       `json:"expires"`
	Challenges []ACMEChallenge `json:"challenges"`
	CreatedAt  string          `json:"created_at"`
}

ACMEAuthorization represents an ACME authorization

type ACMEChallenge

type ACMEChallenge struct {
	ID              int64     `json:"id"`
	AuthorizationID int64     `json:"authorization_id"`
	ChallengeURL    string    `json:"challenge_url"`
	Type            string    `json:"type"`   // dns-01, http-01
	Status          string    `json:"status"` // pending, processing, valid, invalid
	Token           string    `json:"token"`
	KeyAuth         string    `json:"key_auth"`
	Validated       time.Time `json:"validated"`
	Error           string    `json:"error"`
	CreatedAt       string    `json:"created_at"`
}

ACMEChallenge represents an ACME challenge

type ACMEIssuance

type ACMEIssuance struct {
	ID            int64
	CertificateID int64
	AccountID     int64
	OrderID       int64
	Domains       string
	ChallengeType string
	DNSTarget     string
	Status        string
	Step          string
	Error         string
	CreatedAt     time.Time
	UpdatedAt     time.Time
}

type ACMEOrder

type ACMEOrder struct {
	ID        int64  `json:"id"`
	AccountID int64  `json:"account_id"`
	OrderURL  string `json:"order_url"`
	Domains   string `json:"domains"` // comma-separated domains
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
}

ACMEOrder represents an ACME order

type ACMEProvider

type ACMEProvider struct {
	ID           int64  `json:"id"`
	Name         string `json:"name"`          // e.g., "Let's Encrypt"
	DirectoryURL string `json:"directory_url"` // ACME directory URL
	CreatedAt    string `json:"created_at"`
	UpdatedAt    string `json:"updated_at"`
}

ACMEProvider represents an ACME certificate provider

type AboutInfo

type AboutInfo struct {
	ProgramName    string
	ProgramVersion string
	ProgramCommit  string
	ProgramDesc    string
	GoVersion      string
	BuildTime      string
	OS             string
	Arch           string
	Listen         string
	Database       string
	DockerMirror   string
	Uptime         string
	Credits        []CreditItem
}

type AllHostsStatsResponse

type AllHostsStatsResponse struct {
	Hosts []HostStats `json:"hosts"`
}

type AppInstallTask

type AppInstallTask struct {
	AppID  string
	Status string // idle, installing, completed, failed
	Logs   []string
	// contains filtered or unexported fields
}

AppInstallTask tracks the installation progress of an app

type AppStatus

type AppStatus struct {
	State     string `json:"state"` // not_installed, installing, installed, running, stopped
	Container string `json:"container,omitempty"`
}

AppStatus represents the runtime status of an app

type AppTemplate

type AppTemplate struct {
	ID                     string          `json:"id"`
	Name                   string          `json:"name"`
	Available              bool            `json:"available"`
	Exposable              bool            `json:"exposable"`
	DynamicConfig          bool            `json:"dynamic_config"`
	Port                   int             `json:"port"`
	PlatformVersion        int             `json:"platform_version"`
	Version                string          `json:"version"`
	Categories             []string        `json:"categories"`
	Description            string          `json:"description"`
	ShortDesc              string          `json:"short_desc"`
	Author                 string          `json:"author"`
	Source                 string          `json:"source"`
	FormFields             json.RawMessage `json:"form_fields"`
	SupportedArchitectures []string        `json:"supported_architectures"`
	CreatedAt              int64           `json:"created_at"`
	UpdatedAt              int64           `json:"updated_at"`
	ForcePull              bool            `json:"force_pull"`
	MinVersion             string          `json:"min_version"`
	Icon                   string          `json:"icon"`
	ComposeFile            string          `json:"-"`
}

AppTemplate represents an app template from the apps directory

type Certificate

type Certificate struct {
	ID            int64  `json:"id"`
	OrderID       int64  `json:"order_id"` // Associated ACME order ID
	Domains       string `json:"domains"`  // Comma-separated domains (for display and order creation)
	CSRPem        string `json:"csr_pem"`  // CSR in PEM format
	PrivateKeyPem string `json:"-"`        // Private key (do not expose)
	CertPem       string `json:"cert_pem"` // Issued certificate PEM
	Status        string `json:"status"`   // pending, processing, active, expired, revoked
	CreatedAt     string `json:"created_at"`
	UpdatedAt     string `json:"updated_at"`
}

Certificate represents a certificate (CSR + issued certificate)

func (*Certificate) DaysUntilExpiry

func (c *Certificate) DaysUntilExpiry() int

DaysUntilExpiry returns the number of days until the certificate expires

func (*Certificate) GetCommonName

func (c *Certificate) GetCommonName() string

GetCommonName extracts the common name from CSR or certificate

func (*Certificate) GetDNSNames

func (c *Certificate) GetDNSNames() []string

GetDNSNames extracts DNS names from CSR or certificate

func (*Certificate) IsExpired

func (c *Certificate) IsExpired() bool

IsExpired checks if the certificate is expired

type ClashServer

type ClashServer struct {
	ID          int64     `json:"id"`
	Name        string    `json:"name"`
	APIURL      string    `json:"api_url"`
	Secret      string    `json:"-"`      // Never serialize
	Status      string    `json:"status"` // active, inactive
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

ClashServer represents a Clash server configuration

func (*ClashServer) GetClashClient

func (cs *ClashServer) GetClashClient() *clashapi.Client

GetClashClient creates a Clash API client from server config

type CloseHook

type CloseHook func(*Server) error

type ComposeProject

type ComposeProject struct {
	Name        string    `json:"Name"`
	Status      string    `json:"Status"`
	ConfigFiles string    `json:"ConfigFiles"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

ComposeProjectMetadata stores project configuration

type ContainerStats

type ContainerStats struct {
	CPUPercent    float64 `json:"cpu_percent"`
	MemoryUsage   uint64  `json:"memory_usage"`
	MemoryLimit   uint64  `json:"memory_limit"`
	MemoryPercent float64 `json:"memory_percent"`
	NetworkRx     uint64  `json:"network_rx"`
	NetworkTx     uint64  `json:"network_tx"`
}

ContainerStats represents container statistics

type CreditItem

type CreditItem struct {
	Name    string
	URL     string
	License string
}

type CronJob

type CronJob struct {
	ID         int64      `json:"id"`
	Name       string     `json:"name"`
	Type       string     `json:"type"`     // once, cron
	Schedule   string     `json:"schedule"` // cron expression or ISO time for once
	Command    string     `json:"command"`
	WorkingDir string     `json:"working_dir"`
	Timeout    int        `json:"timeout"` // seconds, 0 = no timeout
	Enabled    bool       `json:"enabled"`
	LastRun    *time.Time `json:"last_run"`
	NextRun    *time.Time `json:"next_run"`
	CreatedAt  time.Time  `json:"created_at"`
	UpdatedAt  time.Time  `json:"updated_at"`
}

CronJob represents a scheduled task

func (*CronJob) GetCommand

func (j *CronJob) GetCommand() string

GetCommand implements cron.Job

func (*CronJob) GetID

func (j *CronJob) GetID() int64

GetID implements cron.Job

func (*CronJob) GetName

func (j *CronJob) GetName() string

GetName implements cron.Job

func (*CronJob) GetSchedule

func (j *CronJob) GetSchedule() string

GetSchedule implements cron.Job

func (*CronJob) GetTimeout

func (j *CronJob) GetTimeout() int

GetTimeout implements cron.Job

func (*CronJob) GetType

func (j *CronJob) GetType() string

GetType implements cron.Job

func (*CronJob) GetWorkingDir

func (j *CronJob) GetWorkingDir() string

GetWorkingDir implements cron.Job

func (*CronJob) IsEnabled

func (j *CronJob) IsEnabled() bool

IsEnabled implements cron.Job

type CronJobExecution

type CronJobExecution struct {
	ID          int64      `json:"id"`
	JobID       int64      `json:"job_id"`
	Status      string     `json:"status"` // running, success, failed, timeout
	Output      string     `json:"output"`
	Error       string     `json:"error"`
	ExitCode    int        `json:"exit_code"`
	StartedAt   time.Time  `json:"started_at"`
	CompletedAt *time.Time `json:"completed_at"`
	CreatedAt   time.Time  `json:"created_at"`
}

CronJobExecution represents a job execution record

type DHCPLease

type DHCPLease struct {
	ID        int64     `json:"id"`
	MAC       string    `json:"mac"`
	IP        string    `json:"ip"`
	Hostname  string    `json:"hostname"`
	State     string    `json:"state"`
	ExpiresAt time.Time `json:"expires_at"`
	LastSeen  time.Time `json:"last_seen"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type DHCPRuntime

type DHCPRuntime struct {
	// contains filtered or unexported fields
}

func (*DHCPRuntime) Start

func (r *DHCPRuntime) Start(s *Server, settings DHCPSettings) error

func (*DHCPRuntime) Status

func (r *DHCPRuntime) Status() DHCPRuntimeStatus

func (*DHCPRuntime) Stop

func (r *DHCPRuntime) Stop() error

type DHCPRuntimeStatus

type DHCPRuntimeStatus struct {
	Running    bool
	StartedAt  time.Time
	LastError  string
	ListenAddr string
	Requests   uint64
}

type DHCPSettings

type DHCPSettings struct {
	Enabled          bool      `json:"enabled"`
	ListenAddr       string    `json:"listen_addr"`
	ServerIP         string    `json:"server_ip"`
	SubnetMask       string    `json:"subnet_mask"`
	PoolStart        string    `json:"pool_start"`
	PoolEnd          string    `json:"pool_end"`
	Router           string    `json:"router"`
	DNSServers       string    `json:"dns_servers"`
	NTPServers       string    `json:"ntp_servers"`
	DomainName       string    `json:"domain_name"`
	BroadcastAddress string    `json:"broadcast_address"`
	LeaseSeconds     int       `json:"lease_seconds"`
	RenewalSeconds   int       `json:"renewal_seconds"`
	RebindingSeconds int       `json:"rebinding_seconds"`
	UpdatedAt        time.Time `json:"updated_at"`
}

type DHCPStaticLease

type DHCPStaticLease struct {
	ID          int64     `json:"id"`
	MAC         string    `json:"mac"`
	IP          string    `json:"ip"`
	Hostname    string    `json:"hostname"`
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

type DNSChallengeTarget

type DNSChallengeTarget struct {
	Value        string
	Label        string
	Kind         string
	ZoneName     string
	LocalZoneID  int64
	ProviderID   int64
	ProviderName string
	ZoneID       string
}

type DNSLocalRecord

type DNSLocalRecord struct {
	ID        int64     `json:"id"`
	ZoneID    int64     `json:"zone_id"`
	Name      string    `json:"name"`
	Type      string    `json:"type"`
	TTL       int       `json:"ttl"`
	Value     string    `json:"value"`
	Priority  int       `json:"priority"`
	Weight    int       `json:"weight"`
	Port      int       `json:"port"`
	Enabled   bool      `json:"enabled"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type DNSProvider

type DNSProvider struct {
	ID        int64     `json:"id"`
	Name      string    `json:"name"`
	Type      string    `json:"type"`   // cloudflare, dnspod, namecom
	Config    string    `json:"config"` // JSON encoded config
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

DNSProvider represents a connection to a hosted DNS provider.

type DNSRule

type DNSRule struct {
	ID        int64     `json:"id"`
	Rule      string    `json:"rule"`
	Enabled   bool      `json:"enabled"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type DNSRuntime

type DNSRuntime struct {
	// contains filtered or unexported fields
}

DNSRuntime owns the embedded dns-go pipeline and its network listeners.

func (*DNSRuntime) Close

func (r *DNSRuntime) Close() error

func (*DNSRuntime) Start

func (r *DNSRuntime) Start(cfg *dnsconfig.Config) error

func (*DNSRuntime) StartRefreshLoop

func (r *DNSRuntime) StartRefreshLoop(s *Server)

func (*DNSRuntime) Status

func (r *DNSRuntime) Status() DNSRuntimeStatus

func (*DNSRuntime) Stop

func (r *DNSRuntime) Stop() error

type DNSRuntimeStatus

type DNSRuntimeStatus struct {
	Running   bool
	StartedAt time.Time
	LastError string
	UDPAddr   string
	TCPAddr   string
	DoTAddr   string
	DoHAddr   string
}

type DNSSettings

type DNSSettings struct {
	Enabled      bool      `json:"enabled"`
	UDPAddr      string    `json:"udp_addr"`
	TCPAddr      string    `json:"tcp_addr"`
	DoTAddr      string    `json:"dot_addr"`
	DoHAddr      string    `json:"doh_addr"`
	CertFile     string    `json:"cert_file"`
	KeyFile      string    `json:"key_file"`
	CacheEnabled bool      `json:"cache_enabled"`
	CacheMinTTL  int       `json:"cache_min_ttl"`
	CacheMaxTTL  int       `json:"cache_max_ttl"`
	CacheEntries int       `json:"cache_entries"`
	Upstreams    string    `json:"upstreams"`
	UpdatedAt    time.Time `json:"updated_at"`
}

type DNSSubscription

type DNSSubscription struct {
	ID           int64      `json:"id"`
	Name         string     `json:"name"`
	Kind         string     `json:"kind"`
	URL          string     `json:"url"`
	Enabled      bool       `json:"enabled"`
	RefreshHours int        `json:"refresh_hours"`
	LocalPath    string     `json:"local_path"`
	LastUpdated  *time.Time `json:"last_updated"`
	LastError    string     `json:"last_error"`
	CreatedAt    time.Time  `json:"created_at"`
	UpdatedAt    time.Time  `json:"updated_at"`
}

type DNSZone

type DNSZone struct {
	ID          int64     `json:"id"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Enabled     bool      `json:"enabled"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

type Deployment

type Deployment struct {
	ID            int64            `json:"id"`
	ProjectID     int64            `json:"project_id"`
	Status        DeploymentStatus `json:"status"`
	DockerImage   string           `json:"docker_image"`
	Dockerfile    string           `json:"dockerfile"`
	ContainerName string           `json:"container_name"`
	ContainerID   string           `json:"container_id"`
	Command       string           `json:"command"`
	Port          int              `json:"port"`
	Commit        string           `json:"commit"`
	CommitMsg     string           `json:"commit_msg"`
	Author        string           `json:"author"`
	TriggeredBy   string           `json:"triggered_by"`
	StartedAt     *time.Time       `json:"started_at"`
	CompletedAt   *time.Time       `json:"completed_at"`
	CreatedAt     time.Time        `json:"created_at"`
	UpdatedAt     time.Time        `json:"updated_at"`
}

Deployment represents a deployment in the database

type DeploymentExecutor

type DeploymentExecutor struct {
	// contains filtered or unexported fields
}

DeploymentExecutor runs one checkout, build, and deploy pipeline.

func NewDeploymentExecutor

func NewDeploymentExecutor(server *Server, deployment *Deployment) *DeploymentExecutor

func (*DeploymentExecutor) Cancel

func (e *DeploymentExecutor) Cancel()

func (*DeploymentExecutor) Execute

func (e *DeploymentExecutor) Execute() error

Execute runs the deployment and owns all terminal status transitions.

type DeploymentLog

type DeploymentLog struct {
	ID           int64     `json:"id"`
	DeploymentID int64     `json:"deployment_id"`
	Message      string    `json:"message"`
	CreatedAt    time.Time `json:"created_at"`
}

DeploymentLog represents a log entry for a deployment

type DeploymentStatus

type DeploymentStatus string

DeploymentStatus represents the status of a deployment

const (
	DeploymentStatusPending   DeploymentStatus = "pending"
	DeploymentStatusRunning   DeploymentStatus = "running"
	DeploymentStatusCompleted DeploymentStatus = "completed"
	DeploymentStatusFailed    DeploymentStatus = "failed"
	DeploymentStatusCancelled DeploymentStatus = "cancelled"
)

type Disk

type Disk struct {
	Device     string              `json:"device"`
	ModelName  string              `json:"model_name"`
	Serial     string              `json:"serial"`
	SmartInfo  *smartctl.SmartInfo `json:"smart_info,omitempty"`
	SmartError string              `json:"smart_error,omitempty"`
	Healthy    bool                `json:"healthy"`
}

Disk represents a disk with SMART health information

func (*Disk) GetFormattedCapacity

func (d *Disk) GetFormattedCapacity() string

GetFormattedCapacity returns formatted capacity string

func (*Disk) GetFormattedTemperature

func (d *Disk) GetFormattedTemperature() string

GetFormattedTemperature returns formatted temperature string

func (*Disk) GetNVMeHealthInfo

func (d *Disk) GetNVMeHealthInfo() string

GetNVMeHealthInfo returns NVMe health information if available

func (*Disk) GetPowerOnHours

func (d *Disk) GetPowerOnHours() string

GetPowerOnHours returns formatted power-on hours string

func (*Disk) GetSCSIErrorLog

func (d *Disk) GetSCSIErrorLog() string

GetSCSIErrorLog returns SCSI error log summary

func (*Disk) GetSMARTAttributes

func (d *Disk) GetSMARTAttributes() []smartctl.ATASmartAttributesTableItem

GetSMARTAttributes returns ATA SMART attributes if available

type DiskInfo

type DiskInfo struct {
	Device     string  `json:"device"`
	MountPoint string  `json:"mount_point"`
	FSType     string  `json:"fs_type"`
	TotalGB    float64 `json:"total_gb"`
	UsedGB     float64 `json:"used_gb"`
	FreeGB     float64 `json:"free_gb"`
	UsePercent float64 `json:"use_percent"`
}

DiskInfo represents disk information

type DockerClient

type DockerClient struct {
	*client.Client
	// contains filtered or unexported fields
}

DockerClient wraps the official Docker SDK client

func NewDockerClient

func NewDockerClient(registryMirror string) (*DockerClient, error)

NewDockerClient creates a new Docker client

func (*DockerClient) BuildImage

func (d *DockerClient) BuildImage(name, dockerfile string) (<-chan string, error)

func (*DockerClient) BuildImageFromDir

func (d *DockerClient) BuildImageFromDir(name, buildDir string) (<-chan string, error)

BuildImageFromDir builds a Docker image from a directory containing a Dockerfile

func (*DockerClient) BuildImageFromDirContext

func (d *DockerClient) BuildImageFromDirContext(ctx context.Context, name, buildDir string, onLog func(string)) error

BuildImageFromDirContext builds an image synchronously, propagating both cancellation and errors from Docker's streamed build response.

func (*DockerClient) BuildImageFromRepo

func (d *DockerClient) BuildImageFromRepo(name, repoURL, branch string) (<-chan string, error)

BuildImageFromRepo clones a git repository and builds a Docker image from it

func (*DockerClient) CreateContainer

func (d *DockerClient) CreateContainer(imageName, containerName string, command []string) (string, error)

func (*DockerClient) CreateNetwork

func (d *DockerClient) CreateNetwork(name, driver, subnet, gateway, ipRange string) error

func (*DockerClient) CreateVolume

func (d *DockerClient) CreateVolume(name, driver string) error

func (*DockerClient) GetContainer

func (d *DockerClient) GetContainer(id string) (types.ContainerJSON, error)

func (*DockerClient) GetContainerLogs

func (d *DockerClient) GetContainerLogs(id string) (string, error)

GetContainerLogs retrieves logs for a container

func (*DockerClient) GetContainerStats

func (d *DockerClient) GetContainerStats(containerID string) (*ContainerStats, error)

GetContainerStats gets real-time statistics for a container

func (*DockerClient) ImageExists

func (d *DockerClient) ImageExists(name string) (bool, error)

func (*DockerClient) ListContainers

func (d *DockerClient) ListContainers() ([]types.Container, error)

func (*DockerClient) ListImages

func (d *DockerClient) ListImages() ([]image.Summary, error)

func (*DockerClient) ListNetworks

func (d *DockerClient) ListNetworks() ([]types.NetworkResource, error)

func (*DockerClient) ListVolumes

func (d *DockerClient) ListVolumes() (volume.ListResponse, error)

func (*DockerClient) PullImage

func (d *DockerClient) PullImage(name string) (<-chan string, error)

func (*DockerClient) PullImageSync

func (d *DockerClient) PullImageSync(name string) error

func (*DockerClient) RemoveContainer

func (d *DockerClient) RemoveContainer(name string) error

func (*DockerClient) RemoveImage

func (d *DockerClient) RemoveImage(imageId string) error

func (*DockerClient) RemoveNetwork

func (d *DockerClient) RemoveNetwork(id string) error

func (*DockerClient) RemoveVolume

func (d *DockerClient) RemoveVolume(name string) error

func (*DockerClient) RestartContainer

func (d *DockerClient) RestartContainer(name string) error

func (*DockerClient) StartContainer

func (d *DockerClient) StartContainer(name string) error

func (*DockerClient) StopContainer

func (d *DockerClient) StopContainer(name string) error

func (*DockerClient) StreamContainerLogs

func (d *DockerClient) StreamContainerLogs(id string) (<-chan string, error)

StreamContainerLogs streams logs for a container in real-time

type ESXiHost

type ESXiHost struct {
	Name        string  `json:"name"`
	ProductName string  `json:"product_name"`
	Version     string  `json:"version"`
	CPU         int32   `json:"cpu"` // Total CPUs
	CPUUsage    float64 `json:"cpu_usage"`
	Memory      int64   `json:"memory"` // Total memory in MB
	MemoryUsage int64   `json:"memory_usage"`
}

ESXiHost represents a VMware ESXi host

type ESXiServer

type ESXiServer struct {
	ID        int64  `json:"id"`
	Name      string `json:"name"`
	Host      string `json:"host"`
	Username  string `json:"username"`
	Password  string `json:"-"` // Do not expose in JSON
	Port      int    `json:"port"`
	Insecure  bool   `json:"insecure"` // Skip TLS verification
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
	// contains filtered or unexported fields
}

ESXiServer represents a VMware ESXi server

func (*ESXiServer) Connect

func (e *ESXiServer) Connect(ctx context.Context) error

Connect establishes connection to ESXi server

func (*ESXiServer) Disconnect

func (e *ESXiServer) Disconnect(ctx context.Context) error

Disconnect closes connection to ESXi server

func (*ESXiServer) GetClient

func (e *ESXiServer) GetClient() *govmomi.Client

GetClient returns the govmomi client

func (*ESXiServer) GetHosts

func (e *ESXiServer) GetHosts(ctx context.Context) ([]ESXiHost, error)

GetHosts retrieves all ESXi hosts

func (*ESXiServer) GetVMs

func (e *ESXiServer) GetVMs(ctx context.Context) ([]ESXiVM, error)

GetVMs retrieves all virtual machines from ESXi server

func (*ESXiServer) GetVimClient

func (e *ESXiServer) GetVimClient() *vim25.Client

GetVimClient returns the vim25 client

func (*ESXiServer) TestConnection

func (e *ESXiServer) TestConnection(ctx context.Context) error

TestConnection tests the connection to ESXi server

type ESXiVM

type ESXiVM struct {
	Name       string `json:"name"`
	GuestOS    string `json:"guest_os"`
	PowerState string `json:"power_state"`
	CPU        int32  `json:"cpu"`
	Memory     int64  `json:"memory"` // in MB
	IPAddress  string `json:"ip_address"`
	Host       string `json:"host"`
	Path       string `json:"path"`
}

ESXiVM represents a VMware virtual machine

type Error

type Error struct {
	Message string
}

Error is a simple error type with a message

func (*Error) Error

func (e *Error) Error() string

type FileInfo

type FileInfo struct {
	Name    string    `json:"name"`
	Path    string    `json:"path"`
	Size    int64     `json:"size"`
	Mode    string    `json:"mode"`
	ModTime time.Time `json:"mod_time"`
	IsDir   bool      `json:"is_dir"`
}

FileInfo represents file information

type H

type H map[string]any

type HostStats

type HostStats struct {
	Hostname string       `json:"hostname"`
	Stats    *SystemStats `json:"stats"`
}

type IDRACSensor

type IDRACSensor struct {
	Name         string
	Reading      float64
	ReadingUnits string
	State        string
	Health       string
}

IDRACSensor represents a hardware sensor

type IDRACServer

type IDRACServer struct {
	ID          int64     `json:"id"`
	Name        string    `json:"name"`
	Host        string    `json:"host"`
	Port        int       `json:"port"`
	Username    string    `json:"username"`
	Password    string    `json:"-"`       // Never serialize
	Version     string    `json:"version"` // iDRAC version (7, 8, 9, etc.)
	Status      string    `json:"status"`
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
	// contains filtered or unexported fields
}

IDRACServer represents a Dell iDRAC server

func (*IDRACServer) Connect

func (s *IDRACServer) Connect(ctx context.Context) error

Connect establishes connection to iDRAC

func (*IDRACServer) ControlPower

func (s *IDRACServer) ControlPower(ctx context.Context, action idrac.PowerState) error

ControlPower changes the power state of the system

func (*IDRACServer) Disconnect

func (s *IDRACServer) Disconnect(ctx context.Context) error

Disconnect closes connection to iDRAC

func (*IDRACServer) GetHardwareStatus

func (s *IDRACServer) GetHardwareStatus(ctx context.Context) ([]IDRACSensor, error)

GetHardwareStatus retrieves hardware health information

func (*IDRACServer) GetPowerState

func (s *IDRACServer) GetPowerState(ctx context.Context) (string, error)

GetPowerState retrieves the current power state

func (*IDRACServer) GetSystemInfo

func (s *IDRACServer) GetSystemInfo(ctx context.Context) (*IDRACSystemInfo, error)

GetSystemInfo retrieves system information from iDRAC

func (*IDRACServer) TestConnection

func (s *IDRACServer) TestConnection(ctx context.Context) error

TestConnection tests the connection to iDRAC

type IDRACSystemInfo

type IDRACSystemInfo struct {
	Model            string
	AssetTag         string
	SerialNumber     string
	HostName         string
	PowerState       string
	BiosVersion      string
	MemoryGiB        float64
	ProcessorCount   int
	ProcessorModel   string
	ProcessorThreads int
	Manufacturer     string
	Name             string
}

IDRACSystemInfo represents system information from iDRAC

type IPMIHost

type IPMIHost struct {
	DeviceID          uint8
	DeviceRevision    uint8
	FirmwareRevision  string
	ManufacturerID    string
	ProductID         uint16
	AuxFirmwareRev    string
	PowerState        string
	LastPowerEvent    string
	ChassisIntrusion  string
	FrontPanelLockout string
	DriveFault        string
	CoolingFault      string
}

IPMIHost represents host/bmc information

type IPMIServer

type IPMIServer struct {
	ID          int64     `json:"id"`
	Name        string    `json:"name"`
	BmcIP       string    `json:"bmc_ip"`
	Port        int       `json:"port"`
	Username    string    `json:"username"`
	Password    string    `json:"-"`      // Never serialize
	Status      string    `json:"status"` // active, inactive
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
	// contains filtered or unexported fields
}

IPMIServer represents an IPMI/BMC server

func (*IPMIServer) Connect

func (s *IPMIServer) Connect(ctx context.Context) error

Connect establishes connection to IPMI device

func (*IPMIServer) ControlPower

func (s *IPMIServer) ControlPower(ctx context.Context, action string) error

ControlPower controls the power state of the host

func (*IPMIServer) Disconnect

func (s *IPMIServer) Disconnect(ctx context.Context) error

Disconnect closes connection to IPMI device

func (*IPMIServer) GetFRUInfo

func (s *IPMIServer) GetFRUInfo(ctx context.Context) ([]*ipmi.FRU, error)

GetFRUInfo retrieves FRU (Field Replaceable Unit) information

func (*IPMIServer) GetHostInfo

func (s *IPMIServer) GetHostInfo(ctx context.Context) (*IPMIHost, error)

GetHostInfo retrieves host/BMC information

func (*IPMIServer) TestConnection

func (s *IPMIServer) TestConnection(ctx context.Context) error

TestConnection tests the connection to IPMI device

type Identifier

type Identifier struct {
	Type  string `json:"type"`  // dns
	Value string `json:"value"` // domain name
}

Identifier represents a domain identifier

type ImagePullResponseItem

type ImagePullResponseItem struct {
	Status   string `json:"status"`
	Error    string `json:"error"`
	Progress string `json:"progress"`
}

type InitHook

type InitHook func(*Server) error

type InitSchemaHook

type InitSchemaHook func(*Server) error

type MigrateHook

type MigrateHook func(*Server) error

type Monitor

type Monitor struct {
	ID             int64       `json:"id"`
	Name           string      `json:"name"`
	Type           MonitorType `json:"type"`
	Target         string      `json:"target"`
	Port           int         `json:"port"`
	Interval       int         `json:"interval"`        // seconds
	Timeout        int         `json:"timeout"`         // seconds
	ExpectedStatus int         `json:"expected_status"` // for HTTP checks
	Enabled        bool        `json:"enabled"`
	CreatedAt      time.Time   `json:"created_at"`
	UpdatedAt      time.Time   `json:"updated_at"`
}

Monitor represents a remote target to monitor

type MonitorCheck

type MonitorCheck struct {
	ID           int64     `json:"id"`
	MonitorID    int64     `json:"monitor_id"`
	Status       string    `json:"status"`        // up, down
	ResponseTime int64     `json:"response_time"` // ms
	StatusCode   int       `json:"status_code"`
	Message      string    `json:"message"`
	CheckedAt    time.Time `json:"checked_at"`
}

MonitorCheck represents the result of a single check

type MonitorCheckRequest

type MonitorCheckRequest struct {
	MonitorID int64 `json:"monitor_id"`
}

MonitorCheckRequest is used to manually trigger a check

type MonitorType

type MonitorType string

MonitorType represents the type of uptime check

const (
	MonitorTypePing MonitorType = "ping"
	MonitorTypeTCP  MonitorType = "tcp"
	MonitorTypeHTTP MonitorType = "http"
)

type MonitorWithStatus

type MonitorWithStatus struct {
	Monitor
	LastCheck *MonitorCheck `json:"last_check"`
	UptimePct float64       `json:"uptime_pct"`
}

MonitorWithStatus includes the latest check result

type NTPRuntime

type NTPRuntime struct {
	// contains filtered or unexported fields
}

func (*NTPRuntime) Start

func (r *NTPRuntime) Start(settings NTPSettings) error

func (*NTPRuntime) Status

func (r *NTPRuntime) Status() NTPRuntimeStatus

func (*NTPRuntime) Stop

func (r *NTPRuntime) Stop() error

type NTPRuntimeStatus

type NTPRuntimeStatus struct {
	Running    bool
	StartedAt  time.Time
	LastError  string
	ListenAddr string
	Requests   uint64
}

type NTPSettings

type NTPSettings struct {
	Enabled     bool      `json:"enabled"`
	ListenAddr  string    `json:"listen_addr"`
	Stratum     int       `json:"stratum"`
	ReferenceID string    `json:"reference_id"`
	UpdatedAt   time.Time `json:"updated_at"`
}

type OpenWrtDHCPLease

type OpenWrtDHCPLease struct {
	IPAddress  string
	MACAddress string
	Hostname   string
	Expires    int
	IPv6       bool
	DUID       string
}

OpenWrtDHCPLease represents a DHCP lease

type OpenWrtFirewallRule

type OpenWrtFirewallRule struct {
	Name     string
	Src      string
	Dest     string
	DestPort string
	Proto    string
	Target   string
	Enabled  bool
}

OpenWrtFirewallRule represents a firewall rule

type OpenWrtFirewallZone

type OpenWrtFirewallZone struct {
	Name    string
	Network []string
	Input   string
	Output  string
	Forward string
	Masq    bool
}

OpenWrtFirewallZone represents a firewall zone

type OpenWrtInterface

type OpenWrtInterface struct {
	Interface  string
	Device     string
	L3Device   string
	Proto      string
	IPAddr     string
	Netmask    string
	IP6Addr    string
	Gateway    string
	Gateway6   string
	DNS        []string
	Up         bool
	Auto       bool
	Available  bool
	Uptime     int
	Metric     int
	PTPAddress string
}

OpenWrtInterface represents a network interface

type OpenWrtPackage

type OpenWrtPackage struct {
	Name        string
	Version     string
	Description string
	Size        int
	Installed   bool
}

OpenWrtPackage represents a package

type OpenWrtPortForward

type OpenWrtPortForward struct {
	Name     string
	Src      string
	SrcDport string
	DestIP   string
	DestPort string
	Proto    string
	Enabled  bool
}

OpenWrtPortForward represents a port forwarding rule

type OpenWrtServer

type OpenWrtServer struct {
	ID          int64     `json:"id"`
	Name        string    `json:"name"`
	Host        string    `json:"host"`
	Port        int       `json:"port"`
	Username    string    `json:"username"`
	Password    string    `json:"-"`
	Protocol    string    `json:"protocol"` // http or https
	Status      string    `json:"status"`
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
	// contains filtered or unexported fields
}

OpenWrtServer represents an OpenWrt router

func (*OpenWrtServer) Connect

func (s *OpenWrtServer) Connect(ctx context.Context) error

Connect establishes connection to OpenWrt router

func (*OpenWrtServer) Disconnect

func (s *OpenWrtServer) Disconnect(ctx context.Context) error

Disconnect closes connection to OpenWrt router

func (*OpenWrtServer) GetDHCPLeases

func (s *OpenWrtServer) GetDHCPLeases(ctx context.Context) ([]openwrt.DHCPLease, error)

GetDHCPLeases retrieves DHCP leases

func (*OpenWrtServer) GetFirewallRules

func (s *OpenWrtServer) GetFirewallRules(ctx context.Context) ([]OpenWrtFirewallRule, error)

GetFirewallRules retrieves firewall rules

func (*OpenWrtServer) GetFirewallZones

func (s *OpenWrtServer) GetFirewallZones(ctx context.Context) ([]OpenWrtFirewallZone, error)

GetFirewallZones retrieves firewall zones

func (*OpenWrtServer) GetInterfaces

func (s *OpenWrtServer) GetInterfaces(ctx context.Context) ([]openwrt.NetworkInterface, error)

GetInterfaces retrieves network interfaces

func (*OpenWrtServer) GetPackages

func (s *OpenWrtServer) GetPackages(ctx context.Context) ([]OpenWrtPackage, error)

GetPackages retrieves package list

func (*OpenWrtServer) GetPortForwards

func (s *OpenWrtServer) GetPortForwards(ctx context.Context) ([]OpenWrtPortForward, error)

GetPortForwards retrieves port forwarding rules

func (*OpenWrtServer) GetServices

func (s *OpenWrtServer) GetServices(ctx context.Context) ([]OpenWrtService, error)

GetServices retrieves service status

func (*OpenWrtServer) GetSystemInfo

func (s *OpenWrtServer) GetSystemInfo(ctx context.Context) (*openwrt.SystemInfo, error)

GetSystemInfo retrieves system information from OpenWrt

func (*OpenWrtServer) GetWiFiConfig

func (s *OpenWrtServer) GetWiFiConfig(ctx context.Context) ([]OpenWrtWiFi, error)

GetWiFiConfig retrieves WiFi configuration

func (*OpenWrtServer) Reboot

func (s *OpenWrtServer) Reboot(ctx context.Context) error

Reboot reboots the OpenWrt router

func (*OpenWrtServer) RestartService

func (s *OpenWrtServer) RestartService(ctx context.Context, name string) error

RestartService restarts a service

func (*OpenWrtServer) TestConnection

func (s *OpenWrtServer) TestConnection(ctx context.Context) error

TestConnection tests the connection to OpenWrt

type OpenWrtService

type OpenWrtService struct {
	Name      string
	Running   bool
	Enabled   bool
	Instances map[string]OpenWrtServiceInstance
	Triggers  []interface{}
}

OpenWrtService represents a service

type OpenWrtServiceInstance

type OpenWrtServiceInstance struct {
	Running   bool
	PID       int
	Command   string
	Arguments []string
	Terminal  bool
	Exited    bool
}

OpenWrtServiceInstance represents a running service instance

type OpenWrtSystemInfo

type OpenWrtSystemInfo struct {
	Uptime        int
	LoadAvg       []int
	MemoryTotal   uint64
	MemoryFree    uint64
	MemoryAvail   uint64
	MemoryCached  uint64
	RootTotal     uint64
	RootUsed      uint64
	RootFree      uint64
	TmpTotal      uint64
	TmpUsed       uint64
	TmpFree       uint64
	SwapTotal     uint64
	SwapFree      uint64
	Hostname      string
	KernelVersion string
	Release       string
}

OpenWrtSystemInfo represents system information from OpenWrt

type OpenWrtWiFi

type OpenWrtWiFi struct {
	Device     string
	SSID       string
	Encryption string
	Mode       string
	Channel    int
	Disabled   bool
}

OpenWrtWiFi represents WiFi configuration

type PVEServer

type PVEServer struct {
	ID        int64  `json:"id"`
	Name      string `json:"name"`
	Host      string `json:"host"`
	Port      int    `json:"port"`
	Username  string `json:"username"`
	Password  string `json:"-"`
	Insecure  bool   `json:"insecure"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
	// contains filtered or unexported fields
}

PVEServer represents a Proxmox VE server connection

func (*PVEServer) CloneVM

func (p *PVEServer) CloneVM(node string, vmid int, params pve.CloneVMParams) (string, error)

func (*PVEServer) Connect

func (p *PVEServer) Connect() error

func (*PVEServer) Disconnect

func (p *PVEServer) Disconnect() error

func (*PVEServer) GetNextVMID

func (p *PVEServer) GetNextVMID() (int, error)

func (*PVEServer) GetNodes

func (p *PVEServer) GetNodes() ([]pve.NodeInfo, error)

func (*PVEServer) GetTemplates

func (p *PVEServer) GetTemplates(node string) ([]pve.VMInfo, error)

func (*PVEServer) GetVMConfig

func (p *PVEServer) GetVMConfig(node string, vmid int) (map[string]interface{}, error)

func (*PVEServer) GetVMs

func (p *PVEServer) GetVMs(node string) ([]pve.VMInfo, error)

func (*PVEServer) ResizeDiskVM

func (p *PVEServer) ResizeDiskVM(node string, vmid int, disk string, addGB int) error

func (*PVEServer) StartVM

func (p *PVEServer) StartVM(node string, vmid int) error

func (*PVEServer) TestConnection

func (p *PVEServer) TestConnection() error

func (*PVEServer) UpdateVMConfig

func (p *PVEServer) UpdateVMConfig(node string, vmid int, params map[string]string) error

type Project

type Project struct {
	ID            int64     `json:"id"`
	Name          string    `json:"name"`
	Description   string    `json:"description"`
	Repo          string    `json:"repo"`
	WebhookSecret string    `json:"-"`
	WebhookBranch string    `json:"webhook_branch"`
	CreatedAt     time.Time `json:"created_at"`
	UpdatedAt     time.Time `json:"updated_at"`
}

Project represents a project in the database

type ProjectRuntimeStatus

type ProjectRuntimeStatus struct {
	Status        string // running, stopped, error, not_deployed
	ContainerID   string
	ContainerName string
	IsRunning     bool
	Error         string
}

ProjectRuntimeStatus represents the runtime status of a project

type SSHClient

type SSHClient struct {
	ObservedHostKey string
	// contains filtered or unexported fields
}

SSHClient wraps an SSH client connection

func ConnectSSH

func ConnectSSH(server *SSHServer) (*SSHClient, error)

ConnectSSH connects to an SSH server

func (*SSHClient) Close

func (c *SSHClient) Close() error

Close closes the SSH connection

func (*SSHClient) NewSession

func (c *SSHClient) NewSession() error

NewSession creates a new SSH session

func (*SSHClient) StartShell

func (c *SSHClient) StartShell(stdin io.Reader, stdout, stderr io.Writer) error

StartShell starts an interactive shell

type SSHServer

type SSHServer struct {
	ID          int64     `json:"id"`
	Name        string    `json:"name"`
	Host        string    `json:"host"`
	Port        int       `json:"port"`
	Username    string    `json:"username"`
	AuthType    string    `json:"auth_type"` // "password" or "key"
	Password    string    `json:"-"`         // Never serialize
	PrivateKey  string    `json:"-"`         // Never serialize
	HostKey     string    `json:"host_key"`
	Description string    `json:"description"`
	Enabled     bool      `json:"enabled"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

SSHServer represents a remote SSH server

type SSHStatsResponse

type SSHStatsResponse struct {
	Connected     bool      `json:"connected"`
	ConnectedAt   time.Time `json:"connected_at,omitempty"`
	ClientCount   int       `json:"client_count"`
	CPUPercent    float64   `json:"cpu_percent"`
	MemoryPercent float64   `json:"memory_percent"`
	MemoryUsage   uint64    `json:"memory_usage"`
	MemoryTotal   uint64    `json:"memory_total"`
	NetworkRX     uint64    `json:"network_rx"`
	NetworkTX     uint64    `json:"network_tx"`
	LoadAverage   []float64 `json:"load_average"`
}

SSHStatsResponse represents the combined status and stats response

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(cfg *config.Config) (server *Server, err error)

func (*Server) ACMEAccountDeleteHandler

func (s *Server) ACMEAccountDeleteHandler(w http.ResponseWriter, r *http.Request)

ACMEAccountDeleteHandler handles deleting an account

func (*Server) ACMEAccountsView

func (s *Server) ACMEAccountsView(w http.ResponseWriter, r *http.Request)

ACMEAccountsView handles the ACME accounts list page for a provider

func (*Server) ACMECertificateNewHandler

func (s *Server) ACMECertificateNewHandler(w http.ResponseWriter, r *http.Request)

func (*Server) ACMEChallengeComplete

func (s *Server) ACMEChallengeComplete(w http.ResponseWriter, r *http.Request)

ACMEChallengeComplete handles completing a challenge

func (*Server) ACMEIssuanceView

func (s *Server) ACMEIssuanceView(w http.ResponseWriter, r *http.Request)

func (*Server) ACMEOrderCreate

func (s *Server) ACMEOrderCreate(w http.ResponseWriter, r *http.Request)

ACMEOrderCreate handles creating a new order

func (*Server) ACMEOrderDetailHandler

func (s *Server) ACMEOrderDetailHandler(w http.ResponseWriter, r *http.Request)

ACMEOrderDetailHandler handles the order detail page

func (*Server) ACMEOrderFinalize

func (s *Server) ACMEOrderFinalize(w http.ResponseWriter, r *http.Request)

ACMEOrderFinalize handles finalizing an order with CSR

func (*Server) ACMEOrderNewView

func (s *Server) ACMEOrderNewView(w http.ResponseWriter, r *http.Request)

ACMEOrderNewView handles creating a new order

func (*Server) ACMEOrdersView

func (s *Server) ACMEOrdersView(w http.ResponseWriter, r *http.Request)

ACMEOrdersView handles the ACME orders list page for an account

func (*Server) ACMEProviderCreate

func (s *Server) ACMEProviderCreate(w http.ResponseWriter, r *http.Request)

ACMEProviderCreate handles creating a new provider

func (*Server) ACMEProviderDeleteHandler

func (s *Server) ACMEProviderDeleteHandler(w http.ResponseWriter, r *http.Request)

ACMEProviderDeleteHandler handles deleting a provider

func (*Server) ACMEProviderNewView

func (s *Server) ACMEProviderNewView(w http.ResponseWriter, r *http.Request)

ACMEProviderNewView handles the new provider page

func (*Server) ACMEProvidersView

func (s *Server) ACMEProvidersView(w http.ResponseWriter, r *http.Request)

ACMEProvidersView handles the ACME providers list page

func (*Server) ACMERegisterView

func (s *Server) ACMERegisterView(w http.ResponseWriter, r *http.Request)

ACMEAccountNewView handles the new account page

func (*Server) AboutView

func (s *Server) AboutView(w http.ResponseWriter, r *http.Request)

func (*Server) AddDeploymentLog

func (s *Server) AddDeploymentLog(deploymentID int64, message string) error

AddDeploymentLog adds a log entry to a deployment

func (*Server) AllHostsStatsHandler

func (s *Server) AllHostsStatsHandler(w http.ResponseWriter, r *http.Request)

func (*Server) AppAPIHandler

func (s *Server) AppAPIHandler(w http.ResponseWriter, r *http.Request)

AppAPIHandler returns JSON list of apps

func (*Server) AppActionHandler

func (s *Server) AppActionHandler(w http.ResponseWriter, r *http.Request)

AppActionHandler handles start/stop/restart/uninstall actions

func (*Server) AppDetailView

func (s *Server) AppDetailView(w http.ResponseWriter, r *http.Request)

AppDetailView renders app detail page

func (*Server) AppIconHandler

func (s *Server) AppIconHandler(w http.ResponseWriter, r *http.Request)

AppIconHandler serves app icons

func (*Server) AppInstallTriggerHandler

func (s *Server) AppInstallTriggerHandler(w http.ResponseWriter, r *http.Request)

AppInstallTriggerHandler triggers installation and streams progress via SSE. POST: trigger new install with form data, then stream logs. GET: reconnect to an in-progress install and stream logs.

func (*Server) AppLogsHandler

func (s *Server) AppLogsHandler(w http.ResponseWriter, r *http.Request)

AppLogsHandler streams app logs via SSE

func (*Server) AppsSyncHandler

func (s *Server) AppsSyncHandler(w http.ResponseWriter, r *http.Request)

AppsSyncHandler updates the app catalog from its upstream repository.

func (*Server) AppsView

func (s *Server) AppsView(w http.ResponseWriter, r *http.Request)

AppsView renders the app store list page

func (*Server) AuthMiddleware

func (s *Server) AuthMiddleware(next http.HandlerFunc) http.HandlerFunc

AuthMiddleware wraps a handler with access-key authentication. If accessKey is empty, auth is skipped.

func (*Server) BuildImage

func (s *Server) BuildImage(w http.ResponseWriter, r *http.Request)

func (*Server) CancelDeploymentHandler

func (s *Server) CancelDeploymentHandler(w http.ResponseWriter, r *http.Request)

CancelDeploymentHandler handles deployment cancellation

func (*Server) CertificateDetailView

func (s *Server) CertificateDetailView(w http.ResponseWriter, r *http.Request)

func (*Server) CertificateDownloadHandler

func (s *Server) CertificateDownloadHandler(w http.ResponseWriter, r *http.Request)

func (*Server) CertificatesView

func (s *Server) CertificatesView(w http.ResponseWriter, r *http.Request)

func (*Server) ClashConfigHandler

func (s *Server) ClashConfigHandler(w http.ResponseWriter, r *http.Request)

ClashSettingsSaveHandler handles saving settings

func (*Server) ClashConnectionsView

func (s *Server) ClashConnectionsView(w http.ResponseWriter, r *http.Request)

ClashConnectionsView renders the connections page

func (*Server) ClashDetailHandler

func (s *Server) ClashDetailHandler(w http.ResponseWriter, r *http.Request)

ClashDetailHandler handles viewing/deleting a Clash server

func (*Server) ClashEditHandler

func (s *Server) ClashEditHandler(w http.ResponseWriter, r *http.Request)

ClashEditHandler handles editing a Clash server

func (*Server) ClashIndexView

func (s *Server) ClashIndexView(w http.ResponseWriter, r *http.Request)

ClashIndexView renders the Clash server list page

func (*Server) ClashNewHandler

func (s *Server) ClashNewHandler(w http.ResponseWriter, r *http.Request)

ClashNewHandler handles creating a new Clash server

func (*Server) ClashProxiesView

func (s *Server) ClashProxiesView(w http.ResponseWriter, r *http.Request)

ClashProxiesView renders the proxies page

func (*Server) ClashProxyActionHandler

func (s *Server) ClashProxyActionHandler(w http.ResponseWriter, r *http.Request)

ClashProxyActionHandler handles proxy actions (switch, delay test, mode change)

func (*Server) ClashRulesView

func (s *Server) ClashRulesView(w http.ResponseWriter, r *http.Request)

ClashRulesView renders the rules page

func (*Server) ClashStreamSSE

func (s *Server) ClashStreamSSE(w http.ResponseWriter, r *http.Request)

ClashStreamSSE handles SSE connection for real-time clash data. Connects to Clash /connections WebSocket for connections + totals. Also connects to /traffic WebSocket for real-time speed. When /connections data arrives, sends both traffic and connections events.

func (*Server) ClashTestConnectionHandler

func (s *Server) ClashTestConnectionHandler(w http.ResponseWriter, r *http.Request)

ClashTestConnectionHandler tests the connection to a Clash server

func (*Server) CleanupOldMonitorChecks

func (s *Server) CleanupOldMonitorChecks(days int) error

CleanupOldMonitorChecks removes checks older than retention period

func (*Server) Close

func (s *Server) Close() error

Close closes the database connection and stops all listeners

func (*Server) CollectStats

func (s *Server) CollectStats() (*SystemStats, error)

func (*Server) ComposeActionHandler

func (s *Server) ComposeActionHandler(w http.ResponseWriter, r *http.Request)

ComposeActionHandler handles compose actions (up, down, restart, logs)

func (*Server) ComposeDetailView

func (s *Server) ComposeDetailView(w http.ResponseWriter, r *http.Request)

ComposeDetailView shows detail for a specific compose project

func (*Server) ComposeDown

func (s *Server) ComposeDown(configFile string) error

func (*Server) ComposeNewHandler

func (s *Server) ComposeNewHandler(w http.ResponseWriter, r *http.Request)

ComposeNewHandler shows the new compose form and handles creation

func (*Server) ComposePull

func (s *Server) ComposePull(configFile string) error

func (*Server) ComposeRestart

func (s *Server) ComposeRestart(configFile string) error

func (*Server) ComposeUp

func (s *Server) ComposeUp(configFile string) error

func (*Server) ComposeUpSSEHandler

func (s *Server) ComposeUpSSEHandler(w http.ResponseWriter, r *http.Request)

Compose Up handler with SSE log streaming

func (*Server) ComposeView

func (s *Server) ComposeView(w http.ResponseWriter, r *http.Request)

ComposeView lists all compose projects

func (*Server) ContainerActionHandler

func (s *Server) ContainerActionHandler(w http.ResponseWriter, r *http.Request)

ContainerActionHandler handles container actions (GET for detail, PUT for actions)

func (*Server) ContainerDetailView

func (s *Server) ContainerDetailView(w http.ResponseWriter, r *http.Request)

ContainerDetailView handles container detail page

func (*Server) ContainerLogsHandler

func (s *Server) ContainerLogsHandler(w http.ResponseWriter, r *http.Request)

ContainerLogsHandler handles container logs API with SSE streaming

func (*Server) ContainerStatsHandler

func (s *Server) ContainerStatsHandler(w http.ResponseWriter, r *http.Request)

ContainerStatsHandler handles container stats API

func (*Server) ContainerTerminal

func (s *Server) ContainerTerminal(w http.ResponseWriter, r *http.Request)

ContainerTerminal bridges a Docker exec session through the terminal module.

func (*Server) ContainerTerminalView

func (s *Server) ContainerTerminalView(w http.ResponseWriter, r *http.Request)

ContainerTerminalView renders the shared terminal UI for a container.

func (*Server) ContainerView

func (s *Server) ContainerView(w http.ResponseWriter, r *http.Request)

func (*Server) CreateACMEAccount

func (s *Server) CreateACMEAccount(providerID int64, accountURL, email, keyPem, thumbprint string, agreedTerms bool) (*ACMEAccount, error)

CreateACMEAccount creates a new ACME account

func (*Server) CreateACMEAuthorization

func (s *Server) CreateACMEAuthorization(orderID int64, authzURL, status, identifierType, identifierValue string, expires time.Time) (*ACMEAuthorization, error)

CreateACMEAuthorization creates a new ACME authorization

func (*Server) CreateACMEChallenge

func (s *Server) CreateACMEChallenge(authzID int64, challengeURL, challengeType, status, token, keyAuth string) (*ACMEChallenge, error)

CreateACMEChallenge creates a new ACME challenge

func (*Server) CreateACMEOrder

func (s *Server) CreateACMEOrder(accountID int64, orderURL, domains string) (*ACMEOrder, error)

CreateACMEOrder creates a new ACME order

func (*Server) CreateCSRView

func (s *Server) CreateCSRView(w http.ResponseWriter, r *http.Request)

func (*Server) CreateCertificate

func (s *Server) CreateCertificate(domains, csrPem, privateKeyPem string) (*Certificate, error)

CreateCertificate creates a new certificate (CSR) record

func (*Server) CreateClashServer

func (s *Server) CreateClashServer(name, apiURL, secret, description string) (*ClashServer, error)

CreateClashServer creates a new Clash server

func (*Server) CreateContainer

func (s *Server) CreateContainer(w http.ResponseWriter, r *http.Request)

func (*Server) CreateCronJob

func (s *Server) CreateCronJob(name, jobType, schedule, command, workingDir string, timeout int) (*CronJob, error)

CreateCronJob creates a new cron job

func (*Server) CreateCronJobExecution

func (s *Server) CreateCronJobExecution(jobID int64) (*CronJobExecution, error)

CreateCronJobExecution creates a new execution record

func (*Server) CreateDNSProvider

func (s *Server) CreateDNSProvider(name, providerType, config string) (*DNSProvider, error)

CreateDNSProvider creates a new DNS provider

func (*Server) CreateDNSZone

func (s *Server) CreateDNSZone(name, description string, enabled bool) (*DNSZone, error)

func (*Server) CreateDeployment

func (s *Server) CreateDeployment(projectID int64, dockerImage, dockerfile, containerName, command, commit, commitMsg, author, triggeredBy string) (*Deployment, error)

CreateDeployment creates a new deployment

func (*Server) CreateESXiServer

func (s *Server) CreateESXiServer(name, host, username, password string, port int, insecure bool) (*ESXiServer, error)

CreateESXiServer creates a new ESXi server

func (*Server) CreateGitHubDeployment

func (s *Server) CreateGitHubDeployment(projectID int64, commit, commitMsg, author, deliveryID string) (*Deployment, error)

func (*Server) CreateIDRACServer

func (s *Server) CreateIDRACServer(name, host, username, password, version, description string, port int) (*IDRACServer, error)

CreateIDRACServer creates a new iDRAC server

func (*Server) CreateIPMIServer

func (s *Server) CreateIPMIServer(name, bmcIP, username, password, description string, port int) (*IPMIServer, error)

CreateIPMIServer creates a new IPMI server

func (*Server) CreateMonitor

func (s *Server) CreateMonitor(m *Monitor) (*Monitor, error)

CreateMonitor creates a new monitor

func (*Server) CreateNetwork

func (s *Server) CreateNetwork(w http.ResponseWriter, r *http.Request)

func (*Server) CreateOpenWrtServer

func (s *Server) CreateOpenWrtServer(name, host, username, password, protocol, description string, port int) (*OpenWrtServer, error)

CreateOpenWrtServer creates a new OpenWrt server

func (*Server) CreatePVEServer

func (s *Server) CreatePVEServer(name, host, username, password string, port int, insecure bool) (*PVEServer, error)

func (*Server) CreateProject

func (s *Server) CreateProject(name, description, repo string) (*Project, error)

CreateProject creates a new project in the database

func (*Server) CreateSSH

func (s *Server) CreateSSH(server *SSHServer) (int64, error)

CreateSSH creates a new SSH server

func (*Server) CreateSetting

func (s *Server) CreateSetting(name, settingType, value, description string) (*Setting, error)

CreateSetting creates a new setting

func (*Server) CreateSpeedtestResult

func (s *Server) CreateSpeedtestResult(result *SpeedtestResult) error

func (*Server) CreateTCPListener

func (s *Server) CreateTCPListener(name, protocol string, listenPort int, forwardHost string, forwardPort int) (*TCPListener, error)

CreateTCPListener creates a new TCP/UDP listener

func (*Server) CreateVolume

func (s *Server) CreateVolume(w http.ResponseWriter, r *http.Request)

func (*Server) CreateWebHost

func (s *Server) CreateWebHost(host *WebHost) (int64, error)

func (*Server) CreateWebListener

func (s *Server) CreateWebListener(listener *WebListener) (int64, error)

func (*Server) CreateWebPolicy

func (s *Server) CreateWebPolicy(policy *WebPolicy) (int64, error)

func (*Server) CreateWebRoute

func (s *Server) CreateWebRoute(route *WebRoute) (int64, error)

func (*Server) CreateWidget

func (s *Server) CreateWidget(name, widgetType, config string, sortOrder int, enabled bool) (*Widget, error)

func (*Server) CreateYeelightDevice

func (s *Server) CreateYeelightDevice(name, host string, port int) (*YeelightDevice, error)

CreateYeelightDevice creates a new Yeelight device

func (*Server) CronJobDeleteHandler

func (s *Server) CronJobDeleteHandler(w http.ResponseWriter, r *http.Request)

CronJobDeleteHandler handles deleting a cron job

func (*Server) CronJobDetailHandler

func (s *Server) CronJobDetailHandler(w http.ResponseWriter, r *http.Request)

CronJobDetailHandler handles the cron job detail page

func (*Server) CronJobEditHandler

func (s *Server) CronJobEditHandler(w http.ResponseWriter, r *http.Request)

CronJobEditHandler handles editing a cron job

func (*Server) CronJobNewHandler

func (s *Server) CronJobNewHandler(w http.ResponseWriter, r *http.Request)

CronJobNewHandler handles creating a new cron job

func (*Server) CronJobRunNowHandler

func (s *Server) CronJobRunNowHandler(w http.ResponseWriter, r *http.Request)

CronJobRunNowHandler handles running a job immediately

func (*Server) CronJobToggleHandler

func (s *Server) CronJobToggleHandler(w http.ResponseWriter, r *http.Request)

CronJobToggleHandler handles enabling/disabling a cron job

func (*Server) CronJobView

func (s *Server) CronJobView(w http.ResponseWriter, r *http.Request)

CronJobView handles the cron job list page

func (*Server) CurrentStatsHandler

func (s *Server) CurrentStatsHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DHCPActionHandler

func (s *Server) DHCPActionHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DHCPLeaseDeleteHandler

func (s *Server) DHCPLeaseDeleteHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DHCPLeaseListView

func (s *Server) DHCPLeaseListView(w http.ResponseWriter, r *http.Request)

func (*Server) DHCPSettingsHandler

func (s *Server) DHCPSettingsHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DHCPStaticLeaseDetailHandler

func (s *Server) DHCPStaticLeaseDetailHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DHCPStaticLeaseEditHandler

func (s *Server) DHCPStaticLeaseEditHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DHCPStaticLeaseListView

func (s *Server) DHCPStaticLeaseListView(w http.ResponseWriter, r *http.Request)

func (*Server) DHCPStaticLeaseNewHandler

func (s *Server) DHCPStaticLeaseNewHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DHCPView

func (s *Server) DHCPView(w http.ResponseWriter, r *http.Request)

func (*Server) DNSActionHandler

func (s *Server) DNSActionHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DNSChallengeTargets

func (s *Server) DNSChallengeTargets() ([]DNSChallengeTarget, []string, error)

func (*Server) DNSFiltersView

func (s *Server) DNSFiltersView(w http.ResponseWriter, r *http.Request)

func (*Server) DNSProviderHandler

func (s *Server) DNSProviderHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DNSProviderNewHandler

func (s *Server) DNSProviderNewHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DNSProviderZoneHandler

func (s *Server) DNSProviderZoneHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DNSProvidersView

func (s *Server) DNSProvidersView(w http.ResponseWriter, r *http.Request)

func (*Server) DNSRecordDeleteHandler

func (s *Server) DNSRecordDeleteHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DNSRecordEditHandler

func (s *Server) DNSRecordEditHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DNSRecordNewHandler

func (s *Server) DNSRecordNewHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DNSRuleActionHandler

func (s *Server) DNSRuleActionHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DNSRuleNewHandler

func (s *Server) DNSRuleNewHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DNSSettingsHandler

func (s *Server) DNSSettingsHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DNSSubscriptionActionHandler

func (s *Server) DNSSubscriptionActionHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DNSSubscriptionEditHandler

func (s *Server) DNSSubscriptionEditHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DNSSubscriptionNewHandler

func (s *Server) DNSSubscriptionNewHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DNSView

func (s *Server) DNSView(w http.ResponseWriter, r *http.Request)

func (*Server) DNSZoneDeleteHandler

func (s *Server) DNSZoneDeleteHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DNSZoneDetailHandler

func (s *Server) DNSZoneDetailHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DNSZoneEditHandler

func (s *Server) DNSZoneEditHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DNSZoneNewHandler

func (s *Server) DNSZoneNewHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DNSZonesView

func (s *Server) DNSZonesView(w http.ResponseWriter, r *http.Request)

func (*Server) DeleteACMEAccount

func (s *Server) DeleteACMEAccount(id int64) error

DeleteACMEAccount deletes an ACME account

func (*Server) DeleteACMEOrder

func (s *Server) DeleteACMEOrder(id int64) error

DeleteACMEOrder deletes an ACME order

func (*Server) DeleteACMEProvider

func (s *Server) DeleteACMEProvider(id int64) error

DeleteACMEProvider deletes an ACME provider

func (*Server) DeleteCertificate

func (s *Server) DeleteCertificate(id int64) error

DeleteCertificate deletes a certificate by ID

func (*Server) DeleteClashServer

func (s *Server) DeleteClashServer(id int64) error

DeleteClashServer deletes a Clash server by ID

func (*Server) DeleteCronJob

func (s *Server) DeleteCronJob(id int64) error

DeleteCronJob deletes a cron job

func (*Server) DeleteDNSLocalRecord

func (s *Server) DeleteDNSLocalRecord(id int64) error

func (*Server) DeleteDNSProvider

func (s *Server) DeleteDNSProvider(id int64) error

DeleteDNSProvider deletes a DNS provider

func (*Server) DeleteDNSSubscription

func (s *Server) DeleteDNSSubscription(id int64) error

func (*Server) DeleteDNSZone

func (s *Server) DeleteDNSZone(id int64) error

func (*Server) DeleteESXiServer

func (s *Server) DeleteESXiServer(id int64) error

DeleteESXiServer deletes an ESXi server

func (*Server) DeleteIDRACServer

func (s *Server) DeleteIDRACServer(id int64) error

DeleteIDRACServer deletes an iDRAC server by ID

func (*Server) DeleteIPMIServer

func (s *Server) DeleteIPMIServer(id int64) error

DeleteIPMIServer deletes an IPMI server by ID

func (*Server) DeleteMonitor

func (s *Server) DeleteMonitor(id int64) error

DeleteMonitor deletes a monitor

func (*Server) DeleteOpenWrtServer

func (s *Server) DeleteOpenWrtServer(id int64) error

DeleteOpenWrtServer deletes an OpenWrt server by ID

func (*Server) DeletePVEServer

func (s *Server) DeletePVEServer(id int64) error

func (*Server) DeleteProject

func (s *Server) DeleteProject(id int64) error

DeleteProject deletes a project by its ID

func (*Server) DeleteProjectHandler

func (s *Server) DeleteProjectHandler(w http.ResponseWriter, r *http.Request)

func (*Server) DeleteSSH

func (s *Server) DeleteSSH(id int64) error

DeleteSSH deletes an SSH server

func (*Server) DeleteSetting

func (s *Server) DeleteSetting(id int64) error

DeleteSetting deletes a setting by ID

func (*Server) DeleteSpeedtestResult

func (s *Server) DeleteSpeedtestResult(id int64) error

func (*Server) DeleteTCPListener

func (s *Server) DeleteTCPListener(id int64) error

DeleteTCPListener deletes a TCP listener

func (*Server) DeleteWebHost

func (s *Server) DeleteWebHost(id int64) error

func (*Server) DeleteWebListener

func (s *Server) DeleteWebListener(id int64) error

func (*Server) DeleteWebPolicy

func (s *Server) DeleteWebPolicy(id int64) error

func (*Server) DeleteWebRoute

func (s *Server) DeleteWebRoute(id int64) error

func (*Server) DeleteWidget

func (s *Server) DeleteWidget(id int64) error

func (*Server) DeleteYeelightDevice

func (s *Server) DeleteYeelightDevice(id int64) error

DeleteYeelightDevice deletes a Yeelight device by ID

func (*Server) DeploymentDetailView

func (s *Server) DeploymentDetailView(w http.ResponseWriter, r *http.Request)

func (*Server) DeploymentLogsHandler

func (s *Server) DeploymentLogsHandler(w http.ResponseWriter, r *http.Request)

DeploymentLogsHandler handles SSE for real-time deployment logs

func (*Server) DeploymentsView

func (s *Server) DeploymentsView(w http.ResponseWriter, r *http.Request)

func (*Server) DisableCronJob

func (s *Server) DisableCronJob(id int64) error

DisableCronJob disables a cron job

func (*Server) DiskDetailHandler

func (s *Server) DiskDetailHandler(w http.ResponseWriter, r *http.Request)

DiskDetailHandler handles viewing disk SMART details

func (*Server) DiskTestHandler

func (s *Server) DiskTestHandler(w http.ResponseWriter, r *http.Request)

DiskTestHandler tests SMART connection to a disk

func (*Server) DisksView

func (s *Server) DisksView(w http.ResponseWriter, r *http.Request)

DisksView renders the disk list page

func (*Server) ESXiServerDeleteHandler

func (s *Server) ESXiServerDeleteHandler(w http.ResponseWriter, r *http.Request)

ESXiServerDeleteHandler handles deleting an ESXi server

func (*Server) ESXiServerDetailHandler

func (s *Server) ESXiServerDetailHandler(w http.ResponseWriter, r *http.Request)

ESXiServerDetailHandler handles ESXi server detail page

func (*Server) ESXiServerEditHandler

func (s *Server) ESXiServerEditHandler(w http.ResponseWriter, r *http.Request)

ESXiServerEditHandler handles both displaying the edit form and updating a server

func (*Server) ESXiServerNewHandler

func (s *Server) ESXiServerNewHandler(w http.ResponseWriter, r *http.Request)

ESXiServerNewHandler handles both displaying the new server form and creating a new server Also handles edit mode when .server is passed in the template data

func (*Server) ESXiServerTestConnection

func (s *Server) ESXiServerTestConnection(w http.ResponseWriter, r *http.Request)

ESXiServerTestConnection handles testing ESXi server connection

func (*Server) ESXiServersView

func (s *Server) ESXiServersView(w http.ResponseWriter, r *http.Request)

ESXiServersView handles the ESXi servers list page

func (*Server) EditProject

func (s *Server) EditProject(w http.ResponseWriter, r *http.Request)

func (*Server) EnableCronJob

func (s *Server) EnableCronJob(id int64) error

EnableCronJob enables a cron job

func (*Server) Error

func (s *Server) Error(w http.ResponseWriter, err error)

func (*Server) FileDeleteHandler

func (s *Server) FileDeleteHandler(w http.ResponseWriter, r *http.Request)

FileDeleteHandler handles DELETE /files

func (*Server) FileDownload

func (s *Server) FileDownload(w http.ResponseWriter, r *http.Request)

FileDownload handles file download

func (*Server) FileNew

func (s *Server) FileNew(w http.ResponseWriter, r *http.Request)

FileNew handles new file/folder/upload form

func (*Server) FilePost

func (s *Server) FilePost(w http.ResponseWriter, r *http.Request)

FilePost handles file/folder creation and upload POST requests

func (*Server) FileView

func (s *Server) FileView(w http.ResponseWriter, r *http.Request)

FileView handles file manager UI

func (*Server) GetACMEAccount

func (s *Server) GetACMEAccount(id int64) (*ACMEAccount, error)

GetACMEAccount retrieves an ACME account by ID

func (*Server) GetACMEAccounts

func (s *Server) GetACMEAccounts() ([]ACMEAccount, error)

GetACMEAccountsByProvider retrieves all ACME accounts for a provider

func (*Server) GetACMEChallengesByAuthorization

func (s *Server) GetACMEChallengesByAuthorization(authzID int64) ([]ACMEChallenge, error)

GetACMEChallengesByAuthorization retrieves all ACME challenges for an authorization

func (*Server) GetACMEOrder

func (s *Server) GetACMEOrder(id int64) (*ACMEOrder, error)

GetACMEOrder retrieves an ACME order by ID

func (*Server) GetACMEOrders

func (s *Server) GetACMEOrders() ([]ACMEOrder, error)

GetACMEOrders retrieves all ACME orders

func (*Server) GetACMEProvider

func (s *Server) GetACMEProvider(id int64) (*ACMEProvider, error)

GetACMEProvider retrieves an ACME provider by ID

func (*Server) GetActiveDeploymentByProject

func (s *Server) GetActiveDeploymentByProject(projectID int64) (*Deployment, error)

GetActiveDeploymentByProject returns the pending or running deployment for a project, if one exists.

func (*Server) GetAllAppStatuses

func (s *Server) GetAllAppStatuses() (map[string]*AppStatus, error)

GetAllAppStatuses returns a map of appID -> status by querying Docker once

func (*Server) GetAllCertificates

func (s *Server) GetAllCertificates() ([]Certificate, error)

GetAllCertificates retrieves all certificates

func (*Server) GetAllClashServers

func (s *Server) GetAllClashServers() ([]ClashServer, error)

GetAllClashServers retrieves all Clash servers (without secret for list view)

func (*Server) GetAllCronJobs

func (s *Server) GetAllCronJobs() ([]CronJob, error)

GetAllCronJobs retrieves all cron jobs

func (*Server) GetAllDHCPLeases

func (s *Server) GetAllDHCPLeases() ([]DHCPLease, error)

func (*Server) GetAllDHCPStaticLeases

func (s *Server) GetAllDHCPStaticLeases() ([]DHCPStaticLease, error)

func (*Server) GetAllDNSProviders

func (s *Server) GetAllDNSProviders() ([]DNSProvider, error)

GetAllDNSProviders retrieves all DNS providers

func (*Server) GetAllDNSRules

func (s *Server) GetAllDNSRules() ([]DNSRule, error)

func (*Server) GetAllDNSSubscriptions

func (s *Server) GetAllDNSSubscriptions() ([]DNSSubscription, error)

func (*Server) GetAllDNSZones

func (s *Server) GetAllDNSZones() ([]DNSZone, error)

func (*Server) GetAllESXiServers

func (s *Server) GetAllESXiServers() ([]ESXiServer, error)

GetAllESXiServers retrieves all ESXi servers

func (*Server) GetAllIDRACServers

func (s *Server) GetAllIDRACServers() ([]IDRACServer, error)

GetAllIDRACServers retrieves all iDRAC servers

func (*Server) GetAllIPMIServers

func (s *Server) GetAllIPMIServers() ([]IPMIServer, error)

GetAllIPMIServers retrieves all IPMI servers

func (*Server) GetAllMonitors

func (s *Server) GetAllMonitors() ([]Monitor, error)

GetAllMonitors retrieves all monitors

func (*Server) GetAllOpenWrtServers

func (s *Server) GetAllOpenWrtServers() ([]OpenWrtServer, error)

GetAllOpenWrtServers retrieves all OpenWrt servers

func (*Server) GetAllPVEServers

func (s *Server) GetAllPVEServers() ([]PVEServer, error)

func (*Server) GetAllProjects

func (s *Server) GetAllProjects() ([]Project, error)

GetAllProjects retrieves all projects from the database

func (*Server) GetAllSettings

func (s *Server) GetAllSettings() ([]Setting, error)

GetAllSettings retrieves all settings

func (*Server) GetAllSpeedtestResults

func (s *Server) GetAllSpeedtestResults() ([]SpeedtestResult, error)

func (*Server) GetAllTCPListeners

func (s *Server) GetAllTCPListeners() ([]TCPListener, error)

GetAllTCPListeners retrieves all TCP/UDP listeners

func (*Server) GetAllWebHosts

func (s *Server) GetAllWebHosts() ([]WebHost, error)

func (*Server) GetAllWebListeners

func (s *Server) GetAllWebListeners() ([]WebListener, error)

func (*Server) GetAllWebPolicies

func (s *Server) GetAllWebPolicies() ([]WebPolicy, error)

func (*Server) GetAllWidgets

func (s *Server) GetAllWidgets() ([]Widget, error)

func (*Server) GetAllYeelightDevices

func (s *Server) GetAllYeelightDevices() ([]YeelightDevice, error)

GetAllYeelightDevices retrieves all Yeelight devices

func (*Server) GetAppCategories

func (s *Server) GetAppCategories() ([]string, error)

GetAppCategories returns all unique categories

func (*Server) GetAppDir

func (s *Server) GetAppDir(appID string) string

GetAppDir returns the installation directory for an app

func (*Server) GetAppStatus

func (s *Server) GetAppStatus(appID string) (*AppStatus, error)

GetAppStatus gets the status of a single app

func (*Server) GetAppTemplate

func (s *Server) GetAppTemplate(id string) (*AppTemplate, error)

GetAppTemplate retrieves an app template by ID

func (*Server) GetCertificate

func (s *Server) GetCertificate(id int64) (*Certificate, error)

GetCertificate retrieves a certificate by ID

func (*Server) GetClashServerByID

func (s *Server) GetClashServerByID(id int64) (*ClashServer, error)

GetClashServerByID retrieves a Clash server by ID (with secret)

func (*Server) GetComposeProjectDetail

func (s *Server) GetComposeProjectDetail(name string) (*ComposeProject, error)

GetComposeProjectDetail gets detailed information for a specific compose project

func (*Server) GetCronJob

func (s *Server) GetCronJob(id int64) (*CronJob, error)

GetCronJob retrieves a cron job by ID

func (*Server) GetCronJobExecutions

func (s *Server) GetCronJobExecutions(jobID int64, limit int) ([]CronJobExecution, error)

GetCronJobExecutions retrieves executions for a job

func (*Server) GetDHCPSettings

func (s *Server) GetDHCPSettings() (*DHCPSettings, error)

func (*Server) GetDHCPStaticLeaseByID

func (s *Server) GetDHCPStaticLeaseByID(id int64) (*DHCPStaticLease, error)

func (*Server) GetDNSProvider

func (s *Server) GetDNSProvider(id int64) (*DNSProvider, error)

GetDNSProvider retrieves a DNS provider by ID

func (*Server) GetDNSProviderClient

func (s *Server) GetDNSProviderClient(providerID int64) (types.IDNSProvider, error)

func (*Server) GetDNSRecordByID

func (s *Server) GetDNSRecordByID(id int64) (*DNSLocalRecord, error)

func (*Server) GetDNSRecordsByZone

func (s *Server) GetDNSRecordsByZone(zoneID int64) ([]DNSLocalRecord, error)

func (*Server) GetDNSSettings

func (s *Server) GetDNSSettings() (*DNSSettings, error)

func (*Server) GetDNSSubscriptionByID

func (s *Server) GetDNSSubscriptionByID(id int64) (*DNSSubscription, error)

func (*Server) GetDNSZoneByID

func (s *Server) GetDNSZoneByID(id int64) (*DNSZone, error)

func (*Server) GetDeployment

func (s *Server) GetDeployment(id int64) (*Deployment, error)

GetDeployment retrieves a deployment by ID

func (*Server) GetDeploymentByGitHubDeliveryID

func (s *Server) GetDeploymentByGitHubDeliveryID(deliveryID string) (*Deployment, error)

func (*Server) GetDeploymentsByProject

func (s *Server) GetDeploymentsByProject(projectID int64) ([]Deployment, error)

GetDeploymentsByProject retrieves all deployments for a project

func (*Server) GetDiskHealth

func (s *Server) GetDiskHealth(device string) (*Disk, error)

GetDiskHealth retrieves SMART health information for a specific disk

func (*Server) GetDiskList

func (s *Server) GetDiskList() ([]string, error)

GetDiskList retrieves a list of all disks/devices

func (*Server) GetDiskUsage

func (s *Server) GetDiskUsage() ([]DiskInfo, error)

GetDiskUsage retrieves disk usage information from the system

func (*Server) GetDistinctHostnames

func (s *Server) GetDistinctHostnames() ([]string, error)

func (*Server) GetESXiServer

func (s *Server) GetESXiServer(id int64) (*ESXiServer, error)

GetESXiServer retrieves an ESXi server by ID

func (*Server) GetEnabledCronJobs

func (s *Server) GetEnabledCronJobs() ([]CronJob, error)

GetEnabledCronJobs retrieves all enabled cron jobs

func (*Server) GetEnabledMonitors

func (s *Server) GetEnabledMonitors() ([]Monitor, error)

GetEnabledMonitors retrieves only enabled monitors

func (*Server) GetEnabledWidgets

func (s *Server) GetEnabledWidgets() ([]Widget, error)

func (*Server) GetHTTP01Token

func (s *Server) GetHTTP01Token(host, token string) (string, bool)

func (*Server) GetIDRACServerByID

func (s *Server) GetIDRACServerByID(id int64) (*IDRACServer, error)

GetIDRACServerByID retrieves an iDRAC server by ID

func (*Server) GetIPMIServerByID

func (s *Server) GetIPMIServerByID(id int64) (*IPMIServer, error)

GetIPMIServerByID retrieves an IPMI server by ID

func (*Server) GetLatestDeploymentByProject

func (s *Server) GetLatestDeploymentByProject(projectID int64) (*Deployment, error)

GetLatestDeploymentByProject retrieves the most recent deployment for a project

func (*Server) GetLatestMonitorCheck

func (s *Server) GetLatestMonitorCheck(monitorID int64) (*MonitorCheck, error)

GetLatestMonitorCheck gets the most recent check for a monitor

func (*Server) GetLatestStatsByHost

func (s *Server) GetLatestStatsByHost(hostname string) (*SystemStats, error)

func (*Server) GetLatestStatsForAllHosts

func (s *Server) GetLatestStatsForAllHosts() ([]SystemStats, error)

func (*Server) GetLatestSuccessfulDeploymentByProject

func (s *Server) GetLatestSuccessfulDeploymentByProject(projectID int64) (*Deployment, error)

func (*Server) GetLogsByDeployment

func (s *Server) GetLogsByDeployment(deploymentID int64) ([]DeploymentLog, error)

GetLogsByDeployment retrieves all logs for a deployment

func (*Server) GetMonitorByID

func (s *Server) GetMonitorByID(id int64) (*Monitor, error)

GetMonitorByID retrieves a monitor by ID

func (*Server) GetMonitorChecks

func (s *Server) GetMonitorChecks(monitorID int64, limit int) ([]MonitorCheck, error)

GetMonitorChecks retrieves recent checks for a monitor

func (*Server) GetMonitorUptime

func (s *Server) GetMonitorUptime(monitorID int64, hours int) (float64, error)

GetMonitorUptime calculates uptime percentage over the last N hours

func (*Server) GetNTPSettings

func (s *Server) GetNTPSettings() (*NTPSettings, error)

func (*Server) GetOpenWrtServerByID

func (s *Server) GetOpenWrtServerByID(id int64) (*OpenWrtServer, error)

GetOpenWrtServerByID retrieves an OpenWrt server by ID

func (*Server) GetPVEServer

func (s *Server) GetPVEServer(id int64) (*PVEServer, error)

func (*Server) GetProjectByID

func (s *Server) GetProjectByID(id int64) (*Project, error)

GetProjectByID retrieves a project by its ID

func (*Server) GetProjectRuntimeStatus

func (s *Server) GetProjectRuntimeStatus(projectID int64) (*ProjectRuntimeStatus, error)

GetProjectRuntimeStatus gets the runtime status of a project by checking its latest deployment's container

func (*Server) GetRecentCronJobExecutions

func (s *Server) GetRecentCronJobExecutions(limit int) ([]CronJobExecution, error)

GetRecentCronJobExecutions retrieves recent executions across all jobs

func (*Server) GetRecentStats

func (s *Server) GetRecentStats(duration time.Duration) ([]SystemStats, error)

func (*Server) GetRecentStatsByHost

func (s *Server) GetRecentStatsByHost(hostname string, duration time.Duration) ([]SystemStats, error)

func (*Server) GetSSH

func (s *Server) GetSSH(id int64) (*SSHServer, bool)

GetSSH returns a single SSH server by ID

func (*Server) GetSettingByID

func (s *Server) GetSettingByID(id int64) (*Setting, error)

GetSettingByID retrieves a setting by ID

func (*Server) GetSettingByName

func (s *Server) GetSettingByName(name string) (*Setting, error)

GetSettingByName retrieves a setting by name

func (*Server) GetSpeedtestResultByID

func (s *Server) GetSpeedtestResultByID(id int64) (*SpeedtestResult, error)

func (*Server) GetSpeedtestServers

func (s *Server) GetSpeedtestServers(testType string) ([]SpeedtestServer, error)

func (*Server) GetTCPListener

func (s *Server) GetTCPListener(id int64) (*TCPListener, error)

GetTCPListener retrieves a TCP listener by ID

func (*Server) GetTCPListenerByPort

func (s *Server) GetTCPListenerByPort(port int) (*TCPListener, error)

GetTCPListenerByPort retrieves a TCP listener by listen port

func (*Server) GetWebHost

func (s *Server) GetWebHost(id int64) (*WebHost, error)

func (*Server) GetWebListener

func (s *Server) GetWebListener(id int64) (*WebListener, error)

func (*Server) GetWebPolicy

func (s *Server) GetWebPolicy(id int64) (*WebPolicy, error)

func (*Server) GetWebRoute

func (s *Server) GetWebRoute(id int64) (*WebRoute, error)

func (*Server) GetWebRoutesByHost

func (s *Server) GetWebRoutesByHost(hostID int64) ([]WebRoute, error)

func (*Server) GetWidgetByID

func (s *Server) GetWidgetByID(id int64) (*Widget, error)

func (*Server) GetYeelightDeviceByID

func (s *Server) GetYeelightDeviceByID(id int64) (*YeelightDevice, error)

GetYeelightDeviceByID retrieves a Yeelight device by ID

func (*Server) GitHubWebhookHandler

func (s *Server) GitHubWebhookHandler(w http.ResponseWriter, r *http.Request)

GitHubWebhookHandler validates GitHub deliveries and starts the same deployment pipeline used by the manual button.

func (*Server) HostHistoryHandler

func (s *Server) HostHistoryHandler(w http.ResponseWriter, r *http.Request)

func (*Server) IDRACDetailHandler

func (s *Server) IDRACDetailHandler(w http.ResponseWriter, r *http.Request)

IDRACDetailHandler handles viewing/deleting an iDRAC server

func (*Server) IDRACEditHandler

func (s *Server) IDRACEditHandler(w http.ResponseWriter, r *http.Request)

IDRACEditHandler handles editing an iDRAC server

func (*Server) IDRACListView

func (s *Server) IDRACListView(w http.ResponseWriter, r *http.Request)

IDRACListView renders the iDRAC server list page

func (*Server) IDRACNewHandler

func (s *Server) IDRACNewHandler(w http.ResponseWriter, r *http.Request)

IDRACNewHandler handles creating a new iDRAC server

func (*Server) IDRACPowerControlHandler

func (s *Server) IDRACPowerControlHandler(w http.ResponseWriter, r *http.Request)

IDRACPowerControlHandler handles power control operations

func (*Server) IPMIDetailHandler

func (s *Server) IPMIDetailHandler(w http.ResponseWriter, r *http.Request)

IPMIDetailHandler handles viewing/deleting an IPMI server

func (*Server) IPMIEditHandler

func (s *Server) IPMIEditHandler(w http.ResponseWriter, r *http.Request)

IPMIEditHandler handles editing an IPMI server

func (*Server) IPMINewHandler

func (s *Server) IPMINewHandler(w http.ResponseWriter, r *http.Request)

IPMINewHandler handles creating a new IPMI server

func (*Server) IPMIPowerControlHandler

func (s *Server) IPMIPowerControlHandler(w http.ResponseWriter, r *http.Request)

IPMIPowerControlHandler handles power control operations

func (*Server) IPMITestConnectionHandler

func (s *Server) IPMITestConnectionHandler(w http.ResponseWriter, r *http.Request)

IPMITestConnectionHandler tests the connection to an IPMI server

func (*Server) IPMIView

func (s *Server) IPMIView(w http.ResponseWriter, r *http.Request)

IPMIView renders the IPMI server list page

func (*Server) ImageDetailView

func (s *Server) ImageDetailView(w http.ResponseWriter, r *http.Request)

ImageDetailView handles image detail page

func (*Server) ImageView

func (s *Server) ImageView(w http.ResponseWriter, r *http.Request)

func (*Server) IndexView

func (s *Server) IndexView(w http.ResponseWriter, r *http.Request)

func (*Server) InitSlog

func (s *Server) InitSlog() error

func (*Server) InsertMonitorCheck

func (s *Server) InsertMonitorCheck(check *MonitorCheck) error

InsertMonitorCheck saves a check result

func (*Server) InsertStats

func (s *Server) InsertStats(stats *SystemStats) error

func (*Server) InstallApp

func (s *Server) InstallApp(appID string, envVars map[string]string) error

InstallApp installs an app by copying compose file and running docker-compose up

func (*Server) IsAppInstalled

func (s *Server) IsAppInstalled(appID string) bool

IsAppInstalled checks if an app has been installed (compose dir exists or container exists)

func (*Server) LegacyDomainsRedirect

func (s *Server) LegacyDomainsRedirect(w http.ResponseWriter, r *http.Request)

func (*Server) LegacyListenersRedirect

func (s *Server) LegacyListenersRedirect(w http.ResponseWriter, r *http.Request)

LegacyListenersRedirect preserves old bookmarks while making /forward the canonical location for Layer 4 forwarding configuration.

func (*Server) ListAppTemplates

func (s *Server) ListAppTemplates(category string) ([]*AppTemplate, error)

ListAppTemplates lists all app templates optionally filtered by category

func (*Server) ListComposeProjects

func (s *Server) ListComposeProjects() (projects []ComposeProject, err error)

func (*Server) ListContainers

func (s *Server) ListContainers(w http.ResponseWriter, r *http.Request)

func (*Server) ListImages

func (s *Server) ListImages(w http.ResponseWriter, r *http.Request)

func (*Server) ListNetworks

func (s *Server) ListNetworks(w http.ResponseWriter, r *http.Request)

func (*Server) ListSSH

func (s *Server) ListSSH() []*SSHServer

ListSSH returns all SSH servers

func (*Server) ListVolumes

func (s *Server) ListVolumes(w http.ResponseWriter, r *http.Request)

func (*Server) LoginView

func (s *Server) LoginView(w http.ResponseWriter, r *http.Request)

LoginView handles GET/POST for the login page

func (*Server) LogoutHandler

func (s *Server) LogoutHandler(w http.ResponseWriter, r *http.Request)

LogoutHandler clears the auth cookie

func (*Server) MonitorDetailView

func (s *Server) MonitorDetailView(w http.ResponseWriter, r *http.Request)

func (*Server) MonitorView

func (s *Server) MonitorView(w http.ResponseWriter, r *http.Request)

func (*Server) NTPActionHandler

func (s *Server) NTPActionHandler(w http.ResponseWriter, r *http.Request)

func (*Server) NTPSettingsHandler

func (s *Server) NTPSettingsHandler(w http.ResponseWriter, r *http.Request)

func (*Server) NTPView

func (s *Server) NTPView(w http.ResponseWriter, r *http.Request)

func (*Server) NetworkDetailView

func (s *Server) NetworkDetailView(w http.ResponseWriter, r *http.Request)

NetworkDetailView handles network detail page

func (*Server) NetworkView

func (s *Server) NetworkView(w http.ResponseWriter, r *http.Request)

func (*Server) NewProject

func (s *Server) NewProject(w http.ResponseWriter, r *http.Request)

func (*Server) OpenSSHTerminal

func (s *Server) OpenSSHTerminal(_ context.Context, server *SSHServer, cols, rows uint16) (terminalpkg.Session, error)

OpenSSHTerminal adapts an SSH PTY to the generic terminal session contract.

func (*Server) OpenWrtDHCPHandler

func (s *Server) OpenWrtDHCPHandler(w http.ResponseWriter, r *http.Request)

OpenWrtDHCPHandler handles the DHCP sub-page

func (*Server) OpenWrtDetailHandler

func (s *Server) OpenWrtDetailHandler(w http.ResponseWriter, r *http.Request)

OpenWrtDetailHandler handles viewing/deleting an OpenWrt server

func (*Server) OpenWrtEditHandler

func (s *Server) OpenWrtEditHandler(w http.ResponseWriter, r *http.Request)

OpenWrtEditHandler handles editing an OpenWrt server

func (*Server) OpenWrtFirewallHandler

func (s *Server) OpenWrtFirewallHandler(w http.ResponseWriter, r *http.Request)

OpenWrtFirewallHandler handles the firewall sub-page

func (*Server) OpenWrtListView

func (s *Server) OpenWrtListView(w http.ResponseWriter, r *http.Request)

OpenWrtListView renders the OpenWrt server list page

func (*Server) OpenWrtNetworkHandler

func (s *Server) OpenWrtNetworkHandler(w http.ResponseWriter, r *http.Request)

OpenWrtNetworkHandler handles the network sub-page

func (*Server) OpenWrtNewHandler

func (s *Server) OpenWrtNewHandler(w http.ResponseWriter, r *http.Request)

OpenWrtNewHandler handles creating a new OpenWrt server

func (*Server) OpenWrtPackagesHandler

func (s *Server) OpenWrtPackagesHandler(w http.ResponseWriter, r *http.Request)

OpenWrtPackagesHandler handles the packages sub-page

func (*Server) OpenWrtRebootHandler

func (s *Server) OpenWrtRebootHandler(w http.ResponseWriter, r *http.Request)

OpenWrtRebootHandler handles rebooting an OpenWrt router

func (*Server) OpenWrtRestartServiceHandler

func (s *Server) OpenWrtRestartServiceHandler(w http.ResponseWriter, r *http.Request)

OpenWrtRestartServiceHandler handles restarting services

func (*Server) OpenWrtTestConnectionHandler

func (s *Server) OpenWrtTestConnectionHandler(w http.ResponseWriter, r *http.Request)

OpenWrtTestConnectionHandler tests the connection to an OpenWrt server

func (*Server) PVECreateInstanceHandler

func (s *Server) PVECreateInstanceHandler(w http.ResponseWriter, r *http.Request)

func (*Server) PVEDeleteHandler

func (s *Server) PVEDeleteHandler(w http.ResponseWriter, r *http.Request)

func (*Server) PVEDetailHandler

func (s *Server) PVEDetailHandler(w http.ResponseWriter, r *http.Request)

func (*Server) PVEEditHandler

func (s *Server) PVEEditHandler(w http.ResponseWriter, r *http.Request)

func (*Server) PVEListView

func (s *Server) PVEListView(w http.ResponseWriter, r *http.Request)

func (*Server) PVENewHandler

func (s *Server) PVENewHandler(w http.ResponseWriter, r *http.Request)

func (*Server) PVETestConnectionHandler

func (s *Server) PVETestConnectionHandler(w http.ResponseWriter, r *http.Request)

func (*Server) ProjectDetailView

func (s *Server) ProjectDetailView(w http.ResponseWriter, r *http.Request)

func (*Server) ProjectsView

func (s *Server) ProjectsView(w http.ResponseWriter, r *http.Request)

func (*Server) ProxyDeleteHandler

func (s *Server) ProxyDeleteHandler(w http.ResponseWriter, r *http.Request)

ProxyDeleteHandler handles deleting a TCP/UDP proxy listener.

func (*Server) ProxyDetailHandler

func (s *Server) ProxyDetailHandler(w http.ResponseWriter, r *http.Request)

ProxyDetailHandler handles the TCP/UDP proxy detail page.

func (*Server) ProxyEditHandler

func (s *Server) ProxyEditHandler(w http.ResponseWriter, r *http.Request)

ProxyEditHandler handles editing a TCP/UDP proxy listener.

func (*Server) ProxyListView

func (s *Server) ProxyListView(w http.ResponseWriter, r *http.Request)

ProxyListView handles the TCP/UDP proxy list page.

func (*Server) ProxyNewHandler

func (s *Server) ProxyNewHandler(w http.ResponseWriter, r *http.Request)

ProxyNewHandler handles creating a TCP/UDP proxy listener.

func (*Server) ProxyStatusHandler

func (s *Server) ProxyStatusHandler(w http.ResponseWriter, r *http.Request)

ProxyStatusHandler handles TCP/UDP proxy listener lifecycle actions.

func (*Server) PullImage

func (s *Server) PullImage(w http.ResponseWriter, r *http.Request)

func (*Server) RecoverInterruptedDeployments

func (s *Server) RecoverInterruptedDeployments() error

RecoverInterruptedDeployments closes deployments whose in-memory executors were lost during a process restart.

func (*Server) RemoveImage

func (s *Server) RemoveImage(w http.ResponseWriter, r *http.Request)

func (*Server) RemoveNetwork

func (s *Server) RemoveNetwork(w http.ResponseWriter, r *http.Request)

func (*Server) RemoveVolume

func (s *Server) RemoveVolume(w http.ResponseWriter, r *http.Request)

func (*Server) Render

func (s *Server) Render(w http.ResponseWriter, templateName string, data H)

Render renders an HTML template with the provided data.

func (*Server) RestartApp

func (s *Server) RestartApp(appID string) error

RestartApp restarts an installed app

func (*Server) RunAllChecks

func (s *Server) RunAllChecks()

RunAllChecks runs checks for all enabled monitors

func (*Server) RunCheck

func (s *Server) RunCheck(monitor *Monitor) (*MonitorCheck, error)

RunCheck executes a check for a monitor

func (*Server) SSHConnectHandler

func (s *Server) SSHConnectHandler(w http.ResponseWriter, r *http.Request, server *SSHServer)

func (*Server) SSHCreate

func (s *Server) SSHCreate(w http.ResponseWriter, r *http.Request)

SSHCreate handles creating a new SSH server

func (*Server) SSHDelete

func (s *Server) SSHDelete(w http.ResponseWriter, r *http.Request)

SSHDelete handles deleting an SSH server

func (*Server) SSHDetailView

func (s *Server) SSHDetailView(w http.ResponseWriter, r *http.Request)

SSHDetailView handles the SSH server detail view with terminal

func (*Server) SSHEditView

func (s *Server) SSHEditView(w http.ResponseWriter, r *http.Request)

SSHEditView handles the edit SSH server form

func (*Server) SSHListView

func (s *Server) SSHListView(w http.ResponseWriter, r *http.Request)

SSHListView handles the SSH servers list view

func (*Server) SSHMetricsHandler

func (s *Server) SSHMetricsHandler(w http.ResponseWriter, r *http.Request)

SSHMetricsHandler exposes SSH server metrics in Prometheus/OpenMetrics format

func (*Server) SSHNewView

func (s *Server) SSHNewView(w http.ResponseWriter, r *http.Request)

SSHNewView handles the new SSH server form

func (*Server) SSHStatsHandler

func (s *Server) SSHStatsHandler(w http.ResponseWriter, r *http.Request)

SSHStatsHandler handles SSE connection for SSH server status and stats

func (*Server) SSHTerminal

func (s *Server) SSHTerminal(w http.ResponseWriter, r *http.Request)

SSHTerminal handles the WebSocket endpoint for a saved SSH profile.

func (*Server) SSHTerminalView

func (s *Server) SSHTerminalView(w http.ResponseWriter, r *http.Request)

SSHTerminalView renders the shared terminal UI for a saved SSH profile.

func (*Server) SSHTestConnection

func (s *Server) SSHTestConnection(w http.ResponseWriter, r *http.Request)

SSHTestConnection tests the SSH connection

func (*Server) SSHUpdate

func (s *Server) SSHUpdate(w http.ResponseWriter, r *http.Request)

SSHUpdate handles updating an SSH server

func (*Server) SaveDNSSubscription

func (s *Server) SaveDNSSubscription(item *DNSSubscription) error

func (*Server) SeedDefaultWebWorker

func (s *Server) SeedDefaultWebWorker() error

SeedDefaultWebWorker idempotently provisions the minimal public Web Server configuration used by install.sh. It only manages resources named "http", "default", and "worker", leaving all other user configuration intact.

func (*Server) SettingsEditHandler

func (s *Server) SettingsEditHandler(w http.ResponseWriter, r *http.Request)

SettingsEditHandler handles editing a setting

func (*Server) SettingsListView

func (s *Server) SettingsListView(w http.ResponseWriter, r *http.Request)

SettingsListView renders the settings list page

func (*Server) SettingsNewHandler

func (s *Server) SettingsNewHandler(w http.ResponseWriter, r *http.Request)

SettingsNewHandler handles creating a new setting

func (*Server) SpeedtestDeleteHandler

func (s *Server) SpeedtestDeleteHandler(w http.ResponseWriter, r *http.Request)

func (*Server) SpeedtestListView

func (s *Server) SpeedtestListView(w http.ResponseWriter, r *http.Request)

func (*Server) SpeedtestNewHandler

func (s *Server) SpeedtestNewHandler(w http.ResponseWriter, r *http.Request)

func (*Server) SpeedtestRecordsHandler

func (s *Server) SpeedtestRecordsHandler(w http.ResponseWriter, r *http.Request)

func (*Server) SpeedtestRunHandler

func (s *Server) SpeedtestRunHandler(w http.ResponseWriter, r *http.Request)

func (*Server) StartApp

func (s *Server) StartApp(appID string) error

StartApp starts an installed app

func (*Server) StartGitHubDeployment

func (s *Server) StartGitHubDeployment(project *Project, commit, commitMsg, author, deliveryID string) (*Deployment, bool, error)

func (*Server) StartProjectDeployment

func (s *Server) StartProjectDeployment(project *Project, triggeredBy string) (*Deployment, error)

StartProjectDeployment serializes triggers per project and registers the executor before returning the deployment to the handler.

func (*Server) StatsHandler

func (s *Server) StatsHandler(w http.ResponseWriter, r *http.Request)

func (*Server) StopApp

func (s *Server) StopApp(appID string) error

StopApp stops an installed app

func (*Server) SystemPackagesInstallHandler

func (s *Server) SystemPackagesInstallHandler(w http.ResponseWriter, r *http.Request)

func (*Server) SystemPackagesRefreshHandler

func (s *Server) SystemPackagesRefreshHandler(w http.ResponseWriter, r *http.Request)

func (*Server) SystemPackagesRemoveHandler

func (s *Server) SystemPackagesRemoveHandler(w http.ResponseWriter, r *http.Request)

func (*Server) SystemPackagesUpgradeHandler

func (s *Server) SystemPackagesUpgradeHandler(w http.ResponseWriter, r *http.Request)

func (*Server) SystemPackagesView

func (s *Server) SystemPackagesView(w http.ResponseWriter, r *http.Request)

func (*Server) TelegrafHandler

func (s *Server) TelegrafHandler(w http.ResponseWriter, r *http.Request)

func (*Server) TerminalHandler

func (s *Server) TerminalHandler(w http.ResponseWriter, r *http.Request)

func (*Server) TerminalWS

func (s *Server) TerminalWS(w http.ResponseWriter, r *http.Request)

func (*Server) ToggleMonitor

func (s *Server) ToggleMonitor(id int64, enabled bool) error

ToggleMonitor enables/disables a monitor

func (*Server) UninstallApp

func (s *Server) UninstallApp(appID string) error

UninstallApp removes an app

func (*Server) UpdateACMEAccount

func (s *Server) UpdateACMEAccount(id int64, accountURL, email, keyPem, thumbprint string, agreedTerms bool) error

UpdateACMEAccount updates an ACME account

func (*Server) UpdateACMEAccountStatus

func (s *Server) UpdateACMEAccountStatus(id int64, status string) error

UpdateACMEAccountStatus updates the status of an ACME account

func (*Server) UpdateACMEChallenge

func (s *Server) UpdateACMEChallenge(id int64, status, keyAuth, errorMsg string, validated time.Time) error

UpdateACMEChallenge updates an ACME challenge

func (*Server) UpdateACMEProvider

func (s *Server) UpdateACMEProvider(id int64, name, directoryURL, termsOfService, website string) error

UpdateACMEProvider updates an ACME provider

func (*Server) UpdateCertificate

func (s *Server) UpdateCertificate(id int64, orderID int64, certPem string, status string) error

UpdateCertificate updates certificate information

func (*Server) UpdateCertificateStatus

func (s *Server) UpdateCertificateStatus(id int64, status string) error

UpdateCertificateStatus updates only the certificate status

func (*Server) UpdateClashServer

func (s *Server) UpdateClashServer(id int64, name, apiURL, secret, description string) error

UpdateClashServer updates an existing Clash server

func (*Server) UpdateCronJob

func (s *Server) UpdateCronJob(id int64, name, jobType, schedule, command, workingDir string, timeout int) error

UpdateCronJob updates a cron job

func (*Server) UpdateCronJobExecution

func (s *Server) UpdateCronJobExecution(id int64, status, output, errorMsg string, exitCode int) error

UpdateCronJobExecution updates an execution record with completion info

func (*Server) UpdateCronJobLastRun

func (s *Server) UpdateCronJobLastRun(id int64, lastRun time.Time) error

UpdateCronJobLastRun updates the last run time for a cron job

func (*Server) UpdateCronJobRunTimes

func (s *Server) UpdateCronJobRunTimes(id int64, lastRun time.Time, nextRun *time.Time) error

UpdateCronJobRunTimes updates both last run and next run times for a cron job

func (*Server) UpdateDHCPSettings

func (s *Server) UpdateDHCPSettings(item DHCPSettings) error

func (*Server) UpdateDNSProvider

func (s *Server) UpdateDNSProvider(id int64, name, providerType, config string) error

UpdateDNSProvider updates a DNS provider

func (*Server) UpdateDNSSettings

func (s *Server) UpdateDNSSettings(item DNSSettings) error

func (*Server) UpdateDNSZone

func (s *Server) UpdateDNSZone(id int64, name, description string, enabled bool) error

func (*Server) UpdateDeploymentArtifact

func (s *Server) UpdateDeploymentArtifact(id int64, imageName, containerName string) error

UpdateDeploymentArtifact records the image and stable container name produced by the build before deployment begins.

func (*Server) UpdateDeploymentContainerID

func (s *Server) UpdateDeploymentContainerID(id int64, containerID string) error

UpdateDeploymentContainerID updates the container ID for a deployment

func (*Server) UpdateDeploymentSource

func (s *Server) UpdateDeploymentSource(id int64, commit, commitMsg, author string) error

UpdateDeploymentSource records the immutable source revision used by a build.

func (*Server) UpdateDeploymentStatus

func (s *Server) UpdateDeploymentStatus(id int64, status DeploymentStatus) error

UpdateDeploymentStatus updates the status of a deployment

func (*Server) UpdateESXiServer

func (s *Server) UpdateESXiServer(id int64, name, host, username, password string, port int, insecure bool) error

UpdateESXiServer updates an ESXi server

func (*Server) UpdateHandler

func (s *Server) UpdateHandler(w http.ResponseWriter, r *http.Request)

func (*Server) UpdateIDRACServer

func (s *Server) UpdateIDRACServer(id int64, name, host, username, password, version, description string, port int) error

UpdateIDRACServer updates an existing iDRAC server

func (*Server) UpdateIPMIServer

func (s *Server) UpdateIPMIServer(id int64, name, bmcIP, username, password, description string, port int) error

UpdateIPMIServer updates an existing IPMI server

func (*Server) UpdateMonitor

func (s *Server) UpdateMonitor(m *Monitor) error

UpdateMonitor updates a monitor

func (*Server) UpdateNTPSettings

func (s *Server) UpdateNTPSettings(item NTPSettings) error

func (*Server) UpdateOpenWrtServer

func (s *Server) UpdateOpenWrtServer(id int64, name, host, username, password, protocol, description string, port int) error

UpdateOpenWrtServer updates an existing OpenWrt server

func (*Server) UpdatePVEServer

func (s *Server) UpdatePVEServer(id int64, name, host, username, password string, port int, insecure bool) error

func (*Server) UpdateProject

func (s *Server) UpdateProject(id int64, name, description, repo, webhookBranch, webhookSecret string) error

UpdateProject updates project and webhook settings atomically.

func (*Server) UpdateSSH

func (s *Server) UpdateSSH(server *SSHServer) error

UpdateSSH updates an existing SSH server

func (*Server) UpdateSetting

func (s *Server) UpdateSetting(id int64, value string) error

UpdateSetting updates an existing setting

func (*Server) UpdateTCPListener

func (s *Server) UpdateTCPListener(id int64, name, protocol string, listenPort int, forwardHost string, forwardPort int) error

UpdateTCPListener updates a TCP listener

func (*Server) UpdateTCPListenerStatus

func (s *Server) UpdateTCPListenerStatus(id int64, status string) error

UpdateTCPListenerStatus updates TCP listener status

func (*Server) UpdateWebHost

func (s *Server) UpdateWebHost(host *WebHost) error

func (*Server) UpdateWebListener

func (s *Server) UpdateWebListener(listener *WebListener) error

func (*Server) UpdateWebPolicy

func (s *Server) UpdateWebPolicy(policy *WebPolicy) error

func (*Server) UpdateWebRoute

func (s *Server) UpdateWebRoute(route *WebRoute) error

func (*Server) UpdateWidget

func (s *Server) UpdateWidget(id int64, name, widgetType, config string, sortOrder int, enabled bool) error

func (*Server) UpdateYeelightDevice

func (s *Server) UpdateYeelightDevice(id int64, name, host string, port int) error

UpdateYeelightDevice updates an existing Yeelight device

func (*Server) UptimeAPIChecksHandler

func (s *Server) UptimeAPIChecksHandler(w http.ResponseWriter, r *http.Request)

UptimeAPIChecksHandler returns check history for a monitor

func (*Server) UptimeAPIListHandler

func (s *Server) UptimeAPIListHandler(w http.ResponseWriter, r *http.Request)

UptimeAPIListHandler returns all monitors as JSON

func (*Server) UptimeCheckNowHandler

func (s *Server) UptimeCheckNowHandler(w http.ResponseWriter, r *http.Request)

UptimeCheckNowHandler triggers an immediate check

func (*Server) UptimeDeleteHandler

func (s *Server) UptimeDeleteHandler(w http.ResponseWriter, r *http.Request)

UptimeDeleteHandler deletes a monitor

func (*Server) UptimeDetailHandler

func (s *Server) UptimeDetailHandler(w http.ResponseWriter, r *http.Request)

UptimeDetailHandler handles viewing/editing a monitor

func (*Server) UptimeListView

func (s *Server) UptimeListView(w http.ResponseWriter, r *http.Request)

UptimeListView renders the uptime monitor list page

func (*Server) UptimeNewHandler

func (s *Server) UptimeNewHandler(w http.ResponseWriter, r *http.Request)

UptimeNewHandler handles creating a new monitor

func (*Server) UptimeToggleHandler

func (s *Server) UptimeToggleHandler(w http.ResponseWriter, r *http.Request)

UptimeToggleHandler enables/disables a monitor

func (*Server) VolumeDetailView

func (s *Server) VolumeDetailView(w http.ResponseWriter, r *http.Request)

VolumeDetailView handles volume detail page

func (*Server) VolumeView

func (s *Server) VolumeView(w http.ResponseWriter, r *http.Request)

func (*Server) WebHostEditHandler

func (s *Server) WebHostEditHandler(w http.ResponseWriter, r *http.Request)

func (*Server) WebHostHandler

func (s *Server) WebHostHandler(w http.ResponseWriter, r *http.Request)

func (*Server) WebHostNewHandler

func (s *Server) WebHostNewHandler(w http.ResponseWriter, r *http.Request)

func (*Server) WebHostRoutesHandler

func (s *Server) WebHostRoutesHandler(w http.ResponseWriter, r *http.Request)

func (*Server) WebHostsView

func (s *Server) WebHostsView(w http.ResponseWriter, r *http.Request)

func (*Server) WebListenerHandler

func (s *Server) WebListenerHandler(w http.ResponseWriter, r *http.Request)

func (*Server) WebListenerNewHandler

func (s *Server) WebListenerNewHandler(w http.ResponseWriter, r *http.Request)

func (*Server) WebListenersView

func (s *Server) WebListenersView(w http.ResponseWriter, r *http.Request)

func (*Server) WebPoliciesView

func (s *Server) WebPoliciesView(w http.ResponseWriter, r *http.Request)

func (*Server) WebPolicyHandler

func (s *Server) WebPolicyHandler(w http.ResponseWriter, r *http.Request)

func (*Server) WebPolicyNewHandler

func (s *Server) WebPolicyNewHandler(w http.ResponseWriter, r *http.Request)

func (*Server) WebRouteHandler

func (s *Server) WebRouteHandler(w http.ResponseWriter, r *http.Request)

func (*Server) WebRouteNewHandler

func (s *Server) WebRouteNewHandler(w http.ResponseWriter, r *http.Request)

func (*Server) WebServerMetricsHandler

func (s *Server) WebServerMetricsHandler(w http.ResponseWriter, r *http.Request)

func (*Server) WebServerView

func (s *Server) WebServerView(w http.ResponseWriter, r *http.Request)

func (*Server) WidgetDetailHandler

func (s *Server) WidgetDetailHandler(w http.ResponseWriter, r *http.Request)

func (*Server) WidgetEditHandler

func (s *Server) WidgetEditHandler(w http.ResponseWriter, r *http.Request)

func (*Server) WidgetListView

func (s *Server) WidgetListView(w http.ResponseWriter, r *http.Request)

func (*Server) WidgetNewHandler

func (s *Server) WidgetNewHandler(w http.ResponseWriter, r *http.Request)

func (*Server) YeelightBrightnessControlHandler

func (s *Server) YeelightBrightnessControlHandler(w http.ResponseWriter, r *http.Request)

YeelightBrightnessControlHandler handles brightness control

func (*Server) YeelightColorControlHandler

func (s *Server) YeelightColorControlHandler(w http.ResponseWriter, r *http.Request)

YeelightColorControlHandler handles RGB color control

func (*Server) YeelightColorTempControlHandler

func (s *Server) YeelightColorTempControlHandler(w http.ResponseWriter, r *http.Request)

YeelightColorTempControlHandler handles color temperature control

func (*Server) YeelightDetailHandler

func (s *Server) YeelightDetailHandler(w http.ResponseWriter, r *http.Request)

YeelightDetailHandler handles viewing/deleting a Yeelight device

func (*Server) YeelightDiscoverHandler

func (s *Server) YeelightDiscoverHandler(w http.ResponseWriter, r *http.Request)

YeelightDiscoverHandler handles device discovery via SSE

func (*Server) YeelightEditHandler

func (s *Server) YeelightEditHandler(w http.ResponseWriter, r *http.Request)

YeelightEditHandler handles editing a Yeelight device

func (*Server) YeelightListView

func (s *Server) YeelightListView(w http.ResponseWriter, r *http.Request)

YeelightListView renders the Yeelight device list page

func (*Server) YeelightNewHandler

func (s *Server) YeelightNewHandler(w http.ResponseWriter, r *http.Request)

YeelightNewHandler handles creating a new Yeelight device

func (*Server) YeelightPowerControlHandler

func (s *Server) YeelightPowerControlHandler(w http.ResponseWriter, r *http.Request)

YeelightPowerControlHandler handles power control

func (*Server) YeelightTestConnectionHandler

func (s *Server) YeelightTestConnectionHandler(w http.ResponseWriter, r *http.Request)

YeelightTestConnectionHandler tests the connection to a Yeelight device

type ServiceConflict

type ServiceConflict struct {
	Endpoint string   `json:"endpoint"`
	Services []string `json:"services"`
}

type ServicePreference

type ServicePreference struct {
	ID        string    `json:"id"`
	Enabled   bool      `json:"enabled"`
	LastError string    `json:"last_error"`
	UpdatedAt time.Time `json:"updated_at"`
}

type Setting

type Setting struct {
	ID          int64     `json:"id"`
	Name        string    `json:"name"`
	Type        string    `json:"type"` // string, number, boolean, json
	Value       string    `json:"value"`
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

Setting represents a setting in the database

type SpeedtestProgress

type SpeedtestProgress struct {
	Stage    string  `json:"stage"`
	Progress float64 `json:"progress"`
	Download float64 `json:"download"`
	Upload   float64 `json:"upload"`
	Ping     float64 `json:"ping"`
	Jitter   float64 `json:"jitter"`
	Message  string  `json:"message"`
}

type SpeedtestResult

type SpeedtestResult struct {
	ID         int64     `json:"id"`
	Type       string    `json:"type"`
	ServerID   string    `json:"server_id"`
	ServerName string    `json:"server_name"`
	ServerHost string    `json:"server_host"`
	Download   float64   `json:"download"`
	Upload     float64   `json:"upload"`
	Ping       float64   `json:"ping"`
	Jitter     float64   `json:"jitter"`
	IP         string    `json:"ip"`
	ISP        string    `json:"isp"`
	Country    string    `json:"country"`
	CreatedAt  time.Time `json:"created_at"`
	UpdatedAt  time.Time `json:"updated_at"`
}

type SpeedtestServer

type SpeedtestServer struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Host string `json:"host"`
}

type StatsResponse

type StatsResponse struct {
	Current *SystemStats  `json:"current"`
	History []SystemStats `json:"history"`
}

type SystemStats

type SystemStats struct {
	ID        int64     `json:"id"`
	Hostname  string    `json:"hostname"`
	Timestamp time.Time `json:"timestamp"`

	CPUUsage float64 `json:"cpu_usage"`
	CPUCores int     `json:"cpu_cores"`

	MemoryTotal uint64  `json:"memory_total"`
	MemoryUsed  uint64  `json:"memory_used"`
	MemoryFree  uint64  `json:"memory_free"`
	MemoryUsage float64 `json:"memory_usage"`

	DiskTotal uint64  `json:"disk_total"`
	DiskUsed  uint64  `json:"disk_used"`
	DiskFree  uint64  `json:"disk_free"`
	DiskUsage float64 `json:"disk_usage"`

	NetBytesSent uint64 `json:"net_bytes_sent"`
	NetBytesRecv uint64 `json:"net_bytes_recv"`

	Uptime uint64  `json:"uptime"`
	Load1  float64 `json:"load_1"`
	Load5  float64 `json:"load_5"`
	Load15 float64 `json:"load_15"`
}

SystemStats represents comprehensive system metrics

type TCPListener

type TCPListener struct {
	ID          int64     `json:"id"`
	Name        string    `json:"name"`
	Protocol    string    `json:"protocol"` // tcp or udp
	ListenPort  int       `json:"listen_port"`
	ForwardHost string    `json:"forward_host"`
	ForwardPort int       `json:"forward_port"`
	Status      string    `json:"status"` // active, inactive
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

TCPListener represents a TCP/UDP listener

type UpdateInfo

type UpdateInfo struct {
	Checked        bool
	Available      bool
	Installable    bool
	LatestVersion  string
	PublishedAt    time.Time
	ReleaseURL     string
	AssetName      string
	Message        string
	ChecksumsFound bool
	PlatformFound  bool
}

type WebHost

type WebHost struct {
	ID              int64
	Name            string
	Hostnames       string
	Enabled         bool
	CertificateID   *int64
	CertificateName string
	ForceHTTPS      bool
	ListenerIDs     []int64
	ListenerNames   []string
	PolicyIDs       []int64
	PolicyNames     []string
	Routes          []WebRoute
	CreatedAt       time.Time
	UpdatedAt       time.Time
}

type WebListener

type WebListener struct {
	ID                     int64
	Name                   string
	Address                string
	Protocol               string
	Enabled                bool
	MinTLSVersion          string
	DefaultCertificateID   *int64
	DefaultCertificateName string
	TrustedProxies         string
	PolicyIDs              []int64
	PolicyNames            []string
	CreatedAt              time.Time
	UpdatedAt              time.Time
}

type WebPolicy

type WebPolicy struct {
	ID                     int64
	Name                   string
	MaxBodyBytes           int64
	RequestTimeoutSeconds  int
	RateRequestsPerSecond  float64
	RateBurst              int
	RateKey                string
	RateMaxKeys            int
	RateIdleTimeoutSeconds int
	ConcurrencyMax         int
	CreatedAt              time.Time
	UpdatedAt              time.Time
}

type WebRoute

type WebRoute struct {
	ID                           int64
	HostID                       int64
	HostName                     string
	Name                         string
	Enabled                      bool
	Method                       string
	Path                         string
	HandlerType                  string
	UpstreamURL                  string
	Root                         string
	StripPrefix                  string
	ResponseStatus               int
	ResponseBody                 string
	RedirectLocation             string
	RedirectStatus               int
	WorkerScript                 string
	RequestTimeoutSeconds        int
	ResponseHeaderTimeoutSeconds int
	MaxConnsPerHost              int
	PolicyIDs                    []int64
	PolicyNames                  []string
	CreatedAt                    time.Time
	UpdatedAt                    time.Time
}

type Widget

type Widget struct {
	ID        int64     `json:"id"`
	Name      string    `json:"name"`
	Type      string    `json:"type"`
	Config    string    `json:"config"`
	SortOrder int       `json:"sort_order"`
	Enabled   bool      `json:"enabled"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type YeelightDevice

type YeelightDevice struct {
	ID        int64     `json:"id"`
	Name      string    `json:"name"`
	Host      string    `json:"host"`
	Port      int       `json:"port"`
	Status    string    `json:"status"` // online, offline
	LastSeen  time.Time `json:"last_seen"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	// contains filtered or unexported fields
}

YeelightDevice represents a Yeelight smart light

func (*YeelightDevice) GetYeelightDeviceState

func (d *YeelightDevice) GetYeelightDeviceState() (*YeelightState, error)

GetYeelightDeviceState retrieves the current state from the device

type YeelightState

type YeelightState struct {
	Power     string `json:"power"`
	Bright    int    `json:"bright"`
	CT        int    `json:"ct"`
	RGB       int    `json:"rgb"`
	Hue       int    `json:"hue"`
	Sat       int    `json:"sat"`
	ColorMode int    `json:"color_mode"`
	Name      string `json:"name"`
}

YeelightState represents the current state of a Yeelight device

Jump to

Keyboard shortcuts

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