app

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: GPL-3.0 Imports: 13 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.

Jump to

Keyboard shortcuts

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