Help us shape the future of Go! Take the 2026 Go Developer Survey

zonetransfer

package
v5.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDomainNotConfigured = errors.New("domain name or name server has not been configured for zone transfer")
View Source
var ErrZoneTransferNotEnabled = errors.New("zone transfers are not enabled for RITA")

Functions

This section is empty.

Types

type PerformedZoneTransfer

type PerformedZoneTransfer struct {
	PerformedAt time.Time `ch:"performed_at"`
	DomainName  string    `ch:"domain_name"`
	NameServer  string    `ch:"name_server"`
	Serial      uint32    `ch:"serial_soa"`
	MBox        string    `ch:"mbox"`
	IsIXFR      bool      `ch:"is_ixfr"`
}

type Record

type Record struct {
	PerformedAt time.Time `ch:"performed_at"`
	Hostname    string    `ch:"hostname"`
	IP          net.IP    `ch:"ip"`
	TTL         uint32    `ch:"ttl"`
	// domain forest info
	DomainName string `ch:"domain_name"`
	NameServer string `ch:"name_server"`
}

type ZoneTransfer

type ZoneTransfer struct {
	// contains filtered or unexported fields
}

func NewZoneTransfer

func NewZoneTransfer(db *database.ServerConn, cfg *config.Config) (*ZoneTransfer, error)

NewZoneTransfer creates the struct needed for handling zone transfers

func (*ZoneTransfer) DoZT

func (zt *ZoneTransfer) DoZT(axfr bool) error

DoZT handles a zone transfer

func (*ZoneTransfer) FindLastZoneTransfer

func (zt *ZoneTransfer) FindLastZoneTransfer() (*PerformedZoneTransfer, error)

FindLastZoneTransfer finds the last zone transfer that was performed for this zt's domain and name server

func (*ZoneTransfer) PerformZoneTransfer

func (zt *ZoneTransfer) PerformZoneTransfer() error

PerformZoneTransfer performs either an AXFR or IXFR zone transfer

func (*ZoneTransfer) RecordZoneTransferPerformed

func (zt *ZoneTransfer) RecordZoneTransferPerformed() error

RecordZoneTransferPerformed marks a completed zone transfer in the metadatabase and stores the most recent serial (SOA) found in the dns query

func (*ZoneTransfer) SetTransferInfo

func (zt *ZoneTransfer) SetTransferInfo(transferInfo PerformedZoneTransfer)

for testing

func (*ZoneTransfer) TestConnectivity

func (zt *ZoneTransfer) TestConnectivity() ZoneTransferConnectivityErrors

func (*ZoneTransfer) TestNetConnectivity

func (zt *ZoneTransfer) TestNetConnectivity(protocol string) error

type ZoneTransferConnectivityErrors

type ZoneTransferConnectivityErrors struct {
	NameServerUnreachableUDPError string `json:"name_server_unreachable_udp"`
	NameServerUnreachableTCPError string `json:"name_server_unreachable_tcp"`
	UDPQueryFailedError           string `json:"udp_query_failed"`
	AXFRFailedError               string `json:"axfr_failed"`
}

Jump to

Keyboard shortcuts

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