whois

package
v0.0.0-...-c5d5a31 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package whois fetchers WHOIS information for a domain

Index

Constants

This section is empty.

Variables

View Source
var JiveDataProvider provider = "Jive Data"

JiveDataProvider is a WHOIS provider

Functions

This section is empty.

Types

type Fetcher

type Fetcher interface {
	Fetch(domain string) (*Response, error)
}

Fetcher retrieves WHOIS information for a domain

type JiveData

type JiveData struct {
	HTTPClient *http.Client
	Key        string
}

JiveData retrieves WHOIS information from Jive Data

func (*JiveData) Fetch

func (j *JiveData) Fetch(domain string) (*Response, error)

Fetch retrieves from the IEX api

type MyTime

type MyTime struct {
	time.Time
}

MyTime helps us unmarshal "" as time.Time

func (*MyTime) UnmarshalJSON

func (m *MyTime) UnmarshalJSON(data []byte) error

UnmarshalJSON is a patch for processing blank values

type NameServer

type NameServer struct {
	Name string      `json:"name" xml:"name"`
	Ipv4 interface{} `json:"ipv4" xml:"ipv4"`
	Ipv6 interface{} `json:"ipv6" xml:"ipv6"`
}

NameServer is a nameserver

type Response

type Response struct {
	Domain    string `json:"domain" xml:"domain"`
	DomainID  string `json:"domain_id" xml:"domain_id"`
	Status    string `json:"status" xml:"status"`
	Registrar struct {
		ID           string `json:"id" xml:"id"`
		Name         string `json:"name" xml:"name"`
		Organization string `json:"organization" xml:"organization"`
		URL          string `json:"url" xml:"url"`
	} `json:"registrar" xml:"registrar"`
	RegistrantContacts []interface{} `json:"registrant_contacts,omitempty" xml:"registrant_contacts,omitempty"` // no longer available for .com's under GDPR?
	AdminContacts      []interface{} `json:"admin_contacts,omitempty" xml:"admin_contacts,omitempty"`           // no longer available for .com's under GDPR?
	TechnicalContacts  []interface{} `json:"technical_contacts,omitempty" xml:"technical_contacts,omitempty"`   // no longer available for .com's under GDPR?
	Nameservers        []NameServer  `json:"nameservers" xml:"nameservers"`
	Available          bool          `json:"available" xml:"available"`
	Registered         bool          `json:"registered" xml:"registered"`
	Created            MyTime        `json:"created" xml:"created"` // we need a custom unmarshaller for `""`
	Updated            MyTime        `json:"updated" xml:"updated"` // we need a custom unmarshaller for `""`
	Expires            MyTime        `json:"expires" xml:"expires"` // we need a custom unmarshaller for `""`
	Disclaimer         string        `json:"disclaimer" xml:"disclaimer"`
	Raw                string        `json:"raw" xml:"raw"`
	Error              string        `json:"error" xml:"error"`
}

Response is a WHOIS response

Jump to

Keyboard shortcuts

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