Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EfficientToASCII ¶
func EfficientToUnicode ¶
Types ¶
type DomainNameVarieties ¶
type DomainNameVarieties struct {
NameRaw string // "originalinput.com" (name as input by the user (no tag))
NameASCII string // "punycode.com" (converted to punycode and downcase)
NameUnicode string // "unicode.com" (converted to unicode, ASCII portions downcased)
UniqueName string // "punycode.com!tag" (canonical unique name with tag)
Tag string // The tag portion of `example.com!tag`
HasBang bool // Was there a "!" in the input when creating this struct?
}
DomainNameVarieties stores the various forms of a domain name and tag.
func MakeDomainNameVarieties ¶
func MakeDomainNameVarieties(n string) *DomainNameVarieties
MakeDomainNameVarieties turns the user-supplied name into the varioius forms. * .Tag: the domain tag (of "example.com!tag") * .NameRaw: how the user input the name in dnsconfig.js (no tag) * .NameASCII: punycode version, downcased * .NameUnicode: unicode version of the name, downcased. * .UniqueName: "example.com!tag" unique across the entire config.
type PermitList ¶
type PermitList struct {
// contains filtered or unexported fields
}
func CompilePermitList ¶
func CompilePermitList(s string) PermitList
CompilePermitList compiles a list of domain strings into a PermitList structure. The
func (*PermitList) Permitted ¶
func (pl *PermitList) Permitted(domToCheck string) bool
Click to show internal directories.
Click to hide internal directories.