pkg

package
v0.0.0-...-9d00342 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxDomainNameLength is the maximum length of a domain name
	MaxDomainNameLength int = 253
	// MaxSubdomainNameLength is the maximum length of an individual sub-domain
	MaxSubdomainNameLength int = 63
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DomainName

type DomainName struct {
	// contains filtered or unexported fields
}

DomainName represents a domain name

func NewDomainName

func NewDomainName() *DomainName

NewDomainName creates a new DomainName

func (*DomainName) AddSubDomain

func (dn *DomainName) AddSubDomain(subDomain string) error

AddSubDomain adds a sub-domain to the domain name

func (*DomainName) Copy

func (dn *DomainName) Copy() (*DomainName, error)

Copy creates a copy of the domain name

func (*DomainName) SetTopLevelDomain

func (dn *DomainName) SetTopLevelDomain(tld string) error

SetTopLevelDomain sets the top level domain

func (*DomainName) String

func (dn *DomainName) String() string

type InvalidDomainNameError

type InvalidDomainNameError struct {
	// contains filtered or unexported fields
}

InvalidDomainNameError is for errors related to invalid domain names

func (*InvalidDomainNameError) Error

func (err *InvalidDomainNameError) Error() string

type InvalidLabelError

type InvalidLabelError struct {
	// contains filtered or unexported fields
}

InvalidLabelError is for errors related to invalid labels

func (*InvalidLabelError) Error

func (err *InvalidLabelError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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