aboutsummaryrefslogtreecommitdiff
path: root/models/dns/cname.go
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-03-08 17:00:49 +0530
committerBobby <[email protected]>2026-03-08 17:00:49 +0530
commit2d5fb5e2078e92e7ec19582c3954409dd93f89fd (patch)
tree932f96385d56c94596cb2bb073f0f72b13d3eee4 /models/dns/cname.go
parent0f254730178c9b0d9b171fef49993071a4b6a0f1 (diff)
downloaddove-2d5fb5e2078e92e7ec19582c3954409dd93f89fd.tar.xz
dove-2d5fb5e2078e92e7ec19582c3954409dd93f89fd.zip
feat(dns): Implement DNS record management and query handling
- Added models for various DNS record types: A, AAAA, CNAME, MX, SRV, and TXT. - Created repository functions for CRUD operations on DNS records. - Developed DNS server functionality to handle incoming queries and forward them to upstream servers. - Implemented local resolution for DNS queries, including support for A, AAAA, CNAME, MX, TXT, and SRV records. - Enhanced SMTP server to support TLS and STARTTLS configurations. - Improved email session handling with local delivery and error logging. - Added new log messages for better traceability of DNS operations and SMTP actions.
Diffstat (limited to 'models/dns/cname.go')
-rw-r--r--models/dns/cname.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/models/dns/cname.go b/models/dns/cname.go
new file mode 100644
index 0000000..5460f82
--- /dev/null
+++ b/models/dns/cname.go
@@ -0,0 +1,13 @@
+package dns
+
+import (
+ "gorm.io/gorm"
+)
+
+type CNAMERecord struct {
+ gorm.Model
+ DomainID uint `gorm:"not null;index" json:"domain_id"`
+ Name string `gorm:"not null" json:"name"`
+ Target string `gorm:"not null" json:"target"`
+ TTL uint32 `gorm:"not null;default:300" json:"ttl"`
+}