docs: unify header to import path for package docs

This commit is contained in:
yusing
2026-02-18 03:25:32 +08:00
parent 7baf0b6fe5
commit 20695c52e8
47 changed files with 56 additions and 70 deletions

View File

@@ -1,4 +1,4 @@
# ACL (Access Control List)
# internal/acl
Access control at the TCP connection level with IP/CIDR, timezone, and country-based filtering.

View File

@@ -1,4 +1,4 @@
# Agent Pool
# internal/agentpool
Thread-safe pool for managing remote Docker agent connections.

View File

@@ -1,4 +1,4 @@
# API v1 Package
# internal/api/v1
Implements the v1 REST API handlers for GoDoxy, exposing endpoints for managing routes, Docker containers, certificates, metrics, and system configuration.

View File

@@ -1,4 +1,4 @@
# Authentication
# internal/auth
Authentication providers supporting OIDC and username/password authentication with JWT-based sessions.

View File

@@ -1,4 +1,4 @@
# Autocert Package
# internal/autocert
Automated SSL certificate management using the ACME protocol (Let's Encrypt and compatible CAs).

View File

@@ -1,4 +1,4 @@
# Configuration Management
# internal/config
Centralized YAML configuration management with thread-safe state access and provider initialization.

View File

@@ -1,4 +1,4 @@
# Configuration Query
# internal/config/query
Read-only access to the active configuration state, including route providers and system statistics.
@@ -149,7 +149,7 @@ No metrics are currently exposed.
## Performance Characteristics
- O(n) where n is number of providers for provider queries
- O(n * m) where m is routes per provider for route search
- O(n \* m) where m is routes per provider for route search
- O(n) for statistics aggregation
- No locking required (uses atomic load)

View File

@@ -1,4 +1,4 @@
# DNS Providers
# internal/dnsproviders
DNS provider integrations for Let's Encrypt certificate management via the lego library.

View File

@@ -1,4 +1,4 @@
# Docker Integration
# internal/docker
Docker container discovery, connection management, and label-based route configuration.

View File

@@ -1,4 +1,4 @@
# Entrypoint
# internal/entrypoint
The entrypoint package provides the main HTTP entry point for GoDoxy, handling domain-based routing, middleware application, short link matching, access logging, and HTTP server lifecycle management.

View File

@@ -1,4 +1,4 @@
# Health Check Package
# internal/health/check
Low-level health check implementations for different protocols and services in GoDoxy.

View File

@@ -1,4 +1,4 @@
# Health Monitor Package
# internal/health/monitor
Route health monitoring with configurable check intervals, retry policies, and notification integration.

View File

@@ -1,4 +1,4 @@
# Homepage
# internal/homepage
The homepage package provides the GoDoxy WebUI dashboard with support for categories, favorites, widgets, dynamic item configuration, and icon management.

View File

@@ -1,4 +1,4 @@
# Icons Package
# internal/homepage/icons
Icon URL parsing, fetching, and listing for the homepage dashboard.

View File

@@ -1,4 +1,4 @@
# qBittorrent Integration Package
# internal/homepage/integrations/qbittorrent
This package provides a qBittorrent widget for the GoDoxy homepage dashboard, enabling real-time monitoring of torrent status and transfer statistics.

View File

@@ -1,13 +0,0 @@
# Types Package
Configuration types for the homepage package.
## Config
```go
type Config struct {
UseDefaultCategories bool `json:"use_default_categories"`
}
var ActiveConfig atomic.Pointer[Config]
```

View File

@@ -1,4 +1,4 @@
# Homepage Widgets Package
# internal/homepage/widgets
> [!WARNING]
>

View File

@@ -1,4 +1,4 @@
# Idlewatcher
# internal/idlewatcher
Manages container lifecycle based on idle timeout, automatically stopping/pausing containers and waking them on request.

View File

@@ -1,4 +1,4 @@
# Idlewatcher Provider
# internal/idlewatcher/provider
Implements container runtime abstractions for Docker and Proxmox LXC backends.

View File

@@ -1,4 +1,4 @@
# JSON Store
# internal/jsonstore
The jsonstore package provides persistent JSON storage with namespace support, using thread-safe concurrent maps and automatic loading/saving.

View File

@@ -1,4 +1,4 @@
# Logging Package
# internal/logging
Structured logging capabilities for GoDoxy, including application logging, HTTP access logging, and in-memory log streaming.

View File

@@ -1,4 +1,4 @@
# Access Logging
# internal/logging/accesslog
Provides HTTP access logging with file rotation, log filtering, and multiple output formats for request and ACL event logging.

View File

@@ -1,4 +1,4 @@
# In-Memory Logger
# internal/logging/memlogger
Provides a thread-safe in-memory circular buffer logger with WebSocket-based real-time streaming for log data.

View File

@@ -1,4 +1,4 @@
# MaxMind
# internal/maxmind
The maxmind package provides MaxMind GeoIP database integration for IP geolocation, including automatic database downloading and updates.

View File

@@ -1,4 +1,4 @@
# Metrics Package
# internal/metrics
System monitoring and metrics collection for GoDoxy with time-series storage and REST/WebSocket APIs.

View File

@@ -1,4 +1,4 @@
# Period Metrics
# internal/metrics/period
Provides time-bucketed metrics storage with configurable periods, enabling historical data aggregation and real-time streaming.
@@ -453,7 +453,7 @@ for {
- O(1) add to circular buffer
- O(1) get (returns slice view)
- O(n) serialization where n = total entries
- Memory: O(5 * 100 * sizeof(T)) = fixed overhead
- Memory: O(5 _ 100 _ sizeof(T)) = fixed overhead
- JSON load/save: O(n) where n = total entries
## Testing Notes

View File

@@ -1,4 +1,4 @@
# System Info
# internal/metrics/systeminfo
Collects and aggregates system metrics including CPU, memory, disk, network, and sensor data with configurable aggregation modes.
@@ -367,7 +367,7 @@ curl "http://localhost:8080/api/metrics/system?period=1h&aggregate=disks_read_sp
```javascript
const ws = new WebSocket(
"ws://localhost:8080/api/metrics/system?period=1m&interval=5s&aggregate=cpu_average"
"ws://localhost:8080/api/metrics/system?period=1m&interval=5s&aggregate=cpu_average",
);
ws.onmessage = (event) => {

View File

@@ -1,4 +1,4 @@
# Uptime
# internal/metrics/uptime
Tracks and aggregates route health status over time, providing uptime/downtime statistics and latency metrics.

View File

@@ -1,4 +1,4 @@
# Network Utilities
# internal/net
The net package provides network utility functions for GoDoxy, including TCP connection testing and network-related helpers.

View File

@@ -1,4 +1,4 @@
# gphttp
# internal/net/gphttp
HTTP utilities package providing transport configuration, default HTTP client, and a wrapper around `http.ServeMux` with panic recovery.

View File

@@ -1,4 +1,4 @@
# Load Balancer
# internal/net/gphttp/loadbalancer
Load balancing package providing multiple distribution algorithms, sticky sessions, and server health management.

View File

@@ -1,4 +1,4 @@
# Middleware
# internal/net/gphttp/middleware
HTTP middleware framework providing request/response processing, middleware chaining, and composition from YAML files.

View File

@@ -1,4 +1,4 @@
# Captcha Middleware
# internal/net/gphttp/middleware/captcha
CAPTCHA verification middleware package providing session-based captcha challenge and verification.

View File

@@ -1,4 +1,4 @@
# Error Page Middleware
# internal/net/gphttp/middleware/errorpage
Custom error page serving middleware that replaces default HTTP error responses with styled custom pages.
@@ -233,16 +233,16 @@ flowchart TD
```html
<!DOCTYPE html>
<html>
<head>
<head>
<title>Service Unavailable</title>
<link rel="stylesheet" href="/$gperrorpage/style.css">
</head>
<body>
<link rel="stylesheet" href="/$gperrorpage/style.css" />
</head>
<body>
<div class="error-container">
<h1>503 - Service Unavailable</h1>
<p>The service is temporarily unavailable. Please try again later.</p>
<h1>503 - Service Unavailable</h1>
<p>The service is temporarily unavailable. Please try again later.</p>
</div>
</body>
</body>
</html>
```

View File

@@ -1,4 +1,4 @@
# Notifications
# internal/notif
The notif package provides a notification dispatching system for GoDoxy, supporting multiple providers (Webhook, Gotify, Ntfy) with retry logic and exponential backoff.

View File

@@ -1,4 +1,4 @@
# Proxmox
# internal/proxmox
The proxmox package provides Proxmox VE integration for GoDoxy, enabling management of Proxmox LXC containers.

View File

@@ -1,4 +1,4 @@
# Route
# internal/route
Provides HTTP routing, reverse proxy, file serving, and TCP/UDP stream proxying for GoDoxy.

View File

@@ -1,4 +1,4 @@
# Route Provider
# internal/route/provider
Discovers and loads routes from Docker containers, YAML files, and remote agents.

View File

@@ -1,4 +1,4 @@
# Route Rules
# internal/route/rules
Implements a rule engine for HTTP request/response processing, enabling conditional routing, header manipulation, authentication, and more.

View File

@@ -1,4 +1,4 @@
# Rule Presets
# internal/route/rules/presets
Provides embedded, pre-configured rule sets for common routing patterns.

View File

@@ -1,4 +1,4 @@
# Stream Handling
# internal/route/stream
Implements TCP and UDP stream proxying for non-HTTP protocols.

View File

@@ -1,4 +1,4 @@
# Serialization Package
# internal/serialization
Flexible, type-safe serialization/deserialization with validation support for GoDoxy configuration.

View File

@@ -1,4 +1,4 @@
# Watcher
# internal/watcher
Provides file and Docker event watching capabilities for GoDoxy, enabling dynamic configuration updates.