googledns

package module
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

README

googledns

Go Report Card

Documentation

Index

Constants

View Source
const GOOGLE_DNS_API = "https://dns.google.com/resolve"

Variables

This section is empty.

Functions

This section is empty.

Types

type Answer

type Answer struct {
	Name string
	Type uint16
	TTL  uint32
	Data string
}

func (Answer) ToRR

func (a Answer) ToRR() (rr dns.RR, ts string, err error)

type Gdns

type Gdns struct {
	// contains filtered or unexported fields
}

Gdns is the api for googledns

func New

func New() *Gdns

New constructs a new Gdns

func (*Gdns) Query

func (g *Gdns) Query(q dns.Question) (answers []dns.RR, err error)

Query calls the google api for a dns query

type Question

type Question struct {
	Name string
	Type uint16
}

type Response

type Response struct {
	Status   uint32
	TC       bool
	RD       bool
	RA       bool
	AD       bool
	CD       bool
	Question []Question
	Answer   []Answer
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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