mocks

package
v0.27.10 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

README

Mocks

To generate (or refresh) mocks from iface package interfaces please install mockgen. Run this command to update PacketFilter mock:

mockgen -destination iface/mocks/filter.go -package mocks github.com/netbirdio/netbird/iface PacketFilter

Documentation

Overview

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDevice

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

MockDevice is a mock of Device interface.

func NewMockDevice

func NewMockDevice(ctrl *gomock.Controller) *MockDevice

NewMockDevice creates a new mock instance.

func (*MockDevice) BatchSize

func (m *MockDevice) BatchSize() int

BatchSize mocks base method.

func (*MockDevice) Close

func (m *MockDevice) Close() error

Close mocks base method.

func (*MockDevice) EXPECT

func (m *MockDevice) EXPECT() *MockDeviceMockRecorder

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

func (*MockDevice) Events

func (m *MockDevice) Events() <-chan tun.Event

Events mocks base method.

func (*MockDevice) File

func (m *MockDevice) File() *os.File

File mocks base method.

func (*MockDevice) MTU

func (m *MockDevice) MTU() (int, error)

MTU mocks base method.

func (*MockDevice) Name

func (m *MockDevice) Name() (string, error)

Name mocks base method.

func (*MockDevice) Read

func (m *MockDevice) Read(arg0 [][]byte, arg1 []int, arg2 int) (int, error)

Read mocks base method.

func (*MockDevice) Write

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

Write mocks base method.

type MockDeviceMockRecorder

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

MockDeviceMockRecorder is the mock recorder for MockDevice.

func (*MockDeviceMockRecorder) BatchSize

func (mr *MockDeviceMockRecorder) BatchSize() *gomock.Call

BatchSize indicates an expected call of BatchSize.

func (*MockDeviceMockRecorder) Close

func (mr *MockDeviceMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockDeviceMockRecorder) Events

func (mr *MockDeviceMockRecorder) Events() *gomock.Call

Events indicates an expected call of Events.

func (*MockDeviceMockRecorder) File

func (mr *MockDeviceMockRecorder) File() *gomock.Call

File indicates an expected call of File.

func (*MockDeviceMockRecorder) MTU

func (mr *MockDeviceMockRecorder) MTU() *gomock.Call

MTU indicates an expected call of MTU.

func (*MockDeviceMockRecorder) Name

func (mr *MockDeviceMockRecorder) Name() *gomock.Call

Name indicates an expected call of Name.

func (*MockDeviceMockRecorder) Read

func (mr *MockDeviceMockRecorder) Read(arg0, arg1, arg2 interface{}) *gomock.Call

Read indicates an expected call of Read.

func (*MockDeviceMockRecorder) Write

func (mr *MockDeviceMockRecorder) Write(arg0, arg1 interface{}) *gomock.Call

Write indicates an expected call of Write.

type MockPacketFilter

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

MockPacketFilter is a mock of PacketFilter interface.

func NewMockPacketFilter

func NewMockPacketFilter(ctrl *gomock.Controller) *MockPacketFilter

NewMockPacketFilter creates a new mock instance.

func (*MockPacketFilter) AddUDPPacketHook added in v0.21.2

func (m *MockPacketFilter) AddUDPPacketHook(arg0 bool, arg1 net.IP, arg2 uint16, arg3 func([]byte) bool) string

AddUDPPacketHook mocks base method.

func (*MockPacketFilter) DropIncoming

func (m *MockPacketFilter) DropIncoming(arg0 []byte) bool

DropIncoming mocks base method.

func (*MockPacketFilter) DropOutgoing

func (m *MockPacketFilter) DropOutgoing(arg0 []byte) bool

DropOutgoing mocks base method.

func (*MockPacketFilter) EXPECT

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

func (*MockPacketFilter) RemovePacketHook added in v0.21.2

func (m *MockPacketFilter) RemovePacketHook(arg0 string) error

RemovePacketHook mocks base method.

func (*MockPacketFilter) SetNetwork

func (m *MockPacketFilter) SetNetwork(arg0 *net.IPNet)

SetNetwork mocks base method.

type MockPacketFilterMockRecorder

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

MockPacketFilterMockRecorder is the mock recorder for MockPacketFilter.

func (*MockPacketFilterMockRecorder) AddUDPPacketHook added in v0.21.2

func (mr *MockPacketFilterMockRecorder) AddUDPPacketHook(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

AddUDPPacketHook indicates an expected call of AddUDPPacketHook.

func (*MockPacketFilterMockRecorder) DropIncoming added in v0.21.2

func (mr *MockPacketFilterMockRecorder) DropIncoming(arg0 interface{}) *gomock.Call

DropIncoming indicates an expected call of DropIncoming.

func (*MockPacketFilterMockRecorder) DropOutgoing added in v0.21.2

func (mr *MockPacketFilterMockRecorder) DropOutgoing(arg0 interface{}) *gomock.Call

DropOutgoing indicates an expected call of DropOutgoing.

func (*MockPacketFilterMockRecorder) RemovePacketHook added in v0.21.2

func (mr *MockPacketFilterMockRecorder) RemovePacketHook(arg0 interface{}) *gomock.Call

RemovePacketHook indicates an expected call of RemovePacketHook.

func (*MockPacketFilterMockRecorder) SetNetwork

func (mr *MockPacketFilterMockRecorder) SetNetwork(arg0 interface{}) *gomock.Call

SetNetwork indicates an expected call of SetNetwork.

Directories

Path Synopsis
iface
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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