responder

package
v0.0.0-...-3192b2a Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTtl uint32 = 120

Variables

This section is empty.

Functions

This section is empty.

Types

type AddResponder

type AddResponder interface {
	Append(rr dns.RR)
}

type IPv4Responder

type IPv4Responder struct {
	dns.A
}

func NewIPv4Responder

func NewIPv4Responder(qname string) *IPv4Responder

func (*IPv4Responder) AddRecord

func (ip *IPv4Responder) AddRecord(r AddResponder)

func (*IPv4Responder) GetQClass

func (ip *IPv4Responder) GetQClass() uint16

func (*IPv4Responder) GetQName

func (ip *IPv4Responder) GetQName() string

func (*IPv4Responder) GetQType

func (ip *IPv4Responder) GetQType() uint16

func (*IPv4Responder) GetRecord

func (ip *IPv4Responder) GetRecord() *Record

func (*IPv4Responder) GetTtl

func (ip *IPv4Responder) GetTtl() uint32

func (*IPv4Responder) SetTtl

func (ip *IPv4Responder) SetTtl(ttl uint32)

type IPv6Responder

type IPv6Responder struct {
	dns.AAAA
}

func NewIPv6Responder

func NewIPv6Responder(qname string) *IPv6Responder

func (IPv6Responder) GetQClass

func (ipv6 IPv6Responder) GetQClass() uint16

func (IPv6Responder) GetQName

func (ipv6 IPv6Responder) GetQName() string

func (IPv6Responder) GetQType

func (ipv6 IPv6Responder) GetQType() uint16

func (IPv6Responder) GetRecord

func (ipv6 IPv6Responder) GetRecord() *Record

func (IPv6Responder) GetTtl

func (ipv6 IPv6Responder) GetTtl() uint32

func (IPv6Responder) SetTtl

func (ipv6 IPv6Responder) SetTtl(u uint32)

type PtrResponder

type PtrResponder struct {
	dns.PTR
}

func NewPtrResponder

func NewPtrResponder(name, target string) *PtrResponder

func (*PtrResponder) GetQClass

func (p *PtrResponder) GetQClass() uint16

func (*PtrResponder) GetQName

func (p *PtrResponder) GetQName() string

func (*PtrResponder) GetQType

func (p *PtrResponder) GetQType() uint16

func (*PtrResponder) GetRecord

func (p *PtrResponder) GetRecord() *Record

func (*PtrResponder) GetTtl

func (p *PtrResponder) GetTtl() uint32

func (*PtrResponder) SetTtl

func (p *PtrResponder) SetTtl(u uint32)

type Record

type Record struct {
	dns.RR
}

func NewRecord

func NewRecord(rr dns.RR) *Record

func (*Record) SetTtl

func (rr *Record) SetTtl(ttl uint32)

type RecordProvider

type RecordProvider interface {
	GetRecord() *Record
}

type RecordResponder

type RecordResponder interface {
	GetQClass() uint16
	GetQName() string
	GetQType() uint16
	GetTtl() uint32
	SetTtl(uint32)
	RecordProvider
}

type ReplyFilter

type ReplyFilter interface {
	Accept(t uint16, c uint16, n string) bool
}

type ResponseConfiguration

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

func (*ResponseConfiguration) Adjust

func (c *ResponseConfiguration) Adjust(r *Record)

func (*ResponseConfiguration) SetTtlSecondsOverride

func (c *ResponseConfiguration) SetTtlSecondsOverride(i uint32)

type SrvResponder

type SrvResponder struct {
	dns.SRV
}

func NewSrvResponder

func NewSrvResponder(qName string, serverName string, port uint16) *SrvResponder

func (SrvResponder) GetQClass

func (s SrvResponder) GetQClass() uint16

func (SrvResponder) GetQName

func (s SrvResponder) GetQName() string

func (SrvResponder) GetQType

func (s SrvResponder) GetQType() uint16

func (*SrvResponder) GetRecord

func (s *SrvResponder) GetRecord() *Record

func (SrvResponder) GetTtl

func (s SrvResponder) GetTtl() uint32

func (*SrvResponder) SetTtl

func (s *SrvResponder) SetTtl(u uint32)

type TxtResponder

type TxtResponder struct {
	dns.TXT
}

func NewTxtResponder

func NewTxtResponder(qname string, txt []string) *TxtResponder

func (*TxtResponder) GetQClass

func (t *TxtResponder) GetQClass() uint16

func (*TxtResponder) GetQName

func (t *TxtResponder) GetQName() string

func (*TxtResponder) GetQType

func (t *TxtResponder) GetQType() uint16

func (*TxtResponder) GetRecord

func (t *TxtResponder) GetRecord() *Record

func (*TxtResponder) GetTtl

func (t *TxtResponder) GetTtl() uint32

func (*TxtResponder) SetTtl

func (t *TxtResponder) SetTtl(u uint32)

Jump to

Keyboard shortcuts

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