Documentation ¶
Index ¶
- func FormatLine(lengths []int, fields []string) string
- func LabelLess(a, b string) bool
- func MostCommonTTL(records models.Records) uint32
- func WriteZoneFileRC(w io.Writer, records models.Records, origin string, defaultTTL uint32, ...) error
- func WriteZoneFileRR(w io.Writer, records []dns.RR, origin string) error
- type ZoneGenData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatLine ¶ added in v3.18.1
FormatLine formats a zonefile line.
func LabelLess ¶ added in v3.24.0
LabelLess provides a "Less" function for two labels as needed for sorting. It sorts labels in prefix order, to make output pretty.
func MostCommonTTL ¶
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.
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)
Click to show internal directories.
Click to hide internal directories.