feat: implement dns record model and zone checks

- feat: implement dns record model and zone checks
- feat: implement zone file import and export
This commit is contained in:
bryanpedini committed 2026-11-19 15:46:12 +01:00
1 parent 5ac8f98f10
commit 7ba68aba15
18 files changed
+2590 -21

No files matched your search

-18
View File
@@ -6,19 +6,9 @@ package main
import (
"database/sql"
"errors"
"strings"
"time"
)
type recordRow struct {
ID int64
Zone string
Name string
TTL sql.NullInt64
Content sql.NullString
RecordType string
}
type auditEntry struct {
ID int64
Time time.Time
@@ -38,11 +28,3 @@ type auditEntry struct {
func stubHashPassword(password string) (string, error) {
return "", errors.New("password hashing is not available")
}
func stubNormalizeZone(zone string) (string, error) {
zone = strings.ToLower(strings.TrimSuffix(zone, "."))
if zone == "" {
return "", errors.New("invalid zone")
}
return zone + ".", nil
}