doh

package
Version: v1.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleJSON

func HandleJSON(handle func(*dns.Msg) *dns.Msg) func(http.ResponseWriter, *http.Request)

HandleJSON handle json format

func HandleWireFormat

func HandleWireFormat(handle func(*dns.Msg) *dns.Msg) func(http.ResponseWriter, *http.Request)

HandleWireFormat handle wire format

func ParseQTYPE

func ParseQTYPE(s string) uint16

ParseQTYPE function

Types

type Msg

type Msg struct {
	Status    int
	TC        bool
	RD        bool
	RA        bool
	AD        bool
	CD        bool
	Question  []Question
	Answer    []RR `json:",omitempty"`
	Authority []RR `json:",omitempty"`
}

Msg struct

func NewMsg

func NewMsg(m *dns.Msg) *Msg

NewMsg function

type Question

type Question struct {
	Name   string `json:"name"`
	Qtype  uint16 `json:"type"`
	Qclass uint16 `json:"-"`
}

Question struct

type RR

type RR struct {
	Name string `json:"name"`
	Type uint16 `json:"type"`
	TTL  uint32 `json:"TTL"`
	Data string `json:"data"`
}

RR struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto