fakedns

package
v0.0.0-...-775c07d Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSMock

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

DNSMock acts as DNS server but returns mock values

func NewFakeDNS

func NewFakeDNS(settings FakeDNSSettings) *DNSMock

func (*DNSMock) AddAAAARecord

func (m *DNSMock) AddAAAARecord(ip net.IP) *DNSMock

func (*DNSMock) AddARecord

func (m *DNSMock) AddARecord(fqdn string, ip net.IP) *DNSMock

func (*DNSMock) AddNSRecord

func (m *DNSMock) AddNSRecord(fqdn, nsName string) *DNSMock

func (*DNSMock) AddTXTRecord

func (m *DNSMock) AddTXTRecord(fqdn string, strings ...string) *DNSMock

func (*DNSMock) RunTestFunc

func (m *DNSMock) RunTestFunc(f func()) *Result

func (*DNSMock) Start

func (m *DNSMock) Start() *DNSMock

type FakeDNSSettings

type FakeDNSSettings struct {
	FakeDNSPort     int
	EdgeDNSZoneFQDN string
	DNSZoneFQDN     string
}

type Result

type Result struct {
	Error error
}

func (*Result) RequireNoError

func (r *Result) RequireNoError(t *testing.T)

Jump to

Keyboard shortcuts

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