mirror of
https://github.com/Pacerino/CaddyProxyManager.git
synced 2026-08-01 01:48:36 -04:00
24 lines
485 B
Go
24 lines
485 B
Go
package database
|
|
|
|
import "gorm.io/gorm"
|
|
|
|
type Host struct {
|
|
gorm.Model
|
|
Domains string `json:"domains" validate:"required,fqdn|hostname_port"`
|
|
Matcher string `json:"matcher"`
|
|
Upstreams []Upstream
|
|
}
|
|
|
|
type Upstream struct {
|
|
gorm.Model
|
|
HostID uint `json:"hostId"`
|
|
Backend string `json:"backend" validate:"required,hostname_port"`
|
|
}
|
|
|
|
type User struct {
|
|
gorm.Model
|
|
Name string `validate:"required"`
|
|
Email string `gorm:"unique" validate:"required,email"`
|
|
Secret string
|
|
}
|