utils

package
v0.0.0-...-6c087f3 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDomainTooLong          = errors.New("domain name is too long")
	ErrDomainLabelTooLong     = errors.New("domain label is too long")
	ErrDomainInvalidCharacter = errors.New("domain name has invalid character")
	ErrDomainTLDMissing       = errors.New("domain has missing top level domain")
)

Functions

func BodyToSingleLine

func BodyToSingleLine(body io.Reader) (s string)

func BuildDomainName

func BuildDomainName(owner, domain string) string

func BuildURLQueryHostname

func BuildURLQueryHostname(owner, domain string) string

func CheckDomain

func CheckDomain(domainString string) (err error)

CheckDomain returns an non-nil error if the domain name is not valid. https://tools.ietf.org/html/rfc1034#section-3.5 https://tools.ietf.org/html/rfc1123#section-2.

func ToSingleLine

func ToSingleLine(s string) (line string)

func ToString

func ToString(domain, owner string, provider models.Provider, ipVersion ipversion.IPVersion) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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