mocks

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockBackend

type MockBackend struct {
	mock.Mock
}

MockBackend is an autogenerated mock type for the Backend type

func NewMockBackend

func NewMockBackend(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBackend

NewMockBackend creates a new instance of MockBackend. 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 (*MockBackend) CancelWorkflowInstance

func (_mock *MockBackend) CancelWorkflowInstance(ctx context.Context, instance *workflow.Instance, cancelEvent *history.Event) error

CancelWorkflowInstance provides a mock function for the type MockBackend

func (*MockBackend) Close

func (_mock *MockBackend) Close() error

Close provides a mock function for the type MockBackend

func (*MockBackend) CompleteActivityTask

func (_mock *MockBackend) CompleteActivityTask(ctx context.Context, task *backend.ActivityTask, result *history.Event) error

CompleteActivityTask provides a mock function for the type MockBackend

func (*MockBackend) CompleteWorkflowTask

func (_mock *MockBackend) CompleteWorkflowTask(ctx context.Context, task *backend.WorkflowTask, state core.WorkflowInstanceState, executedEvents []*history.Event, activityEvents []*history.Event, timerEvents []*history.Event, workflowEvents []*history.WorkflowEvent) error

CompleteWorkflowTask provides a mock function for the type MockBackend

func (*MockBackend) CreateWorkflowInstance

func (_mock *MockBackend) CreateWorkflowInstance(ctx context.Context, instance *workflow.Instance, event *history.Event) error

CreateWorkflowInstance provides a mock function for the type MockBackend

func (*MockBackend) EXPECT

func (_m *MockBackend) EXPECT() *MockBackend_Expecter

func (*MockBackend) ExtendActivityTask

func (_mock *MockBackend) ExtendActivityTask(ctx context.Context, task *backend.ActivityTask) error

ExtendActivityTask provides a mock function for the type MockBackend

func (*MockBackend) ExtendWorkflowTask

func (_mock *MockBackend) ExtendWorkflowTask(ctx context.Context, task *backend.WorkflowTask) error

ExtendWorkflowTask provides a mock function for the type MockBackend

func (*MockBackend) FeatureSupported

func (_mock *MockBackend) FeatureSupported(feature backend.Feature) bool

FeatureSupported provides a mock function for the type MockBackend

func (*MockBackend) GetActivityTask

func (_mock *MockBackend) GetActivityTask(ctx context.Context, queues []workflow.Queue) (*backend.ActivityTask, error)

GetActivityTask provides a mock function for the type MockBackend

func (*MockBackend) GetStats

func (_mock *MockBackend) GetStats(ctx context.Context) (*backend.Stats, error)

GetStats provides a mock function for the type MockBackend

func (*MockBackend) GetWorkflowInstanceHistory

func (_mock *MockBackend) GetWorkflowInstanceHistory(ctx context.Context, instance *workflow.Instance, lastSequenceID *int64) ([]*history.Event, error)

GetWorkflowInstanceHistory provides a mock function for the type MockBackend

func (*MockBackend) GetWorkflowInstanceState

func (_mock *MockBackend) GetWorkflowInstanceState(ctx context.Context, instance *workflow.Instance) (core.WorkflowInstanceState, error)

GetWorkflowInstanceState provides a mock function for the type MockBackend

func (*MockBackend) GetWorkflowTask

func (_mock *MockBackend) GetWorkflowTask(ctx context.Context, queues []workflow.Queue) (*backend.WorkflowTask, error)

GetWorkflowTask provides a mock function for the type MockBackend

func (*MockBackend) Metrics

func (_mock *MockBackend) Metrics() metrics.Client

Metrics provides a mock function for the type MockBackend

func (*MockBackend) Options

func (_mock *MockBackend) Options() *backend.Options

Options provides a mock function for the type MockBackend

func (*MockBackend) PrepareActivityQueues

func (_mock *MockBackend) PrepareActivityQueues(ctx context.Context, queues []workflow.Queue) error

PrepareActivityQueues provides a mock function for the type MockBackend

func (*MockBackend) PrepareWorkflowQueues

func (_mock *MockBackend) PrepareWorkflowQueues(ctx context.Context, queues []workflow.Queue) error

PrepareWorkflowQueues provides a mock function for the type MockBackend

func (*MockBackend) RemoveWorkflowInstance

func (_mock *MockBackend) RemoveWorkflowInstance(ctx context.Context, instance *workflow.Instance) error

RemoveWorkflowInstance provides a mock function for the type MockBackend

func (*MockBackend) RemoveWorkflowInstances

func (_mock *MockBackend) RemoveWorkflowInstances(ctx context.Context, options ...backend.RemovalOption) error

RemoveWorkflowInstances provides a mock function for the type MockBackend

func (*MockBackend) SignalWorkflow

func (_mock *MockBackend) SignalWorkflow(ctx context.Context, instanceID string, event *history.Event) error

SignalWorkflow provides a mock function for the type MockBackend

func (*MockBackend) Tracer

func (_mock *MockBackend) Tracer() trace.Tracer

Tracer provides a mock function for the type MockBackend

type MockBackend_CancelWorkflowInstance_Call

type MockBackend_CancelWorkflowInstance_Call struct {
	*mock.Call
}

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

func (*MockBackend_CancelWorkflowInstance_Call) Return

func (*MockBackend_CancelWorkflowInstance_Call) Run

func (*MockBackend_CancelWorkflowInstance_Call) RunAndReturn

type MockBackend_Close_Call

type MockBackend_Close_Call struct {
	*mock.Call
}

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

func (*MockBackend_Close_Call) Return

func (*MockBackend_Close_Call) Run

func (_c *MockBackend_Close_Call) Run(run func()) *MockBackend_Close_Call

func (*MockBackend_Close_Call) RunAndReturn

func (_c *MockBackend_Close_Call) RunAndReturn(run func() error) *MockBackend_Close_Call

type MockBackend_CompleteActivityTask_Call

type MockBackend_CompleteActivityTask_Call struct {
	*mock.Call
}

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

func (*MockBackend_CompleteActivityTask_Call) Return

func (*MockBackend_CompleteActivityTask_Call) Run

func (*MockBackend_CompleteActivityTask_Call) RunAndReturn

type MockBackend_CompleteWorkflowTask_Call

type MockBackend_CompleteWorkflowTask_Call struct {
	*mock.Call
}

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

func (*MockBackend_CompleteWorkflowTask_Call) Return

func (*MockBackend_CompleteWorkflowTask_Call) Run

func (_c *MockBackend_CompleteWorkflowTask_Call) Run(run func(ctx context.Context, task *backend.WorkflowTask, state core.WorkflowInstanceState, executedEvents []*history.Event, activityEvents []*history.Event, timerEvents []*history.Event, workflowEvents []*history.WorkflowEvent)) *MockBackend_CompleteWorkflowTask_Call

func (*MockBackend_CompleteWorkflowTask_Call) RunAndReturn

func (_c *MockBackend_CompleteWorkflowTask_Call) RunAndReturn(run func(ctx context.Context, task *backend.WorkflowTask, state core.WorkflowInstanceState, executedEvents []*history.Event, activityEvents []*history.Event, timerEvents []*history.Event, workflowEvents []*history.WorkflowEvent) error) *MockBackend_CompleteWorkflowTask_Call

type MockBackend_CreateWorkflowInstance_Call

type MockBackend_CreateWorkflowInstance_Call struct {
	*mock.Call
}

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

func (*MockBackend_CreateWorkflowInstance_Call) Return

func (*MockBackend_CreateWorkflowInstance_Call) Run

func (*MockBackend_CreateWorkflowInstance_Call) RunAndReturn

type MockBackend_Expecter

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

func (*MockBackend_Expecter) CancelWorkflowInstance

func (_e *MockBackend_Expecter) CancelWorkflowInstance(ctx interface{}, instance interface{}, cancelEvent interface{}) *MockBackend_CancelWorkflowInstance_Call

CancelWorkflowInstance is a helper method to define mock.On call

  • ctx context.Context
  • instance *workflow.Instance
  • cancelEvent *history.Event

func (*MockBackend_Expecter) Close

Close is a helper method to define mock.On call

func (*MockBackend_Expecter) CompleteActivityTask

func (_e *MockBackend_Expecter) CompleteActivityTask(ctx interface{}, task interface{}, result interface{}) *MockBackend_CompleteActivityTask_Call

CompleteActivityTask is a helper method to define mock.On call

  • ctx context.Context
  • task *backend.ActivityTask
  • result *history.Event

func (*MockBackend_Expecter) CompleteWorkflowTask

func (_e *MockBackend_Expecter) CompleteWorkflowTask(ctx interface{}, task interface{}, state interface{}, executedEvents interface{}, activityEvents interface{}, timerEvents interface{}, workflowEvents interface{}) *MockBackend_CompleteWorkflowTask_Call

CompleteWorkflowTask is a helper method to define mock.On call

  • ctx context.Context
  • task *backend.WorkflowTask
  • state core.WorkflowInstanceState
  • executedEvents []*history.Event
  • activityEvents []*history.Event
  • timerEvents []*history.Event
  • workflowEvents []*history.WorkflowEvent

func (*MockBackend_Expecter) CreateWorkflowInstance

func (_e *MockBackend_Expecter) CreateWorkflowInstance(ctx interface{}, instance interface{}, event interface{}) *MockBackend_CreateWorkflowInstance_Call

CreateWorkflowInstance is a helper method to define mock.On call

  • ctx context.Context
  • instance *workflow.Instance
  • event *history.Event

func (*MockBackend_Expecter) ExtendActivityTask

func (_e *MockBackend_Expecter) ExtendActivityTask(ctx interface{}, task interface{}) *MockBackend_ExtendActivityTask_Call

ExtendActivityTask is a helper method to define mock.On call

  • ctx context.Context
  • task *backend.ActivityTask

func (*MockBackend_Expecter) ExtendWorkflowTask

func (_e *MockBackend_Expecter) ExtendWorkflowTask(ctx interface{}, task interface{}) *MockBackend_ExtendWorkflowTask_Call

ExtendWorkflowTask is a helper method to define mock.On call

  • ctx context.Context
  • task *backend.WorkflowTask

func (*MockBackend_Expecter) FeatureSupported

func (_e *MockBackend_Expecter) FeatureSupported(feature interface{}) *MockBackend_FeatureSupported_Call

FeatureSupported is a helper method to define mock.On call

  • feature backend.Feature

func (*MockBackend_Expecter) GetActivityTask

func (_e *MockBackend_Expecter) GetActivityTask(ctx interface{}, queues interface{}) *MockBackend_GetActivityTask_Call

GetActivityTask is a helper method to define mock.On call

  • ctx context.Context
  • queues []workflow.Queue

func (*MockBackend_Expecter) GetStats

func (_e *MockBackend_Expecter) GetStats(ctx interface{}) *MockBackend_GetStats_Call

GetStats is a helper method to define mock.On call

  • ctx context.Context

func (*MockBackend_Expecter) GetWorkflowInstanceHistory

func (_e *MockBackend_Expecter) GetWorkflowInstanceHistory(ctx interface{}, instance interface{}, lastSequenceID interface{}) *MockBackend_GetWorkflowInstanceHistory_Call

GetWorkflowInstanceHistory is a helper method to define mock.On call

  • ctx context.Context
  • instance *workflow.Instance
  • lastSequenceID *int64

func (*MockBackend_Expecter) GetWorkflowInstanceState

func (_e *MockBackend_Expecter) GetWorkflowInstanceState(ctx interface{}, instance interface{}) *MockBackend_GetWorkflowInstanceState_Call

GetWorkflowInstanceState is a helper method to define mock.On call

  • ctx context.Context
  • instance *workflow.Instance

func (*MockBackend_Expecter) GetWorkflowTask

func (_e *MockBackend_Expecter) GetWorkflowTask(ctx interface{}, queues interface{}) *MockBackend_GetWorkflowTask_Call

GetWorkflowTask is a helper method to define mock.On call

  • ctx context.Context
  • queues []workflow.Queue

func (*MockBackend_Expecter) Metrics

Metrics is a helper method to define mock.On call

func (*MockBackend_Expecter) Options

Options is a helper method to define mock.On call

func (*MockBackend_Expecter) PrepareActivityQueues

func (_e *MockBackend_Expecter) PrepareActivityQueues(ctx interface{}, queues interface{}) *MockBackend_PrepareActivityQueues_Call

PrepareActivityQueues is a helper method to define mock.On call

  • ctx context.Context
  • queues []workflow.Queue

func (*MockBackend_Expecter) PrepareWorkflowQueues

func (_e *MockBackend_Expecter) PrepareWorkflowQueues(ctx interface{}, queues interface{}) *MockBackend_PrepareWorkflowQueues_Call

PrepareWorkflowQueues is a helper method to define mock.On call

  • ctx context.Context
  • queues []workflow.Queue

func (*MockBackend_Expecter) RemoveWorkflowInstance

func (_e *MockBackend_Expecter) RemoveWorkflowInstance(ctx interface{}, instance interface{}) *MockBackend_RemoveWorkflowInstance_Call

RemoveWorkflowInstance is a helper method to define mock.On call

  • ctx context.Context
  • instance *workflow.Instance

func (*MockBackend_Expecter) RemoveWorkflowInstances

func (_e *MockBackend_Expecter) RemoveWorkflowInstances(ctx interface{}, options ...interface{}) *MockBackend_RemoveWorkflowInstances_Call

RemoveWorkflowInstances is a helper method to define mock.On call

  • ctx context.Context
  • options ...backend.RemovalOption

func (*MockBackend_Expecter) SignalWorkflow

func (_e *MockBackend_Expecter) SignalWorkflow(ctx interface{}, instanceID interface{}, event interface{}) *MockBackend_SignalWorkflow_Call

SignalWorkflow is a helper method to define mock.On call

  • ctx context.Context
  • instanceID string
  • event *history.Event

func (*MockBackend_Expecter) Tracer

Tracer is a helper method to define mock.On call

type MockBackend_ExtendActivityTask_Call

type MockBackend_ExtendActivityTask_Call struct {
	*mock.Call
}

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

func (*MockBackend_ExtendActivityTask_Call) Return

func (*MockBackend_ExtendActivityTask_Call) Run

func (*MockBackend_ExtendActivityTask_Call) RunAndReturn

type MockBackend_ExtendWorkflowTask_Call

type MockBackend_ExtendWorkflowTask_Call struct {
	*mock.Call
}

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

func (*MockBackend_ExtendWorkflowTask_Call) Return

func (*MockBackend_ExtendWorkflowTask_Call) Run

func (*MockBackend_ExtendWorkflowTask_Call) RunAndReturn

type MockBackend_FeatureSupported_Call

type MockBackend_FeatureSupported_Call struct {
	*mock.Call
}

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

func (*MockBackend_FeatureSupported_Call) Return

func (*MockBackend_FeatureSupported_Call) Run

func (*MockBackend_FeatureSupported_Call) RunAndReturn

type MockBackend_GetActivityTask_Call

type MockBackend_GetActivityTask_Call struct {
	*mock.Call
}

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

func (*MockBackend_GetActivityTask_Call) Return

func (*MockBackend_GetActivityTask_Call) Run

func (*MockBackend_GetActivityTask_Call) RunAndReturn

type MockBackend_GetStats_Call

type MockBackend_GetStats_Call struct {
	*mock.Call
}

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

func (*MockBackend_GetStats_Call) Return

func (*MockBackend_GetStats_Call) Run

func (*MockBackend_GetStats_Call) RunAndReturn

type MockBackend_GetWorkflowInstanceHistory_Call

type MockBackend_GetWorkflowInstanceHistory_Call struct {
	*mock.Call
}

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

func (*MockBackend_GetWorkflowInstanceHistory_Call) Return

func (*MockBackend_GetWorkflowInstanceHistory_Call) Run

func (*MockBackend_GetWorkflowInstanceHistory_Call) RunAndReturn

type MockBackend_GetWorkflowInstanceState_Call

type MockBackend_GetWorkflowInstanceState_Call struct {
	*mock.Call
}

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

func (*MockBackend_GetWorkflowInstanceState_Call) Return

func (*MockBackend_GetWorkflowInstanceState_Call) Run

func (*MockBackend_GetWorkflowInstanceState_Call) RunAndReturn

type MockBackend_GetWorkflowTask_Call

type MockBackend_GetWorkflowTask_Call struct {
	*mock.Call
}

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

func (*MockBackend_GetWorkflowTask_Call) Return

func (*MockBackend_GetWorkflowTask_Call) Run

func (*MockBackend_GetWorkflowTask_Call) RunAndReturn

type MockBackend_Metrics_Call

type MockBackend_Metrics_Call struct {
	*mock.Call
}

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

func (*MockBackend_Metrics_Call) Return

func (*MockBackend_Metrics_Call) Run

func (*MockBackend_Metrics_Call) RunAndReturn

func (_c *MockBackend_Metrics_Call) RunAndReturn(run func() metrics.Client) *MockBackend_Metrics_Call

type MockBackend_Options_Call

type MockBackend_Options_Call struct {
	*mock.Call
}

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

func (*MockBackend_Options_Call) Return

func (*MockBackend_Options_Call) Run

func (*MockBackend_Options_Call) RunAndReturn

func (_c *MockBackend_Options_Call) RunAndReturn(run func() *backend.Options) *MockBackend_Options_Call

type MockBackend_PrepareActivityQueues_Call

type MockBackend_PrepareActivityQueues_Call struct {
	*mock.Call
}

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

func (*MockBackend_PrepareActivityQueues_Call) Return

func (*MockBackend_PrepareActivityQueues_Call) Run

func (*MockBackend_PrepareActivityQueues_Call) RunAndReturn

type MockBackend_PrepareWorkflowQueues_Call

type MockBackend_PrepareWorkflowQueues_Call struct {
	*mock.Call
}

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

func (*MockBackend_PrepareWorkflowQueues_Call) Return

func (*MockBackend_PrepareWorkflowQueues_Call) Run

func (*MockBackend_PrepareWorkflowQueues_Call) RunAndReturn

type MockBackend_RemoveWorkflowInstance_Call

type MockBackend_RemoveWorkflowInstance_Call struct {
	*mock.Call
}

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

func (*MockBackend_RemoveWorkflowInstance_Call) Return

func (*MockBackend_RemoveWorkflowInstance_Call) Run

func (*MockBackend_RemoveWorkflowInstance_Call) RunAndReturn

type MockBackend_RemoveWorkflowInstances_Call

type MockBackend_RemoveWorkflowInstances_Call struct {
	*mock.Call
}

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

func (*MockBackend_RemoveWorkflowInstances_Call) Return

func (*MockBackend_RemoveWorkflowInstances_Call) Run

func (*MockBackend_RemoveWorkflowInstances_Call) RunAndReturn

type MockBackend_SignalWorkflow_Call

type MockBackend_SignalWorkflow_Call struct {
	*mock.Call
}

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

func (*MockBackend_SignalWorkflow_Call) Return

func (*MockBackend_SignalWorkflow_Call) Run

func (*MockBackend_SignalWorkflow_Call) RunAndReturn

func (_c *MockBackend_SignalWorkflow_Call) RunAndReturn(run func(ctx context.Context, instanceID string, event *history.Event) error) *MockBackend_SignalWorkflow_Call

type MockBackend_Tracer_Call

type MockBackend_Tracer_Call struct {
	*mock.Call
}

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

func (*MockBackend_Tracer_Call) Return

func (*MockBackend_Tracer_Call) Run

func (_c *MockBackend_Tracer_Call) Run(run func()) *MockBackend_Tracer_Call

func (*MockBackend_Tracer_Call) RunAndReturn

func (_c *MockBackend_Tracer_Call) RunAndReturn(run func() trace.Tracer) *MockBackend_Tracer_Call

Jump to

Keyboard shortcuts

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