output

package
v0.19.12 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FormatPretty = "pretty"
	FormatColumn = "column"
	FormatJSON   = "json"
	FormatYAML   = "yaml"
	FormatRAW    = "raw"
)

Functions

This section is empty.

Types

type Entry added in v0.16.0

type Entry struct {
	Queries []dns.Msg
	Replies []*dns.Msg
	Server  string

	// Time is the total time it took to query this server
	Time time.Duration

	PTRs map[string]string `json:"-"` // IP -> PTR value
	// contains filtered or unexported fields
}

Entry stores the replies from a server

func (*Entry) LoadPTRs added in v0.16.0

func (e *Entry) LoadPTRs(txp *transport.Transport)

LoadPTRs populates an entry's PTRs map with PTR values for all A/AAAA records

type Printer

type Printer struct {
	Out  io.Writer
	Opts *cli.Flags
	// contains filtered or unexported fields
}

Printer stores global options across multiple entries

func (Printer) PrettyPrintNSID added in v0.16.0

func (p Printer) PrettyPrintNSID(entries []*Entry, printPrefix bool)

PrettyPrintNSID prints the NSID from a slice of entries

func (Printer) PrintColumn added in v0.16.0

func (p Printer) PrintColumn(entries []*Entry)

PrintColumn prints an entry slice in column format

func (Printer) PrintPretty

func (p Printer) PrintPretty(entries []*Entry)

func (Printer) PrintRaw

func (p Printer) PrintRaw(entries []*Entry)

PrintRaw a slice of entries in raw (dig-style) format

func (Printer) PrintStructured

func (p Printer) PrintStructured(entries []*Entry)

type RR added in v0.16.0

type RR struct {
	Name, TTL, Type, Value string
}

Jump to

Keyboard shortcuts

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