mirror of
https://github.com/miekg/dns.git
synced 2025-10-17 21:01:00 +02:00
More zone updates
This commit is contained in:
parent
00ddf6551c
commit
6e31effe78
6
zone.go
6
zone.go
@ -6,11 +6,16 @@ import (
|
||||
"github.com/sauerbraten/radix"
|
||||
)
|
||||
|
||||
// Zone represents a DNS zone.
|
||||
type Zone struct {
|
||||
Name string // Name of the zone
|
||||
*radix.Radix // Zone data
|
||||
|
||||
// soa parameters in here TODO(mg)
|
||||
}
|
||||
|
||||
// ZoneData holds all the RR belonging to Name.
|
||||
// TODO(mg): uitbreiden
|
||||
type ZoneData struct {
|
||||
Name string // Domain name for this node
|
||||
RR map[uint16][]RR // Map of the RR type to the RR
|
||||
@ -26,6 +31,7 @@ func NewZone(name string) *Zone {
|
||||
return z
|
||||
}
|
||||
|
||||
// Insert inserts an RR into the zone. Overwrites.
|
||||
func (z *Zone) Insert(r RR) {
|
||||
zd := z.Radix.Find(r.Header().Name)
|
||||
if zd == nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user