Documentation ¶
Overview ¶
Package lib provides a library of commonly used functions for dns-tools
Index ¶
- func IsValidFQDN(fqdn string) error
- func IsValidIPv4(address string) error
- func IsValidIPv6(address string) error
- func IsValidTTL(ttl int) error
- func Lookup(fqdn, rtype string) ([]string, error)
- func MakeFQDN(name, zone string) string
- func RDatasEqual(a, b []string) bool
- func TextToQuotedStrings(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidFQDN ¶
IsValidFQDN validates a string that contains a fully qualified domain name
func IsValidIPv4 ¶
IsValidIPv4 validates a string that contains an IPv4 address
func IsValidIPv6 ¶
IsValidIPv6 validates a string that contains an IPv6 address
func IsValidTTL ¶
IsValidTTL validates an integer for an acceptable DNS Time To Live value
func Lookup ¶
Lookup looks up a resource record and returns the associated data as a string slice. It is very fast but not very precise, e.g. with CNAME records and on some systems with NS records, the results my vary. Critics may even find a way to blame systemd for this ;) related: https://github.com/systemd/systemd/issues/5897
func RDatasEqual ¶
RDatasEqual compares two unsorted slices of resource record data and returns true if their contents are the same
func TextToQuotedStrings ¶
TextToQuotedStrings prepares a text for usage in a TXT record where space separated strings are quoted
Types ¶
This section is empty.