domain

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IncompleteTLDs = []string{}/* 130 elements not displayed */

Functions

This section is empty.

Types

type Command added in v0.3.0

type Command struct {
	DomainName string `arg:"" name:"domain" help:"top-level domain name to look up"`
	ServerAddr string `name:"server" short:"s" help:"use <server> as specific whois server"`
}

func (*Command) Run added in v0.3.0

func (d *Command) Run(globals *spiry.Command) (err error)

type Domain added in v0.3.0

type Domain struct {
	WhoisServer string
	// contains filtered or unexported fields
}

func New

func New(name string) (*Domain, error)

func (*Domain) Expiry added in v0.3.0

func (d *Domain) Expiry() (ex time.Time, err error)

Expiry returns the expiration date of a given fully-qualified domain name according to public DNS records. It returns a time.Time value if successful, otherwise it will return any errors encountered.

func (*Domain) Name added in v0.3.0

func (d *Domain) Name() string

func (*Domain) Root added in v0.3.0

func (d *Domain) Root() (string, error)

Root returns the root domain (example.com, example.net, etc.) of a given fully-qualified domain name. It returns a String if successful, otherwise it will return an empty String and any errors encountered.

func (*Domain) TLD added in v0.3.0

func (d *Domain) TLD() (string, error)

TLD returns the top-level domain (.com, .net, etc.) of a given fully-qualified domain name according to the semi-canonical list maintained at https://publicsuffix.org/. It returns a String if successful, otherwise it will return an empty String and any errors encountered.

Jump to

Keyboard shortcuts

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