rrdaclient

package module
v0.0.0-...-209fd20 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2014 License: MIT Imports: 3 Imported by: 0

README

rrdaclient

Go bindings for RRDA https://github.com/fcambus/rrda

Go version support yet to be tested, coded with 1.3.1 linux/amd64

Description

https://github.com/fcambus/rrda

RRDA is a REST API written in Go allowing to perform DNS queries over HTTP, and to get reverse PTR records for both IPv4 and IPv6 addresses. It outputs JSON-encoded DNS responses.

RRDA is a recursive acronym for "RRDA REST DNS API".

This library (rrdaclient) provides Go bindings to consume this API

How to use

//get library
$ go get github.com/omie/rrdaclient

//import library
import github.com/omie/rrdaclient

//call functions
response = rrdaclient.GetHostAddress("<input>")

//Response is of type *rrdaclient.APIResponse
//and the structure resembles the RRDA JSON schema

Further Reading

http://www.statdns.com/api/

License

MIT License

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BaseURL = "http://api.statdns.com/"

BaseURL that points to RRDA REST API

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {
	Question   []Question `json: "question"`
	Answer     []DNSData  `json: "answer"`
	Authority  []DNSData  `json: "answer"`
	Additional []DNSData  `json: "answer"`
}

APIResponse type represents response from RRDA API

func GetCanonicalName

func GetCanonicalName(domain string) (*APIResponse, error)

GetCanonicalName Get CNAME records

http://api.statdns.com/statdns.net/cname

func GetCertificate

func GetCertificate(domain string) (*APIResponse, error)

GetCertificate Get CERT records

http://api.statdns.com/statdns.net/cert

func GetDHCIDRecords

func GetDHCIDRecords(domain string) (*APIResponse, error)

GetDHCIDRecords Get DHCID (DHCP Identifier) records

http://api.statdns.com/statdns.net/dhcid

func GetDLVRecords

func GetDLVRecords(domain string) (*APIResponse, error)

GetDLVRecords Get DNSSEC Lookaside Validation (DLV) records

http://api.statdns.com/statdns.net/dlv

func GetDNAMERecords

func GetDNAMERecords(domain string) (*APIResponse, error)

GetDNAMERecords Get Delegation name (DNAME) records

http://api.statdns.com/statdns.net/dname

func GetDNSKeyRecords

func GetDNSKeyRecords(domain string) (*APIResponse, error)

GetDNSKeyRecords Get DNS Key record (DNSKEY) records

http://api.statdns.com/statdns.net/dnskey

func GetDSRecords

func GetDSRecords(domain string) (*APIResponse, error)

GetDSRecords Get Delegation Signer (DS) records

http://api.statdns.com/statdns.net/ds

func GetHINFORecords

func GetHINFORecords(domain string) (*APIResponse, error)

GetHINFORecords Get Host Information (HINFO) records

http://api.statdns.com/statdns.net/hinfo

func GetHIPRecords

func GetHIPRecords(domain string) (*APIResponse, error)

GetHIPRecords Get Host Identity Protocol (HIP) records

http://api.statdns.com/statdns.net/hip

func GetHostAddress

func GetHostAddress(domain string) (*APIResponse, error)

GetHostAddress Get A records

http://api.statdns.com/<domain>/a

func GetHostAddressV6

func GetHostAddressV6(domain string) (*APIResponse, error)

GetHostAddressV6 Get AAAA records

http://api.statdns.com/statdns.net/aaaa

func GetIPSECKeyRecords

func GetIPSECKeyRecords(domain string) (*APIResponse, error)

GetIPSECKeyRecords Get IPSec Key (IPSECKEY) records

http://api.statdns.com/statdns.net/ipseckey

func GetKXRecords

func GetKXRecords(domain string) (*APIResponse, error)

GetKXRecords Get Key eXchanger record (KX) records

http://api.statdns.com/statdns.net/kx

func GetLOCRecords

func GetLOCRecords(domain string) (*APIResponse, error)

GetLOCRecords Get Location records (LOC) records

http://api.statdns.com/statdns.net/loc

func GetMXRecords

func GetMXRecords(domain string) (*APIResponse, error)

GetMXRecords Get Mail Exchange record (MX) records

http://api.statdns.com/statdns.net/mx

func GetNAPTRRecords

func GetNAPTRRecords(domain string) (*APIResponse, error)

GetNAPTRRecords Get Name Authority Pointer (NAPTR) records

http://api.statdns.com/statdns.net/naptr

func GetNSEC3ParamRecords

func GetNSEC3ParamRecords(domain string) (*APIResponse, error)

GetNSEC3ParamRecords Get NSEC3 (NSEC3PARAM) records

http://api.statdns.com/statdns.net/nsec3param

func GetNSEC3Records

func GetNSEC3Records(domain string) (*APIResponse, error)

GetNSEC3Records Get NSEC record version 3 (NSEC3) records

http://api.statdns.com/statdns.net/nsec3

func GetNSECRecords

func GetNSECRecords(domain string) (*APIResponse, error)

GetNSECRecords Get Next-Secure (NSEC) records

http://api.statdns.com/statdns.net/nsec

func GetNSRecords

func GetNSRecords(domain string) (*APIResponse, error)

GetNSRecords Get Name Servers (NS) records

http://api.statdns.com/statdns.net/ns

func GetOPTRecords

func GetOPTRecords(domain string) (*APIResponse, error)

GetOPTRecords Get Option records OPT records

http://api.statdns.com/statdns.net/opt

func GetPTRRecords

func GetPTRRecords(domain string) (*APIResponse, error)

GetPTRRecords Get Pointer (PTR) records

http://api.statdns.com/statdns.net/ptr

func GetRRSIGRecords

func GetRRSIGRecords(domain string) (*APIResponse, error)

GetRRSIGRecords Get Resource Records Signature (RRSIG) records

http://api.statdns.com/statdns.net/rrsig

func GetReversePTRRecords

func GetReversePTRRecords(ip string) (*APIResponse, error)

GetReversePTRRecords Get reverse PTR record from IPv4 addresses

http://api.statdns.com/x/193.0.6.139

func GetReversePTRRecordsV6

func GetReversePTRRecordsV6(ip string) (*APIResponse, error)

GetReversePTRRecordsV6 Get reverse PTR record from IPv6 addresses

http://api.statdns.com/x/2001:67c:2e8:22::c100:68b

func GetSOARecords

func GetSOARecords(domain string) (*APIResponse, error)

GetSOARecords Get Start of Authority (SOA) record

http://api.statdns.com/statdns.net/soa

func GetSPFRecords

func GetSPFRecords(domain string) (*APIResponse, error)

GetSPFRecords Get Sender Policy Framework (SPF) records

http://api.statdns.com/statdns.net/spf

func GetSRVRecords

func GetSRVRecords(domain string) (*APIResponse, error)

GetSRVRecords Get Service Locator (SRV) records

http://api.statdns.com/statdns.net/srv

func GetSSHFPRecords

func GetSSHFPRecords(domain string) (*APIResponse, error)

GetSSHFPRecords Get SSH Public Key Fingerprint (SSHFP) records

http://api.statdns.com/statdns.net/sshfp

func GetTALINKRecords

func GetTALINKRecords(domain string) (*APIResponse, error)

GetTALINKRecords Get Trust Anchor LINK (TALINK) records

http://api.statdns.com/statdns.net/talink

func GetTARecords

func GetTARecords(domain string) (*APIResponse, error)

GetTARecords Get DNSSEC Trust Authorities (TA) records

http://api.statdns.com/statdns.net/ta

func GetTLSARecords

func GetTLSARecords(domain string) (*APIResponse, error)

GetTLSARecords Get TLSA records

http://api.statdns.com/_443._tcp.www.statdns.net/tlsa

func GetTXTRecords

func GetTXTRecords(domain string) (*APIResponse, error)

GetTXTRecords Get Text (TXT) records

http://api.statdns.com/statdns.net/txt

type DNSData

type DNSData struct {
	Name     string `json: "name"`
	Type     string `json: "type"`
	Class    string `json: "class"`
	TTL      int    `json: "ttl"`
	Rdlength int    `json: "rdlength"`
	Rdata    string `json: "rdata"`
}

DNSData type represents Answer, Autority and Additional sections in API response

type Question

type Question struct {
	Name  string `json: "name"`
	Type  string `json: "type"`
	Class string `json: "class"`
}

Question type represents the Question section in API response

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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