Documentation
¶
Index ¶
- type MockLocator
- type MockLocator_Expecter
- type MockLocator_GetCountry_Call
- func (_c *MockLocator_GetCountry_Call) Return(s string, err error) *MockLocator_GetCountry_Call
- func (_c *MockLocator_GetCountry_Call) Run(run func(ip net.IP)) *MockLocator_GetCountry_Call
- func (_c *MockLocator_GetCountry_Call) RunAndReturn(run func(ip net.IP) (string, error)) *MockLocator_GetCountry_Call
- type MockLocator_GetPosition_Call
- func (_c *MockLocator_GetPosition_Call) Return(position geoip.Position, err error) *MockLocator_GetPosition_Call
- func (_c *MockLocator_GetPosition_Call) Run(run func(ip net.IP)) *MockLocator_GetPosition_Call
- func (_c *MockLocator_GetPosition_Call) RunAndReturn(run func(ip net.IP) (geoip.Position, error)) *MockLocator_GetPosition_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockLocator ¶ added in v0.26.0
MockLocator is an autogenerated mock type for the Locator type
func NewMockLocator ¶ added in v0.26.0
func NewMockLocator(t interface {
mock.TestingT
Cleanup(func())
}) *MockLocator
NewMockLocator creates a new instance of MockLocator. 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 (*MockLocator) EXPECT ¶ added in v0.26.0
func (_m *MockLocator) EXPECT() *MockLocator_Expecter
func (*MockLocator) GetCountry ¶ added in v0.26.0
func (_mock *MockLocator) GetCountry(ip net.IP) (string, error)
GetCountry provides a mock function for the type MockLocator
func (*MockLocator) GetPosition ¶ added in v0.26.0
GetPosition provides a mock function for the type MockLocator
type MockLocator_Expecter ¶ added in v0.26.0
type MockLocator_Expecter struct {
// contains filtered or unexported fields
}
func (*MockLocator_Expecter) GetCountry ¶ added in v0.26.0
func (_e *MockLocator_Expecter) GetCountry(ip any) *MockLocator_GetCountry_Call
GetCountry is a helper method to define mock.On call
- ip net.IP
func (*MockLocator_Expecter) GetPosition ¶ added in v0.26.0
func (_e *MockLocator_Expecter) GetPosition(ip any) *MockLocator_GetPosition_Call
GetPosition is a helper method to define mock.On call
- ip net.IP
type MockLocator_GetCountry_Call ¶ added in v0.26.0
MockLocator_GetCountry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCountry'
func (*MockLocator_GetCountry_Call) Return ¶ added in v0.26.0
func (_c *MockLocator_GetCountry_Call) Return(s string, err error) *MockLocator_GetCountry_Call
func (*MockLocator_GetCountry_Call) Run ¶ added in v0.26.0
func (_c *MockLocator_GetCountry_Call) Run(run func(ip net.IP)) *MockLocator_GetCountry_Call
func (*MockLocator_GetCountry_Call) RunAndReturn ¶ added in v0.26.0
func (_c *MockLocator_GetCountry_Call) RunAndReturn(run func(ip net.IP) (string, error)) *MockLocator_GetCountry_Call
type MockLocator_GetPosition_Call ¶ added in v0.26.0
MockLocator_GetPosition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPosition'
func (*MockLocator_GetPosition_Call) Return ¶ added in v0.26.0
func (_c *MockLocator_GetPosition_Call) Return(position geoip.Position, err error) *MockLocator_GetPosition_Call
func (*MockLocator_GetPosition_Call) Run ¶ added in v0.26.0
func (_c *MockLocator_GetPosition_Call) Run(run func(ip net.IP)) *MockLocator_GetPosition_Call
func (*MockLocator_GetPosition_Call) RunAndReturn ¶ added in v0.26.0
func (_c *MockLocator_GetPosition_Call) RunAndReturn(run func(ip net.IP) (geoip.Position, error)) *MockLocator_GetPosition_Call