app

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Logger       *logrus.Logger
	Version      string
	QueryFlags   models.QueryFlags
	Questions    []dns.Question
	Resolvers    []resolvers.Resolver
	ResolverOpts resolvers.Options
	Nameservers  []models.Nameserver
}

App represents the structure for all app wide configuration.

func New

func New(logger *logrus.Logger, buildVersion string) App

NewApp initializes an instance of App which holds app wide configuration.

func (*App) LoadFallbacks

func (app *App) LoadFallbacks()

LoadFallbacks sets fallbacks for options that are not specified by the user but necessary for the resolver.

func (*App) LoadNameservers

func (app *App) LoadNameservers() error

LoadNameservers reads all the user given nameservers and loads to App.

func (*App) Output

func (app *App) Output(responses []resolvers.Response)

Output takes a list of `dns.Answers` and based on the output format specified displays the information.

func (*App) PrepareQuestions

func (app *App) PrepareQuestions()

PrepareQuestions takes a list of query names, query types and query classes and prepare a question for each combination of the above.

func (*App) ReverseLookup added in v0.4.1

func (app *App) ReverseLookup()

ReverseLookup is used to perform a reverse DNS Lookup using an IPv4 or IPv6 address. Query Type is set to PTR, Query Class is set to IN. Query Names must be formatted in in-addr.arpa. or ip6.arpa format.

Jump to

Keyboard shortcuts

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