Files
Charon/backend/internal/models/proxy_host.go
Wikid82 e6f8b15e05 fix: remove duplicate type declarations and update package-lock
- Remove duplicate CaddyConfig in proxy_host.go (exists in caddy_config.go)
- Remove duplicate HealthHandler in proxy_host_handler.go
- Fix version variable names in health_handler.go (SemVer→Version, BuildDate→BuildTime)
- Update frontend package-lock.json to sync with package.json dependencies
- Backend now compiles successfully (1 test fails but will be fixed later)
2025-11-19 09:50:06 -05:00

22 lines
782 B
Go

package models
import (
"time"
)
// ProxyHost represents a reverse proxy configuration for a single domain.
type ProxyHost struct {
ID uint `json:"id" gorm:"primaryKey"`
UUID string `json:"uuid" gorm:"uniqueIndex"`
Name string `json:"name"`
Domain string `json:"domain" gorm:"uniqueIndex"`
TargetScheme string `json:"target_scheme"` // http/https
TargetHost string `json:"target_host"`
TargetPort int `json:"target_port"`
EnableTLS bool `json:"enable_tls" gorm:"default:false"`
EnableWS bool `json:"enable_websockets" gorm:"default:false"`
Enabled bool `json:"enabled" gorm:"default:true"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}