Files
Mirror-Proxy/internal/models/models.go
T
Agent 9223e35164
Build and Push to GHCR / build-and-push (push) Has been cancelled
feat: init mirror-proxy project
- Docker Hub / GHCR / GitHub reverse proxy
- Web admin panel with link management
- Dynamic admin path, user and password config
- Rate limiting per link (dual/single auth mode)
- Docker and docker-compose deployment support
- GitHub Actions workflow for auto-publish to GHCR
2026-05-24 15:27:45 +08:00

29 lines
790 B
Go

package models
import "time"
type ProxyRequest struct {
ID string `json:"id"`
LinkID string `json:"link_id"`
URL string `json:"url"`
Method string `json:"method"`
Status int `json:"status"`
Bytes int64 `json:"bytes"`
Duration int64 `json:"duration_ms"`
ClientIP string `json:"client_ip"`
CreatedAt time.Time `json:"created_at"`
}
type Stats struct {
TotalRequests int64 `json:"total_requests"`
TotalBytes int64 `json:"total_bytes"`
LinkStats map[string]*LinkStat `json:"link_stats"`
}
type LinkStat struct {
LinkID string `json:"link_id"`
RequestCount int64 `json:"request_count"`
BytesTransferred int64 `json:"bytes_transferred"`
LastAccess int64 `json:"last_access"`
}