Skip to content

A fast Go client for performing lookups of DNS records, IPv4 addresses and IPv6 addresses using the Registration Data Access Protocol.

License

Notifications You must be signed in to change notification settings

ryanmab/rdap-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test Coverage Go Report Card PkgGoDev

rdap-go

A fast Go client for performing lookups of DNS records, IPv4 addresses and IPv6 addresses using the Registration Data Access Protocol.

Usage

go get github.com/ryanmab/rdap-go@v0.1.0

Domain Lookups

package main

import (
    "log"
	"github.com/ryanmab/rdap-go/pkg/client"
)

func main() {
	client := client.New()

	response, err := client.LookupDomain("ryanmaber.co.uk")

	if err != nil {
		log.Panic(err)
	}

	log.Printf("Status: %s", response.Status)
}

IPv4 Lookups

package main

import (
	"github.com/ryanmab/rdap-go/pkg/client"
	"log"
)

func main() {
	client := client.New()

	response, err := client.LookupIPv4("8.8.8.8")

	if err != nil {
		log.Panic(err)
	}

	log.Printf("Name: %s", response.Name) // GOGL
}

IPv6 Lookups

package main

import (
	"github.com/ryanmab/rdap-go/pkg/client"
	"log"
)

func main() {
	client := client.New()

	response, err := client.LookupIPv6("2001:4860:4860::8888")

	if err != nil {
		log.Panic(err)
	}

	log.Printf("Name: %s", response.Name) // GOOGLE-IPV6
}

Contributing

Contributions are welcome, and encouraged - simply fork the repository, and make a pull request!

About

A fast Go client for performing lookups of DNS records, IPv4 addresses and IPv6 addresses using the Registration Data Access Protocol.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages