source

package
v0.0.0-...-a1cd0b2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: MIT Imports: 8 Imported by: 6

Documentation

Index

Constants

View Source
const (
	DNSSource       = "dns"
	GoDaddySource   = "gds"
	NameCheapSource = "ncs"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DNS

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

DNS handles checking availablility of domain names via DNS

func (*DNS) IsAvailable

func (dns *DNS) IsAvailable(domain string) (_ bool, err error)

IsAvailable checks if a domain is available

type DNSConfig

type DNSConfig struct {
	Enabled bool
}

DNSConfig holds the configuration for the DNS source

type GoDaddy

type GoDaddy struct {
	Source
	// contains filtered or unexported fields
}

GoDaddy handles godaddy.com API requests

func (*GoDaddy) IsAvailable

func (gd *GoDaddy) IsAvailable(domain string) (bool, error)

IsAvailable checks if a domain is available

type GoDaddyConfig

type GoDaddyConfig struct {
	Key     string
	Secret  string
	Enabled bool
}

GoDaddyConfig holds the configuration for the namecheap.com source

type NameCheap

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

NameCheap handles namecheap.com API requests

func (*NameCheap) IsAvailable

func (nc *NameCheap) IsAvailable(domain string) (bool, error)

IsAvailable checks if a domain is available

type NameCheapConfig

type NameCheapConfig struct {
	APIUser  string
	APIToken string
	UserName string
	Enabled  bool
}

NameCheapConfig holds the configuration for the namecheap.com source

type Source

type Source interface {
	IsAvailable(string) (bool, error)
}

Source is the interface for domain search sources

func Get

func Get(config interface{}, sourceType string) Source

Get returns a search source

func NewDNS

func NewDNS(config *DNSConfig) Source

NewDNS returns a new DNS instance

func NewGoDaddy

func NewGoDaddy(config *GoDaddyConfig) Source

NewGoDaddy returns a new GoDaddy instance

func NewNameCheap

func NewNameCheap(config *NameCheapConfig) Source

NewNameCheap returns a new NameCheap instance

Jump to

Keyboard shortcuts

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