doh

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleJSON added in v0.2.3

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

HandleJSON handle json format

func HandleWireFormat added in v0.2.3

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

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
y or Y : Canonical URL