mocks

package
v0.0.0-...-d894bde Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IIPInfo

type IIPInfo struct {
	mock.Mock
}

IIPInfo is an autogenerated mock type for the IIPInfo type

func NewIIPInfo

func NewIIPInfo(t interface {
	mock.TestingT
	Cleanup(func())
}) *IIPInfo

NewIIPInfo creates a new instance of IIPInfo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*IIPInfo) EXPECT

func (_m *IIPInfo) EXPECT() *IIPInfo_Expecter

func (*IIPInfo) Info

func (_m *IIPInfo) Info(ip net.IP, continent bool, country bool, city bool, asn bool) (ports.Info, error)

Info provides a mock function with given fields: ip, continent, country, city, asn

func (*IIPInfo) ShortInfo

func (_m *IIPInfo) ShortInfo(ip net.IP) (ports.ShortInfo, error)

ShortInfo provides a mock function with given fields: ip

type IIPInfo_Expecter

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

func (*IIPInfo_Expecter) Info

func (_e *IIPInfo_Expecter) Info(ip interface{}, continent interface{}, country interface{}, city interface{}, asn interface{}) *IIPInfo_Info_Call

Info is a helper method to define mock.On call

  • ip net.IP
  • continent bool
  • country bool
  • city bool
  • asn bool

func (*IIPInfo_Expecter) ShortInfo

func (_e *IIPInfo_Expecter) ShortInfo(ip interface{}) *IIPInfo_ShortInfo_Call

ShortInfo is a helper method to define mock.On call

  • ip net.IP

type IIPInfo_Info_Call

type IIPInfo_Info_Call struct {
	*mock.Call
}

IIPInfo_Info_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Info'

func (*IIPInfo_Info_Call) Return

func (_c *IIPInfo_Info_Call) Return(_a0 ports.Info, _a1 error) *IIPInfo_Info_Call

func (*IIPInfo_Info_Call) Run

func (_c *IIPInfo_Info_Call) Run(run func(ip net.IP, continent bool, country bool, city bool, asn bool)) *IIPInfo_Info_Call

func (*IIPInfo_Info_Call) RunAndReturn

func (_c *IIPInfo_Info_Call) RunAndReturn(run func(net.IP, bool, bool, bool, bool) (ports.Info, error)) *IIPInfo_Info_Call

type IIPInfo_ShortInfo_Call

type IIPInfo_ShortInfo_Call struct {
	*mock.Call
}

IIPInfo_ShortInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShortInfo'

func (*IIPInfo_ShortInfo_Call) Return

func (*IIPInfo_ShortInfo_Call) Run

func (_c *IIPInfo_ShortInfo_Call) Run(run func(ip net.IP)) *IIPInfo_ShortInfo_Call

func (*IIPInfo_ShortInfo_Call) RunAndReturn

func (_c *IIPInfo_ShortInfo_Call) RunAndReturn(run func(net.IP) (ports.ShortInfo, error)) *IIPInfo_ShortInfo_Call

type IMaxMind

type IMaxMind struct {
	mock.Mock
}

IMaxMind is an autogenerated mock type for the IMaxMind type

func NewIMaxMind

func NewIMaxMind(t interface {
	mock.TestingT
	Cleanup(func())
}) *IMaxMind

NewIMaxMind creates a new instance of IMaxMind. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*IMaxMind) EXPECT

func (_m *IMaxMind) EXPECT() *IMaxMind_Expecter

func (*IMaxMind) GetASN

func (_m *IMaxMind) GetASN(ip net.IP) (ports.ASN, error)

GetASN provides a mock function with given fields: ip

func (*IMaxMind) GetCity

func (_m *IMaxMind) GetCity(ip net.IP) (ports.City, error)

GetCity provides a mock function with given fields: ip

func (*IMaxMind) GetContinent

func (_m *IMaxMind) GetContinent(ip net.IP) (ports.Continent, error)

GetContinent provides a mock function with given fields: ip

func (*IMaxMind) GetCountry

func (_m *IMaxMind) GetCountry(ip net.IP) (ports.Country, error)

GetCountry provides a mock function with given fields: ip

func (*IMaxMind) Load

func (_m *IMaxMind) Load(countryReader *maxminddb.Reader, cityReader *maxminddb.Reader, asnReader *maxminddb.Reader)

Load provides a mock function with given fields: countryReader, cityReader, asnReader

type IMaxMind_Expecter

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

func (*IMaxMind_Expecter) GetASN

func (_e *IMaxMind_Expecter) GetASN(ip interface{}) *IMaxMind_GetASN_Call

GetASN is a helper method to define mock.On call

  • ip net.IP

func (*IMaxMind_Expecter) GetCity

func (_e *IMaxMind_Expecter) GetCity(ip interface{}) *IMaxMind_GetCity_Call

GetCity is a helper method to define mock.On call

  • ip net.IP

func (*IMaxMind_Expecter) GetContinent

func (_e *IMaxMind_Expecter) GetContinent(ip interface{}) *IMaxMind_GetContinent_Call

GetContinent is a helper method to define mock.On call

  • ip net.IP

func (*IMaxMind_Expecter) GetCountry

func (_e *IMaxMind_Expecter) GetCountry(ip interface{}) *IMaxMind_GetCountry_Call

GetCountry is a helper method to define mock.On call

  • ip net.IP

func (*IMaxMind_Expecter) Load

func (_e *IMaxMind_Expecter) Load(countryReader interface{}, cityReader interface{}, asnReader interface{}) *IMaxMind_Load_Call

Load is a helper method to define mock.On call

  • countryReader *maxminddb.Reader
  • cityReader *maxminddb.Reader
  • asnReader *maxminddb.Reader

type IMaxMind_GetASN_Call

type IMaxMind_GetASN_Call struct {
	*mock.Call
}

IMaxMind_GetASN_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetASN'

func (*IMaxMind_GetASN_Call) Return

func (*IMaxMind_GetASN_Call) Run

func (_c *IMaxMind_GetASN_Call) Run(run func(ip net.IP)) *IMaxMind_GetASN_Call

func (*IMaxMind_GetASN_Call) RunAndReturn

func (_c *IMaxMind_GetASN_Call) RunAndReturn(run func(net.IP) (ports.ASN, error)) *IMaxMind_GetASN_Call

type IMaxMind_GetCity_Call

type IMaxMind_GetCity_Call struct {
	*mock.Call
}

IMaxMind_GetCity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCity'

func (*IMaxMind_GetCity_Call) Return

func (*IMaxMind_GetCity_Call) Run

func (_c *IMaxMind_GetCity_Call) Run(run func(ip net.IP)) *IMaxMind_GetCity_Call

func (*IMaxMind_GetCity_Call) RunAndReturn

func (_c *IMaxMind_GetCity_Call) RunAndReturn(run func(net.IP) (ports.City, error)) *IMaxMind_GetCity_Call

type IMaxMind_GetContinent_Call

type IMaxMind_GetContinent_Call struct {
	*mock.Call
}

IMaxMind_GetContinent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetContinent'

func (*IMaxMind_GetContinent_Call) Return

func (*IMaxMind_GetContinent_Call) Run

func (*IMaxMind_GetContinent_Call) RunAndReturn

type IMaxMind_GetCountry_Call

type IMaxMind_GetCountry_Call struct {
	*mock.Call
}

IMaxMind_GetCountry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCountry'

func (*IMaxMind_GetCountry_Call) Return

func (*IMaxMind_GetCountry_Call) Run

func (*IMaxMind_GetCountry_Call) RunAndReturn

func (_c *IMaxMind_GetCountry_Call) RunAndReturn(run func(net.IP) (ports.Country, error)) *IMaxMind_GetCountry_Call

type IMaxMind_Load_Call

type IMaxMind_Load_Call struct {
	*mock.Call
}

IMaxMind_Load_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Load'

func (*IMaxMind_Load_Call) Return

func (_c *IMaxMind_Load_Call) Return() *IMaxMind_Load_Call

func (*IMaxMind_Load_Call) Run

func (_c *IMaxMind_Load_Call) Run(run func(countryReader *maxminddb.Reader, cityReader *maxminddb.Reader, asnReader *maxminddb.Reader)) *IMaxMind_Load_Call

func (*IMaxMind_Load_Call) RunAndReturn

Jump to

Keyboard shortcuts

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