summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--generate_dns_types.go22
1 files changed, 13 insertions, 9 deletions
diff --git a/generate_dns_types.go b/generate_dns_types.go
index 4e90693..8c08945 100644
--- a/generate_dns_types.go
+++ b/generate_dns_types.go
@@ -14,6 +14,9 @@ import (
14 "golang.org/x/tools/go/packages" 14 "golang.org/x/tools/go/packages"
15) 15)
16 16
17// TODO: Also extract the body of the String() method and remove the
18// `rr.Hdr.String() + ` prefix in the return statement so it can be used
19// in a Value() method. Detect if anything is more complex than that.
17type Field struct { 20type Field struct {
18 Name string 21 Name string
19 Type string 22 Type string
@@ -101,16 +104,17 @@ func FromDNS(rr dns.RR) interface{} {
101} 104}
102`)) 105`))
103 106
107// TODO: support the alises by looking for a single embedded type
104var disallowedTypes = map[string]bool{ 108var disallowedTypes = map[string]bool{
105 "CDNSKEY": true, 109 "CDNSKEY": true, // Alias for DNSKEY
106 "CDS": true, 110 "CDS": true, // Alias for DS
107 "DLV": true, 111 "DLV": true, // Alias for DS
108 "KEY": true, 112 "KEY": true, // Alias for DNSKEY
109 "OPT": true, 113 "SIG": true, // Alias for RRSIG
110 "SIG": true, 114 "OPT": true, // []EDNS0
111 "PrivateRR": true, 115 "PrivateRR": true, // For testing new RRTypes
112 "RFC3597": true, 116 "RFC3597": true, // Unknown/generic rdata
113 "ANY": true, 117 "ANY": true, // No rdata
114} 118}
115 119
116var allowedPackages = map[string]bool{ 120var allowedPackages = map[string]bool{