dns01

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultPropagationTimeout default propagation timeout.
	DefaultPropagationTimeout = 60 * time.Second

	// DefaultPollingInterval default polling interval.
	DefaultPollingInterval = 2 * time.Second

	// DefaultTTL default TTL.
	DefaultTTL = 120
)

Variables

This section is empty.

Functions

func CheckCNAMExistBaidu

func CheckCNAMExistBaidu(fqdn string) (uint16, string, error)

func ClearFqdnCache

func ClearFqdnCache()

ClearFqdnCache clears the cache of fqdn to zone mappings. Primarily used in testing.

func ExtractSubDomain

func ExtractSubDomain(domain, zone string) (string, error)

ExtractSubDomain extracts the subdomain part from a domain and a zone.

func FindPrimaryNsByFqdn

func FindPrimaryNsByFqdn(fqdn string) (string, error)

FindPrimaryNsByFqdn determines the primary nameserver of the zone apex for the given fqdn by recursing up the domain labels until the nameserver returns a SOA record in the answer section.

func FindPrimaryNsByFqdnCustom

func FindPrimaryNsByFqdnCustom(fqdn string, nameservers []string) (string, error)

FindPrimaryNsByFqdnCustom determines the primary nameserver of the zone apex for the given fqdn by recursing up the domain labels until the nameserver returns a SOA record in the answer section.

func FindZoneByFqdn

func FindZoneByFqdn(fqdn string) (string, error)

FindZoneByFqdn determines the zone apex for the given fqdn by recursing up the domain labels until the nameserver returns a SOA record in the answer section.

func FindZoneByFqdnCustom

func FindZoneByFqdnCustom(fqdn string, nameservers []string) (string, error)

FindZoneByFqdnCustom determines the zone apex for the given fqdn by recursing up the domain labels until the nameserver returns a SOA record in the answer section.

func ParseNameservers

func ParseNameservers(servers []string) []string

func ToFqdn

func ToFqdn(name string) string

ToFqdn converts the name into a fqdn appending a trailing dot.

func UnFqdn

func UnFqdn(name string) string

UnFqdn converts the fqdn into a name removing the trailing dot.

Types

type ChallengeInfo

type ChallengeInfo struct {
	// FQDN is the full-qualified challenge domain (i.e. `_acme-challenge.[domain].`)
	FQDN string

	// Value contains the value for the TXT record.
	Value string
}

ChallengeInfo contains the information use to create the TXT record.

func GetChallengeInfo

func GetChallengeInfo(domain string, value string) ChallengeInfo

type DNSError

type DNSError struct {
	Message string
	NS      string
	MsgIn   *dns.Msg
	MsgOut  *dns.Msg
	Err     error
}

DNSError error related to DNS calls.

func (*DNSError) Error

func (d *DNSError) Error() string

func (*DNSError) Unwrap

func (d *DNSError) Unwrap() error

Jump to

Keyboard shortcuts

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