dns

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TypeA     = Type("A")
	TypeAAAA  = Type("AAAA")
	TypeCNAME = Type("CNAME")
	TypeMX    = Type("MX")
	TypeTXT   = Type("TXT")
	TypeSPF   = Type("SPF")
	TypeNS    = Type("NS")
	TypeSOA   = Type("SOA")
	TypePTR   = Type("PTR")
	TypeANY   = Type("ANY")
)

Supported dns query type

Functions

func Author

func Author() string

Author returns package author

func License

func License() string

License returns package license

func Version

func Version() string

Version returns package version

Types

type Answer

type Answer struct {
	Name string `json:"name"`
	Type int    `json:"type"`
	TTL  int    `json:"TTL"`
	Data string `json:"data"`
}

Answer is dns query answer

type Domain

type Domain string

Domain is dns query domain

func (Domain) Punycode

func (d Domain) Punycode() (string, error)

Punycode returns punycode of domain

type ECS

type ECS string

ECS is the edns0-client-subnet option, for example: 1.2.3.4/24

type Question

type Question struct {
	Name string `json:"name"`
	Type int    `json:"type"`
}

Question is dns query question

type Response

type Response struct {
	Status   int        `json:"Status"`
	TC       bool       `json:"TC"`
	RD       bool       `json:"RD"`
	RA       bool       `json:"RA"`
	AD       bool       `json:"AD"`
	CD       bool       `json:"CD"`
	Question []Question `json:"Question"`
	Answer   []Answer   `json:"Answer"`
	Provider string     `json:"provider"`
}

Response is dns query response

type Type

type Type string

Type is dns query type

Jump to

Keyboard shortcuts

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