package
0.0.0-20241102221056-eb2fa4d51d96
Repository: https://github.com/g0rbe/gmod.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
Clean removes the trailing dot and returns a lower cased version of d.
GetDomain returns the domain of d (eg.: sub.example.com -> example.com).
GetDomainIndex returns the index of the domain of d (eg.: sub.example.com -> 4).
GetParts returns the parts of d.
GetSub returns the Subdomain of the given domain d (eg.: eg.: sub.example.com -> example.com).
GetTLD returns the Top Level Domain of d (eg.: sub.exmaple.com -> com).
GetTLDIndex returns the index of the Top Level Domain in d (eg.: sub.example.com -> 12).
HasSub returns whether domain d has a subdomain.
IsDomain returns whether d is valid domain.
IsDomainPart returns whether d is valid domain part (eg.: subdomain part or Second Level Domain).
IsExists checks whether a record with type A, AAAA, TXT, CNAME, MX, NS, CAA or SRV is set for name.
IsSetA checks whether an A type record set for name using the DefaultServers.
IsSetAAAA checks whether an AAAA type record set for name using the DefaultServers.
IsSetCAA checks whether a CAA type record set for name using the DefaultServers.
IsSetCNAME checks whether an CNAME type record set for name using the DefaultServers.
IsSetCNAME checks whether an DNAME type record set for name using the DefaultServers.
IsSetMX checks whether an MX type record set for name using the DefaultServers.
IsSetNS checks whether an NS type record set for name using the DefaultServers.
IsSetSOA checks whether an SOA type record set for name using the DefaultServers.
IsSetSRV checks whether an SRV type record set for name using the DefaultServers.
IsSetTXT checks whether an TXT type record set for name using the DefaultServers.
IsValidSLD returns whether d is valid Second Level Domain.
IsWildcard uses the DefaultServers to check if name is a wildcard domain.
NewServer creates a new Server.
NewServersSlice creates a new Servers from srvs.
NewServersStr creates a new Servers from srvs.
NewServerStr creates a Server from string s.
Probe checks whether DNS protocol is available on network on ip:port.
QueryA ask a random server from DefaultServers and returns a slice of net.IP.
QueryAAAA ask a random server from DefaultServers and returns a slice of net.IP.
QueryAll query every known type and returns the records.
QueryCAA ask a random server from DefaultServers and returns a slice of CAA.
QueryCNAME ask a random server from DefaultServers and returns a slice of string.
QueryDNAME ask a random server from DefaultServers and returns the target of string.
QueryMX ask a random server from DefaultServers and returns a slice of MX.
QueryNS ask a random server from DefaultServers and returns a slice of string.
QuerySOA ask a random server from DefaultServers and returns a SOA struct pointer.
QuerySRV ask a random server from DefaultServers and returns a slice of SRV.
QueryTXT ask a random server from DefaultServers and returns a slice of string.
RcodeToError returns the error associated with the rcode.
TryQueryA asks the DefaultServers for type A.
TryQueryAAAA asks the DefaultServers for type A.
TryQueryCAA asks the DefaultServers for type CAA.
TryQueryCNAME asks the DefaultServers for type CNAME.
TryQueryDNAME asks the DefaultServers for type DNAME.
TryQueryMX asks the DefaultServers for type MX.
TryQueryNS asks the DefaultServers for type NS.
TryQuerySOA asks the DefaultServers for type SOA.
TryQuerySRV asks the DefaultServers for type SRV.
TryQueryTXT asks the DefaultServers for type TXT.
No description provided by the author
# Variables
DefaultMaxRetries is the default number of retries of failed queries.
DefaultQueryTimeoutSec is the default query timeout in seconds.
DefaultServers is the package default servers.
FORMERR.
No description provided by the author
NXDOMAIN.
NOERROR.
NOTIMP.
REFUSED.
SERVFAIL.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
See more: https://www.rfc-editor.org/rfc/rfc1035.html#section-3.3.13.
No description provided by the author