pdns

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckStringOnlyHostname

func CheckStringOnlyHostname(input string) bool

CheckStringOnlyHostname returns true if the input is only ns1 and not ns1.akqui.net or ns1*

Types

type PDNSAPI

type PDNSAPI struct {
	URL    string
	APIKey string
	// contains filtered or unexported fields
}

func NewPDNSAPI

func NewPDNSAPI(url, apiKey string) *PDNSAPI

func (*PDNSAPI) Search

func (p *PDNSAPI) Search(query string, objectType string) ([]PDNSSearchResponseItem, error)

type PDNSSearchResponseItem

type PDNSSearchResponseItem struct {
	Name       string `json:"name"`
	Type       string `json:"type"`
	Content    string `json:"content"`
	ObjectType string `json:"object_type"`
	Zone       string `json:"zone"`
	Ttl        int    `json:"ttl"`
}

func FilterRecordsOnType

func FilterRecordsOnType(records []PDNSSearchResponseItem, rType string) []PDNSSearchResponseItem

func GetPDNSRecords

func GetPDNSRecords(ctx context.Context, client *PDNSAPI, search []string, objectType string) ([]PDNSSearchResponseItem, error)

Jump to

Keyboard shortcuts

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