Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToFqdnNoDot ¶
ToFqdnNoDot is the same as ToFqdnWithDot but the result does not include a trailing ".". Similar to DomainConfig.ToFqdnNoDot() but it takes origin from dc.Name.
func ToFqdnWithDot ¶
ToFqdnWithDot converts a shortname to a FQDN+".". ToFqdnWithDot("foo", "bar.com") = "foo.bar.com." // Typical use. ToFqdnWithDot("@", "bar.com") = "bar.com." // Apex returns the apex. ToFqdnWithDot("", "bar.com") = "bar.com." // Apex returns the apex. ToFqdnWithDot("foo.com."," "bar.com") = "foo.com." // FQDNs are unmodified. ToFqdnWithDot("foo", "bar.com.") = "foo.bar.com." // If origin ends with a ".", DTRT. Similar to DomainConfig.ToFqdnWithDot() but it takes origin from dc.Name.
func ToShort ¶
ToShort trims origin from name. If name is not below origin, name is returned unchanged. If the name was shortened, it does not end with a ".". If the name was untouched, it ends with a ".". Calling ToShort on a string that is already a shortname is unsupported. Names that do not end with "." are assumed to be FQDNs without a trailing ".". Similar to DomainConfig.ToShort() but you can specify the origin.
Types ¶
This section is empty.