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

mocks

package
v0.17.28 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextFactoryMock

type ContextFactoryMock struct {
	mock.Mock
}

ContextFactoryMock is an autogenerated mock type for the ContextFactory type

func NewContextFactoryMock

func NewContextFactoryMock(t interface {
	mock.TestingT
	Cleanup(func())
}) *ContextFactoryMock

NewContextFactoryMock creates a new instance of ContextFactoryMock. 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 (*ContextFactoryMock) Create

Create provides a mock function for the type ContextFactoryMock

func (*ContextFactoryMock) Destroy added in v0.17.9

func (_mock *ContextFactoryMock) Destroy(ctx requestcontext.Context)

Destroy provides a mock function for the type ContextFactoryMock

func (*ContextFactoryMock) EXPECT

type ContextFactoryMock_Create_Call

type ContextFactoryMock_Create_Call struct {
	*mock.Call
}

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

func (*ContextFactoryMock_Create_Call) Return

func (*ContextFactoryMock_Create_Call) Run

func (*ContextFactoryMock_Create_Call) RunAndReturn

type ContextFactoryMock_Destroy_Call added in v0.17.9

type ContextFactoryMock_Destroy_Call struct {
	*mock.Call
}

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

func (*ContextFactoryMock_Destroy_Call) Return added in v0.17.9

func (*ContextFactoryMock_Destroy_Call) Run added in v0.17.9

func (*ContextFactoryMock_Destroy_Call) RunAndReturn added in v0.17.9

type ContextFactoryMock_Expecter

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

func (*ContextFactoryMock_Expecter) Create

func (_e *ContextFactoryMock_Expecter) Create(rw interface{}, req interface{}) *ContextFactoryMock_Create_Call

Create is a helper method to define mock.On call

  • rw http.ResponseWriter
  • req *http.Request

func (*ContextFactoryMock_Expecter) Destroy added in v0.17.9

func (_e *ContextFactoryMock_Expecter) Destroy(ctx interface{}) *ContextFactoryMock_Destroy_Call

Destroy is a helper method to define mock.On call

  • ctx requestcontext.Context

type ContextMock

type ContextMock struct {
	mock.Mock
}

ContextMock is an autogenerated mock type for the Context type

func NewContextMock

func NewContextMock(t interface {
	mock.TestingT
	Cleanup(func())
}) *ContextMock

NewContextMock creates a new instance of ContextMock. 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 (*ContextMock) AddCookieForUpstream

func (_mock *ContextMock) AddCookieForUpstream(name string, value string)

AddCookieForUpstream provides a mock function for the type ContextMock

func (*ContextMock) AddHeaderForUpstream

func (_mock *ContextMock) AddHeaderForUpstream(name string, value string)

AddHeaderForUpstream provides a mock function for the type ContextMock

func (*ContextMock) Context added in v0.16.0

func (_mock *ContextMock) Context() context.Context

Context provides a mock function for the type ContextMock

func (*ContextMock) EXPECT

func (_m *ContextMock) EXPECT() *ContextMock_Expecter

func (*ContextMock) Finalize

func (_mock *ContextMock) Finalize(backend rule.Backend) error

Finalize provides a mock function for the type ContextMock

func (*ContextMock) Outputs

func (_mock *ContextMock) Outputs() map[string]any

Outputs provides a mock function for the type ContextMock

func (*ContextMock) Request

func (_mock *ContextMock) Request() *heimdall.Request

Request provides a mock function for the type ContextMock

func (*ContextMock) Results added in v0.17.21

func (_mock *ContextMock) Results() heimdall.Results

Results provides a mock function for the type ContextMock

func (*ContextMock) SetPipelineError

func (_mock *ContextMock) SetPipelineError(err error)

SetPipelineError provides a mock function for the type ContextMock

type ContextMock_AddCookieForUpstream_Call

type ContextMock_AddCookieForUpstream_Call struct {
	*mock.Call
}

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

func (*ContextMock_AddCookieForUpstream_Call) Return

func (*ContextMock_AddCookieForUpstream_Call) Run

func (*ContextMock_AddCookieForUpstream_Call) RunAndReturn

type ContextMock_AddHeaderForUpstream_Call

type ContextMock_AddHeaderForUpstream_Call struct {
	*mock.Call
}

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

func (*ContextMock_AddHeaderForUpstream_Call) Return

func (*ContextMock_AddHeaderForUpstream_Call) Run

func (*ContextMock_AddHeaderForUpstream_Call) RunAndReturn

type ContextMock_Context_Call added in v0.16.0

type ContextMock_Context_Call struct {
	*mock.Call
}

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

func (*ContextMock_Context_Call) Return added in v0.16.0

func (*ContextMock_Context_Call) Run added in v0.16.0

func (*ContextMock_Context_Call) RunAndReturn added in v0.16.0

func (_c *ContextMock_Context_Call) RunAndReturn(run func() context.Context) *ContextMock_Context_Call

type ContextMock_Expecter

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

func (*ContextMock_Expecter) AddCookieForUpstream

func (_e *ContextMock_Expecter) AddCookieForUpstream(name interface{}, value interface{}) *ContextMock_AddCookieForUpstream_Call

AddCookieForUpstream is a helper method to define mock.On call

  • name string
  • value string

func (*ContextMock_Expecter) AddHeaderForUpstream

func (_e *ContextMock_Expecter) AddHeaderForUpstream(name interface{}, value interface{}) *ContextMock_AddHeaderForUpstream_Call

AddHeaderForUpstream is a helper method to define mock.On call

  • name string
  • value string

func (*ContextMock_Expecter) Context added in v0.16.0

Context is a helper method to define mock.On call

func (*ContextMock_Expecter) Finalize

func (_e *ContextMock_Expecter) Finalize(backend interface{}) *ContextMock_Finalize_Call

Finalize is a helper method to define mock.On call

  • backend rule.Backend

func (*ContextMock_Expecter) Outputs

Outputs is a helper method to define mock.On call

func (*ContextMock_Expecter) Request

Request is a helper method to define mock.On call

func (*ContextMock_Expecter) Results added in v0.17.21

Outputs is a helper method to define mock.On call

func (*ContextMock_Expecter) SetPipelineError

func (_e *ContextMock_Expecter) SetPipelineError(err interface{}) *ContextMock_SetPipelineError_Call

SetPipelineError is a helper method to define mock.On call

  • err error

type ContextMock_Finalize_Call

type ContextMock_Finalize_Call struct {
	*mock.Call
}

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

func (*ContextMock_Finalize_Call) Return

func (*ContextMock_Finalize_Call) Run

func (*ContextMock_Finalize_Call) RunAndReturn

func (_c *ContextMock_Finalize_Call) RunAndReturn(run func(backend rule.Backend) error) *ContextMock_Finalize_Call

type ContextMock_Outputs_Call

type ContextMock_Outputs_Call struct {
	*mock.Call
}

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

func (*ContextMock_Outputs_Call) Return

func (_c *ContextMock_Outputs_Call) Return(stringToV map[string]any) *ContextMock_Outputs_Call

func (*ContextMock_Outputs_Call) Run

func (*ContextMock_Outputs_Call) RunAndReturn

func (_c *ContextMock_Outputs_Call) RunAndReturn(run func() map[string]any) *ContextMock_Outputs_Call

type ContextMock_Request_Call

type ContextMock_Request_Call struct {
	*mock.Call
}

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

func (*ContextMock_Request_Call) Return

func (*ContextMock_Request_Call) Run

func (*ContextMock_Request_Call) RunAndReturn

func (_c *ContextMock_Request_Call) RunAndReturn(run func() *heimdall.Request) *ContextMock_Request_Call

type ContextMock_Results_Call added in v0.17.21

type ContextMock_Results_Call struct {
	*mock.Call
}

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

func (*ContextMock_Results_Call) Return added in v0.17.21

func (*ContextMock_Results_Call) Run added in v0.17.21

func (*ContextMock_Results_Call) RunAndReturn added in v0.17.21

func (_c *ContextMock_Results_Call) RunAndReturn(run func() heimdall.Results) *ContextMock_Results_Call

type ContextMock_SetPipelineError_Call

type ContextMock_SetPipelineError_Call struct {
	*mock.Call
}

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

func (*ContextMock_SetPipelineError_Call) Return

func (*ContextMock_SetPipelineError_Call) Run

func (*ContextMock_SetPipelineError_Call) RunAndReturn

Jump to

Keyboard shortcuts

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