Documentation
¶
Index ¶
- type CatalogItem
- type CatalogItemStatus
- type Container
- type Dependency
- type DiscoverableService
- type ErrorResponse
- type JobRecord
- type JobStatus
- type LogEntry
- type Metrics
- type MetricsResponse
- type Plugin
- type PluginMetadata
- type PluginsResponse
- type PortInfo
- type RouteRecord
- type Stack
- type Status
- type SystemInfo
- type VPNLeakReport
- type VPNStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CatalogItem ¶
type CatalogItem struct {
Name string `json:"name"`
Kind string `json:"kind"`
Description string `json:"description"`
Version string `json:"version"`
Author string `json:"author"`
URL string `json:"url"`
ComposeURL string `json:"composeUrl,omitempty"`
Category string `json:"category,omitempty"`
Subcategory string `json:"subcategory,omitempty"`
Provider string `json:"provider,omitempty"`
Provides []string `json:"provides,omitempty"`
Requires []string `json:"requires,omitempty"`
DependsOn []string `json:"depends_on,omitempty"`
Dependencies []Dependency `json:"dependencies,omitempty"`
}
CatalogItem represents a plugin available in the remote official catalog.
type CatalogItemStatus ¶
type CatalogItemStatus struct {
CatalogItem
Installed bool `json:"installed"`
Status string `json:"status"` // "enabled", "disabled", "not_installed"
}
CatalogItemStatus wraps CatalogItem with its local installation state.
type Container ¶
type Container struct {
ID string `json:"id"`
Names []string `json:"names"`
Image string `json:"image"`
Status string `json:"status"`
State string `json:"state"`
CPU float64 `json:"cpu"`
Memory float64 `json:"memory"`
Labels map[string]string `json:"labels,omitempty"`
Ports []PortInfo `json:"ports,omitempty"`
Networks []string `json:"networks,omitempty"`
}
Container represents basic container information.
type Dependency ¶
type Dependency struct {
Name string `json:"name"`
Kind string `json:"kind"`
Required bool `json:"required"`
AutoInstall bool `json:"autoInstall"`
}
Dependency represents a plugin dependency.
type DiscoverableService ¶
type DiscoverableService struct {
ContainerID string `json:"container_id"`
ContainerName string `json:"container_name"`
Image string `json:"image"`
State string `json:"state"`
Ports []int `json:"ports"`
Networks []string `json:"networks"`
Exposed bool `json:"exposed"`
Domain string `json:"domain,omitempty"`
SSL bool `json:"ssl,omitempty"`
Middlewares []string `json:"middlewares,omitempty"`
}
DiscoverableService represents container proxy candidates.
type ErrorResponse ¶
type ErrorResponse struct {
Code string `json:"code"`
Message string `json:"message"`
Details any `json:"details,omitempty"`
}
ErrorResponse represents a standardized API error.
type JobRecord ¶
type JobRecord struct {
ID string `json:"id"`
Type string `json:"type"`
Priority int `json:"priority"`
Status JobStatus `json:"status"`
Payload map[string]any `json:"payload,omitempty"`
SubmittedAt time.Time `json:"submitted_at"`
StartedAt *time.Time `json:"started_at,omitempty"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
Result any `json:"result,omitempty"`
Error string `json:"error,omitempty"`
}
JobRecord represents the status and details of a job in the queue.
type LogEntry ¶
type LogEntry struct {
Logs string `json:"logs"`
}
LogEntry represents a container log response.
type Metrics ¶
type Metrics struct {
CPUUsage float64 `json:"cpu_usage"`
MemoryUsage float64 `json:"memory_usage"`
DiskUsage float64 `json:"disk_usage"`
}
Metrics represents system performance metrics.
type MetricsResponse ¶
type MetricsResponse struct {
CPUUsage float64 `json:"cpu_usage"`
MemoryUsage float64 `json:"memory_usage"`
DiskUsage float64 `json:"disk_usage"`
Uptime uint64 `json:"uptime"`
Hostname string `json:"hostname"`
}
MetricsResponse represents system metrics at a point in time.
type Plugin ¶
type Plugin struct {
APIVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Name string `json:"name,omitempty"`
Version string `json:"version,omitempty"`
Author string `json:"author,omitempty"`
Description string `json:"description,omitempty"`
Category string `json:"category,omitempty"`
Subcategory string `json:"subcategory,omitempty"`
Provider string `json:"provider,omitempty"`
Provides []string `json:"provides,omitempty"`
Requires []string `json:"requires,omitempty"`
DependsOn []string `json:"depends_on,omitempty"`
Dependencies []Dependency `json:"dependencies,omitempty"`
Metadata PluginMetadata `json:"metadata"`
Enabled bool `json:"enabled"`
Warnings []string `json:"warnings,omitempty"`
}
Plugin represents a loaded plugin manifest returned by the API.
type PluginMetadata ¶
type PluginMetadata struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Version string `json:"version,omitempty"`
Author string `json:"author,omitempty"`
Provides []string `json:"provides,omitempty"`
Requires []string `json:"requires,omitempty"`
DependsOn []string `json:"depends_on,omitempty"`
}
PluginMetadata contains descriptive information about a plugin.
type PluginsResponse ¶
type PluginsResponse struct {
Summary map[string]any `json:"summary"`
Routes []Plugin `json:"routes"`
Stacks []Plugin `json:"stacks"`
Middleware []Plugin `json:"middleware"`
}
PluginsResponse represents the response body of GET /api/v2/plugins.
type PortInfo ¶
type PortInfo struct {
IP string `json:"ip,omitempty"`
PrivatePort int `json:"private_port"`
PublicPort int `json:"public_port,omitempty"`
Type string `json:"type"`
}
PortInfo represents container port mapping info.
type RouteRecord ¶
type RouteRecord struct {
ID int64 `json:"id"`
Service string `json:"service"`
Domain string `json:"domain"`
Port int `json:"port"`
Entrypoints string `json:"entrypoints"`
Stack string `json:"stack,omitempty"`
SSL bool `json:"ssl"`
Middlewares string `json:"middlewares,omitempty"`
CreatedAt string `json:"created_at"`
}
RouteRecord is a stored route mapping.
type Stack ¶
type Stack struct {
Name string `json:"name"`
ComposePath string `json:"compose_path"`
Services []string `json:"services,omitempty"`
Status string `json:"status"`
}
Stack represents compose stack information.
type Status ¶
type Status struct {
Status string `json:"status"`
Components map[string]string `json:"components"`
Details map[string]string `json:"details,omitempty"`
}
Status represents the health status of system components.
type SystemInfo ¶
SystemInfo represents basic system information.
type VPNLeakReport ¶
type VPNLeakReport struct {
Leak bool `json:"leak"`
HostIP string `json:"host_ip"`
VPNIP string `json:"vpn_ip"`
StoppedContainers []string `json:"stopped_containers,omitempty"`
}
VPNLeakReport represents the check result of VPN leak check.
type VPNStatus ¶
type VPNStatus struct {
Connected bool `json:"connected"`
Provider string `json:"provider"`
ExternalIP string `json:"external_ip"`
Region string `json:"region"`
ForwardedPort int `json:"forwarded_port,omitempty"`
StatusText string `json:"status_text"`
}
VPNStatus represents the current state of Gluetun VPN connection.