prettyzone

package
v3.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MostCommonTTL

func MostCommonTTL(records models.Records) uint32

MostCommonTTL returns the most common TTL in a set of records. If there is a tie, the highest TTL is selected. This makes the results consistent. NS records are not included in the analysis because Tom said so.

func WriteZoneFileRC

func WriteZoneFileRC(w io.Writer, records models.Records, origin string, defaultTTL uint32, comments []string) error

WriteZoneFileRC writes a beautifully formatted zone file.

func WriteZoneFileRR

func WriteZoneFileRR(w io.Writer, records []dns.RR, origin string) error

WriteZoneFileRR is a helper for when you have []dns.RR instead of models.Records

Types

type ZoneGenData

type ZoneGenData struct {
	Origin     string
	DefaultTTL uint32
	Records    models.Records
	Comments   []string
}

ZoneGenData is the configuration description for the zone generator.

func PrettySort

func PrettySort(records models.Records, origin string, defaultTTL uint32, comments []string) *ZoneGenData

PrettySort sorts the records in a pretty order.

func (*ZoneGenData) Len

func (z *ZoneGenData) Len() int

func (*ZoneGenData) Less

func (z *ZoneGenData) Less(i, j int) bool

func (*ZoneGenData) Swap

func (z *ZoneGenData) Swap(i, j int)

Jump to

Keyboard shortcuts

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