README ¶ dns-json-go DNS JSON parser dns to json msg := new(dns.Msg) ... dnsMsg := &DNSMsg{msg} jsonByte, _ := dnsMsg.DNS2JSON() log.Println(string(jsonByte)) json to dns jsonByte = ... ... jsonMsg := &jsondns.JSONMsg{} json.Unmarshal(jsonByte, jsonMsg) log.Println(jsonMsg) Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type DNSMsg func (msg *DNSMsg) DNS2JSON() ([]byte, error) func (msg *DNSMsg) JSON2DNS(jsonMsg *jsondns.JSONMsg, udpSize uint16, ednsClientNetmask uint8) (reply *dns.Msg, err error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type DNSMsg ¶ type DNSMsg struct { *dns.Msg } DNSMsg is contains dns.Msg func (*DNSMsg) DNS2JSON ¶ func (msg *DNSMsg) DNS2JSON() ([]byte, error) DNS2JSON is a function dns message to json func (*DNSMsg) JSON2DNS ¶ func (msg *DNSMsg) JSON2DNS(jsonMsg *jsondns.JSONMsg, udpSize uint16, ednsClientNetmask uint8) (reply *dns.Msg, err error) JSON2DNS is a function json to dns message Source Files ¶ View all Source files dnsMsg.go Directories ¶ Show internal Expand all Path Synopsis jsondns Click to show internal directories. Click to hide internal directories.