dns

package
v0.0.0-...-82c42da Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var QueryClassMap = map[string]uint16{
	"IN": dns.ClassINET,
}
View Source
var QueryTypeMap = map[string]uint16{
	"A":     dns.TypeA,
	"CNAME": dns.TypeCNAME,
	"MX":    dns.TypeMX,
	"NS":    dns.TypeNS,
	"SRV":   dns.TypeSRV,
	"TXT":   dns.TypeTXT,
}

Functions

This section is empty.

Types

type Query

type Query struct {
	ServerAddress string

	Recurse    bool
	QueryName  string
	QueryType  QueryType
	QueryClass QueryClass
}

func New

func New() *Query

func (*Query) Run

func (q *Query) Run() error

type QueryClass

type QueryClass string

func (*QueryClass) DNSClass

func (e *QueryClass) DNSClass() uint16

func (*QueryClass) Set

func (e *QueryClass) Set(v string) error

func (*QueryClass) String

func (e *QueryClass) String() string

func (*QueryClass) Type

func (e *QueryClass) Type() string

type QueryType

type QueryType string

func (*QueryType) DNSType

func (e *QueryType) DNSType() uint16

func (*QueryType) Set

func (e *QueryType) Set(v string) error

func (*QueryType) String

func (e *QueryType) String() string

func (*QueryType) Type

func (e *QueryType) Type() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL