registrar

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Domain

type Domain struct {
	Name         string          `json:"name"`
	Status       string          `json:"status"`
	Registrar    string          `json:"registrar"`
	RegisteredAt connection.Date `json:"registered_at"`
	UpdatedAt    connection.Date `json:"updated_at"`
	RenewalAt    connection.Date `json:"renewal_at"`
	AutoRenew    bool            `json:"auto_renew"`
	WHOISPrivacy bool            `json:"whois_privacy"`
}

Domain represents a UKFast domain

type DomainNotFoundError

type DomainNotFoundError struct {
	Name string
}

DomainNotFoundError indicates a domain was not found

func (*DomainNotFoundError) Error

func (e *DomainNotFoundError) Error() string

type Nameserver

type Nameserver struct {
	Host string               `json:"host"`
	IP   connection.IPAddress `json:"ip"`
}

Nameserver represents a nameserver

type Registrar

type Registrar struct {
	Name string `json:"name"`
	URL  string `json:"url"`
	Tag  string `json:"tag"`
}

Registrar represents registrar details

type RegistrarService

type RegistrarService interface {
	// Domains
	//
	GetDomains(parameters connection.APIRequestParameters) ([]Domain, error)
	GetDomainsPaginated(parameters connection.APIRequestParameters) (*connection.Paginated[Domain], error)
	GetDomain(domainName string) (Domain, error)
	GetDomainNameservers(domainName string) ([]Nameserver, error)

	// WHOIS
	//
	GetWhois(domainName string) (Whois, error)
	GetWhoisRaw(domainName string) (string, error)
}

RegistrarService is an interface for managing the registrar service

type Service

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

Service implements RegistrarService for managing registrar services via the UKFast API

func NewService

func NewService(connection connection.Connection) *Service

NewService returns a new instance of Service

func (*Service) GetDomain

func (s *Service) GetDomain(domainName string) (Domain, error)

GetDomain retrieves a single domain by name

func (*Service) GetDomainNameservers

func (s *Service) GetDomainNameservers(domainName string) ([]Nameserver, error)

GetDomainNameservers retrieves the nameservers for a domain

func (*Service) GetDomains

func (s *Service) GetDomains(parameters connection.APIRequestParameters) ([]Domain, error)

GetDomains retrieves a list of domains

func (*Service) GetDomainsPaginated

func (s *Service) GetDomainsPaginated(parameters connection.APIRequestParameters) (*connection.Paginated[Domain], error)

GetDomainsPaginated retrieves a paginated list of domains

func (*Service) GetWhois

func (s *Service) GetWhois(domainName string) (Whois, error)

GetWhois retrieves WHOIS information for a single domain

func (*Service) GetWhoisRaw

func (s *Service) GetWhoisRaw(domainName string) (string, error)

GetWhoisRaw retrieves raw WHOIS information for a single domain

type Whois

type Whois struct {
	Name        string              `json:"name"`
	Status      []string            `json:"status"`
	CreatedAt   connection.DateTime `json:"created_at"`
	UpdatedAt   connection.DateTime `json:"updated_at"`
	ExpiresAt   connection.DateTime `json:"expires_at"`
	Nameservers []Nameserver        `json:"nameservers"`
	Registrar   Registrar           `json:"registrar"`
}

Whois represents WHOIS information

Jump to

Keyboard shortcuts

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