scriptdns

package
v0.0.76 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2022 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen(addr string)

Listen starts the DNS listener

func LoadRecordHandlers

func LoadRecordHandlers(database *gorm.DB)

LoadRecordHandlers loads DNS record handlers from the database

Types

type Answer

type Answer struct {
	RRs           []RR `json:"rrs"`
	Authoritative bool `json:"authoritative"`
}

func (*Answer) ToRRSet

func (a *Answer) ToRRSet() ([]dns.RR, error)

ToRRSet converts this answer into a slice of dns.RR

type RR

type RR struct {
	Name  string `json:"name"`
	TTL   uint32 `json:"ttl"`
	Type  string `json:"type"`
	Value string `json:"value"`
}

func (*RR) ToDNSRR

func (rr *RR) ToDNSRR() (dns.RR, error)

ToDNSRR converts the RR to a dns.RR

Jump to

Keyboard shortcuts

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