domaintags

package
v4.28.2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EfficientToASCII

func EfficientToASCII(name string) string

func EfficientToUnicode

func EfficientToUnicode(name string) string

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

Jump to

Keyboard shortcuts

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