dnsmock

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package dnsmock is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheMock

type CacheMock struct {
	TB              testing.TB
	Calls           CacheMockCalls
	OnPutRecord     func(state CacheMockCallsContext, host string, address net.IP)
	OnForwardLookup func(state CacheMockCallsContext, host string) net.IP
	OnReverseLookup func(state CacheMockCallsContext, address net.IP) (host string, miss bool)
}

func (*CacheMock) ForwardLookup

func (m *CacheMock) ForwardLookup(host string) (res0 net.IP)

func (*CacheMock) PutRecord

func (m *CacheMock) PutRecord(host string, address net.IP)

func (*CacheMock) ReverseLookup

func (m *CacheMock) ReverseLookup(address net.IP) (host string, miss bool)

type CacheMockCalls

type CacheMockCalls struct {
	PutRecord     []CacheMockPutRecordCall
	ForwardLookup []CacheMockForwardLookupCall
	ReverseLookup []CacheMockReverseLookupCall
}

type CacheMockCallsContext

type CacheMockCallsContext struct {
	CacheMockCalls
	TB testing.TB
}

type CacheMockForwardLookupCall

type CacheMockForwardLookupCall struct {
	Timestamp time.Time
	Params    CacheMockForwardLookupCallParams
	Results   CacheMockForwardLookupCallResults
}

type CacheMockForwardLookupCallParams

type CacheMockForwardLookupCallParams struct {
	Host string
}

type CacheMockForwardLookupCallResults

type CacheMockForwardLookupCallResults struct {
	Res0 net.IP
}

type CacheMockPutRecordCall

type CacheMockPutRecordCall struct {
	Timestamp time.Time
	Params    CacheMockPutRecordCallParams
}

type CacheMockPutRecordCallParams

type CacheMockPutRecordCallParams struct {
	Host    string
	Address net.IP
}

type CacheMockReverseLookupCall

type CacheMockReverseLookupCall struct {
	Timestamp time.Time
	Params    CacheMockReverseLookupCallParams
	Results   CacheMockReverseLookupCallResults
}

type CacheMockReverseLookupCallParams

type CacheMockReverseLookupCallParams struct {
	Address net.IP
}

type CacheMockReverseLookupCallResults

type CacheMockReverseLookupCallResults struct {
	Host string
	Miss bool
}

type MockResponseWriter added in v0.9.2

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

MockResponseWriter is a mock of ResponseWriter interface.

func NewMockResponseWriter added in v0.9.2

func NewMockResponseWriter(ctrl *gomock.Controller) *MockResponseWriter

NewMockResponseWriter creates a new mock instance.

func (*MockResponseWriter) Close added in v0.9.2

func (m *MockResponseWriter) Close() error

Close mocks base method.

func (*MockResponseWriter) EXPECT added in v0.9.2

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockResponseWriter) Hijack added in v0.9.2

func (m *MockResponseWriter) Hijack()

Hijack mocks base method.

func (*MockResponseWriter) LocalAddr added in v0.9.2

func (m *MockResponseWriter) LocalAddr() net.Addr

LocalAddr mocks base method.

func (*MockResponseWriter) RemoteAddr added in v0.9.2

func (m *MockResponseWriter) RemoteAddr() net.Addr

RemoteAddr mocks base method.

func (*MockResponseWriter) TsigStatus added in v0.9.2

func (m *MockResponseWriter) TsigStatus() error

TsigStatus mocks base method.

func (*MockResponseWriter) TsigTimersOnly added in v0.9.2

func (m *MockResponseWriter) TsigTimersOnly(arg0 bool)

TsigTimersOnly mocks base method.

func (*MockResponseWriter) Write added in v0.9.2

func (m *MockResponseWriter) Write(arg0 []byte) (int, error)

Write mocks base method.

func (*MockResponseWriter) WriteMsg added in v0.9.2

func (m *MockResponseWriter) WriteMsg(arg0 *dns.Msg) error

WriteMsg mocks base method.

type MockResponseWriterMockRecorder added in v0.9.2

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

MockResponseWriterMockRecorder is the mock recorder for MockResponseWriter.

func (*MockResponseWriterMockRecorder) Close added in v0.9.2

Close indicates an expected call of Close.

func (*MockResponseWriterMockRecorder) Hijack added in v0.9.2

Hijack indicates an expected call of Hijack.

func (*MockResponseWriterMockRecorder) LocalAddr added in v0.9.2

func (mr *MockResponseWriterMockRecorder) LocalAddr() *gomock.Call

LocalAddr indicates an expected call of LocalAddr.

func (*MockResponseWriterMockRecorder) RemoteAddr added in v0.9.2

func (mr *MockResponseWriterMockRecorder) RemoteAddr() *gomock.Call

RemoteAddr indicates an expected call of RemoteAddr.

func (*MockResponseWriterMockRecorder) TsigStatus added in v0.9.2

func (mr *MockResponseWriterMockRecorder) TsigStatus() *gomock.Call

TsigStatus indicates an expected call of TsigStatus.

func (*MockResponseWriterMockRecorder) TsigTimersOnly added in v0.9.2

func (mr *MockResponseWriterMockRecorder) TsigTimersOnly(arg0 interface{}) *gomock.Call

TsigTimersOnly indicates an expected call of TsigTimersOnly.

func (*MockResponseWriterMockRecorder) Write added in v0.9.2

func (mr *MockResponseWriterMockRecorder) Write(arg0 interface{}) *gomock.Call

Write indicates an expected call of Write.

func (*MockResponseWriterMockRecorder) WriteMsg added in v0.9.2

func (mr *MockResponseWriterMockRecorder) WriteMsg(arg0 interface{}) *gomock.Call

WriteMsg indicates an expected call of WriteMsg.

type ResponseWriterMock

type ResponseWriterMock struct {
	*mock.CallCounter
	Local        net.Addr
	Remote       net.Addr
	OnWriteMsg   func(msg *mdns.Msg) error
	OnWrite      func(data []byte) (int, error)
	OnClose      func() error
	OnTsigStatus func() error
	OnHijack     func()
}

func (ResponseWriterMock) Close

func (rw ResponseWriterMock) Close() error

func (ResponseWriterMock) Hijack

func (rw ResponseWriterMock) Hijack()

func (ResponseWriterMock) LocalAddr

func (rw ResponseWriterMock) LocalAddr() net.Addr

func (ResponseWriterMock) RemoteAddr

func (rw ResponseWriterMock) RemoteAddr() net.Addr

func (ResponseWriterMock) TsigStatus

func (rw ResponseWriterMock) TsigStatus() error

func (ResponseWriterMock) TsigTimersOnly

func (rw ResponseWriterMock) TsigTimersOnly(bool)

func (ResponseWriterMock) Write

func (rw ResponseWriterMock) Write(data []byte) (int, error)

func (ResponseWriterMock) WriteMsg

func (rw ResponseWriterMock) WriteMsg(msg *mdns.Msg) error

Jump to

Keyboard shortcuts

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