swagger done
This commit is contained in:
@@ -5,11 +5,11 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Domain domain data structure
|
||||
type Domain struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
DomainName string `gorm:"unique,not null,size:255" json:"domain_name"`
|
||||
|
||||
//SOA Info
|
||||
MainDNS string `gorm:"not null;size:255" json:"main_dns"`
|
||||
AdminEmail string `gorm:"not null;size:255" json:"admin_email"`
|
||||
SerialNumber int64 `gorm:"not null;default:1" json:"serial_number"`
|
||||
|
@@ -24,11 +24,13 @@ type recordContentTypes interface {
|
||||
ARecord | AAAARecord | CNAMERecord | CAARecord | NSRecord | MXRecord | SOARecord | SRVRecord | TXTRecord | RecordContentDefault
|
||||
}
|
||||
|
||||
// Record dns records for coredns mysql plugin
|
||||
type Record[T recordContentTypes] struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
Zone string `gorm:"not null;size:255" json:"zone"`
|
||||
Name string `gorm:"not null;size:255" json:"name"`
|
||||
Ttl int `json:"ttl"`
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
Zone string `gorm:"not null;size:255" json:"zone"`
|
||||
Name string `gorm:"not null;size:255" json:"name"`
|
||||
Ttl int `json:"ttl"`
|
||||
// see https://github.com/cloud66-oss/coredns_mysql/blob/main/types.go for content
|
||||
Content T `gorm:"serializer:json;type:text" json:"content"`
|
||||
RecordType string `gorm:"not null;size:255" json:"record_type"`
|
||||
}
|
||||
|
@@ -10,6 +10,7 @@ const (
|
||||
SettingsKeyDNSServer = "dns.servers"
|
||||
)
|
||||
|
||||
// Settings settings for this app
|
||||
type Settings struct {
|
||||
ID uint `gorm:"primaryKey"`
|
||||
Key string `gorm:"unique;not null;size:255"`
|
||||
|
Reference in New Issue
Block a user