Help us shape the future of Go! Take the 2026 Go Developer Survey

mocks

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthChecker

type HealthChecker struct {
	mock.Mock
}

HealthChecker is an autogenerated mock type for the HealthChecker type

func NewHealthChecker

func NewHealthChecker(t interface {
	mock.TestingT
	Cleanup(func())
}) *HealthChecker

NewHealthChecker creates a new instance of HealthChecker. 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 (*HealthChecker) CheckEndpointHealth

func (_m *HealthChecker) CheckEndpointHealth(ctx context.Context, endpoint string, expectedStatusCodeRanges []v1alpha1.StatusCodeRange, endpointsSecret v1alpha1.EndpointsSecret) (bool, int, bool, error)

CheckEndpointHealth provides a mock function with given fields: ctx, endpoint, expectedStatusCodeRanges, endpointsSecret

func (*HealthChecker) EXPECT

func (_m *HealthChecker) EXPECT() *HealthChecker_Expecter

type HealthChecker_CheckEndpointHealth_Call

type HealthChecker_CheckEndpointHealth_Call struct {
	*mock.Call
}

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

func (*HealthChecker_CheckEndpointHealth_Call) Return

func (*HealthChecker_CheckEndpointHealth_Call) Run

func (_c *HealthChecker_CheckEndpointHealth_Call) Run(run func(ctx context.Context, endpoint string, expectedStatusCodeRanges []v1alpha1.StatusCodeRange, endpointsSecret v1alpha1.EndpointsSecret)) *HealthChecker_CheckEndpointHealth_Call

type HealthChecker_Expecter

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

func (*HealthChecker_Expecter) CheckEndpointHealth

func (_e *HealthChecker_Expecter) CheckEndpointHealth(ctx interface{}, endpoint interface{}, expectedStatusCodeRanges interface{}, endpointsSecret interface{}) *HealthChecker_CheckEndpointHealth_Call

CheckEndpointHealth is a helper method to define mock.On call

  • ctx context.Context
  • endpoint string
  • expectedStatusCodeRanges []v1alpha1.StatusCodeRange
  • endpointsSecret v1alpha1.EndpointsSecret

type LogSink

type LogSink struct {
	mock.Mock
}

LogSink is an autogenerated mock type for the LogSink type

func NewLogSink

func NewLogSink(t interface {
	mock.TestingT
	Cleanup(func())
}) *LogSink

NewLogSink creates a new instance of LogSink. 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 (*LogSink) EXPECT

func (_m *LogSink) EXPECT() *LogSink_Expecter

func (*LogSink) Enabled

func (_m *LogSink) Enabled(level int) bool

Enabled provides a mock function with given fields: level

func (*LogSink) Error

func (_m *LogSink) Error(err error, msg string, keysAndValues ...interface{})

Error provides a mock function with given fields: err, msg, keysAndValues

func (*LogSink) Info

func (_m *LogSink) Info(level int, msg string, keysAndValues ...interface{})

Info provides a mock function with given fields: level, msg, keysAndValues

func (*LogSink) Init

func (_m *LogSink) Init(info logr.RuntimeInfo)

Init provides a mock function with given fields: info

func (*LogSink) WithName

func (_m *LogSink) WithName(name string) logr.LogSink

WithName provides a mock function with given fields: name

func (*LogSink) WithValues

func (_m *LogSink) WithValues(keysAndValues ...interface{}) logr.LogSink

WithValues provides a mock function with given fields: keysAndValues

type LogSink_Enabled_Call

type LogSink_Enabled_Call struct {
	*mock.Call
}

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

func (*LogSink_Enabled_Call) Return

func (*LogSink_Enabled_Call) Run

func (_c *LogSink_Enabled_Call) Run(run func(level int)) *LogSink_Enabled_Call

func (*LogSink_Enabled_Call) RunAndReturn

func (_c *LogSink_Enabled_Call) RunAndReturn(run func(int) bool) *LogSink_Enabled_Call

type LogSink_Error_Call

type LogSink_Error_Call struct {
	*mock.Call
}

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

func (*LogSink_Error_Call) Return

func (_c *LogSink_Error_Call) Return() *LogSink_Error_Call

func (*LogSink_Error_Call) Run

func (_c *LogSink_Error_Call) Run(run func(err error, msg string, keysAndValues ...interface{})) *LogSink_Error_Call

func (*LogSink_Error_Call) RunAndReturn

func (_c *LogSink_Error_Call) RunAndReturn(run func(error, string, ...interface{})) *LogSink_Error_Call

type LogSink_Expecter

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

func (*LogSink_Expecter) Enabled

func (_e *LogSink_Expecter) Enabled(level interface{}) *LogSink_Enabled_Call

Enabled is a helper method to define mock.On call

  • level int

func (*LogSink_Expecter) Error

func (_e *LogSink_Expecter) Error(err interface{}, msg interface{}, keysAndValues ...interface{}) *LogSink_Error_Call

Error is a helper method to define mock.On call

  • err error
  • msg string
  • keysAndValues ...interface{}

func (*LogSink_Expecter) Info

func (_e *LogSink_Expecter) Info(level interface{}, msg interface{}, keysAndValues ...interface{}) *LogSink_Info_Call

Info is a helper method to define mock.On call

  • level int
  • msg string
  • keysAndValues ...interface{}

func (*LogSink_Expecter) Init

func (_e *LogSink_Expecter) Init(info interface{}) *LogSink_Init_Call

Init is a helper method to define mock.On call

  • info logr.RuntimeInfo

func (*LogSink_Expecter) WithName

func (_e *LogSink_Expecter) WithName(name interface{}) *LogSink_WithName_Call

WithName is a helper method to define mock.On call

  • name string

func (*LogSink_Expecter) WithValues

func (_e *LogSink_Expecter) WithValues(keysAndValues ...interface{}) *LogSink_WithValues_Call

WithValues is a helper method to define mock.On call

  • keysAndValues ...interface{}

type LogSink_Info_Call

type LogSink_Info_Call struct {
	*mock.Call
}

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

func (*LogSink_Info_Call) Return

func (_c *LogSink_Info_Call) Return() *LogSink_Info_Call

func (*LogSink_Info_Call) Run

func (_c *LogSink_Info_Call) Run(run func(level int, msg string, keysAndValues ...interface{})) *LogSink_Info_Call

func (*LogSink_Info_Call) RunAndReturn

func (_c *LogSink_Info_Call) RunAndReturn(run func(int, string, ...interface{})) *LogSink_Info_Call

type LogSink_Init_Call

type LogSink_Init_Call struct {
	*mock.Call
}

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

func (*LogSink_Init_Call) Return

func (_c *LogSink_Init_Call) Return() *LogSink_Init_Call

func (*LogSink_Init_Call) Run

func (_c *LogSink_Init_Call) Run(run func(info logr.RuntimeInfo)) *LogSink_Init_Call

func (*LogSink_Init_Call) RunAndReturn

func (_c *LogSink_Init_Call) RunAndReturn(run func(logr.RuntimeInfo)) *LogSink_Init_Call

type LogSink_WithName_Call

type LogSink_WithName_Call struct {
	*mock.Call
}

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

func (*LogSink_WithName_Call) Return

func (*LogSink_WithName_Call) Run

func (_c *LogSink_WithName_Call) Run(run func(name string)) *LogSink_WithName_Call

func (*LogSink_WithName_Call) RunAndReturn

func (_c *LogSink_WithName_Call) RunAndReturn(run func(string) logr.LogSink) *LogSink_WithName_Call

type LogSink_WithValues_Call

type LogSink_WithValues_Call struct {
	*mock.Call
}

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

func (*LogSink_WithValues_Call) Return

func (*LogSink_WithValues_Call) Run

func (_c *LogSink_WithValues_Call) Run(run func(keysAndValues ...interface{})) *LogSink_WithValues_Call

func (*LogSink_WithValues_Call) RunAndReturn

func (_c *LogSink_WithValues_Call) RunAndReturn(run func(...interface{}) logr.LogSink) *LogSink_WithValues_Call

Jump to

Keyboard shortcuts

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