go.temporal.io/server/chasm/task_mock.go

200 LOC · 68 covered · 132 uncovered · 14 ranges · 201 concepts · 7 introducers · 134 tests

File neighbourhood

The centred file is linked to every concept that introduces one of its ranges, every test that runs code from the file, and the gray connector concepts standing between those tests and the file's own introducer concepts. Undirected links join concepts to every file where they introduce source and concepts to the tests they introduce; arrows show specialization between the displayed concepts and bridge only concepts omitted from this view. Concept colors match the source ranges below; connector concepts have no source color and are shown in gray.

Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the file

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the related-file, concept, and source links on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the related-file, concept, and source links on this page while the interactive map is unavailable.

1 // Code generated by MockGen. DO NOT EDIT.
2 // Source: task.go
3 //
4 // Generated by this command:
5 //
6 // mockgen -package chasm -source task.go -destination task_mock.go
7 //
8
9 // Package chasm is a generated GoMock package.
10 package chasm
11
12 import (
13 context "context"
14 reflect "reflect"
15
16 gomock "go.uber.org/mock/gomock"
17 )
18
19 // MockSideEffectTaskHandler is a mock of SideEffectTaskHandler interface.
20 type MockSideEffectTaskHandler[C any, T any] struct {
21 ctrl *gomock.Controller
22 recorder *MockSideEffectTaskHandlerMockRecorder[C, T]
23 isgomock struct{}
24 }
25
26 // MockSideEffectTaskHandlerMockRecorder is the mock recorder for MockSideEffectTaskHandler.
27 type MockSideEffectTaskHandlerMockRecorder[C any, T any] struct {
28 mock *MockSideEffectTaskHandler[C, T]
29 }
30
31 // NewMockSideEffectTaskHandler creates a new mock instance.
32 > func NewMockSideEffectTaskHandler[C any, T any](ctrl *gomock.Controller) *MockSideEffectTaskHandler[C, T] { task_mock.go ×1
33 > mock := &MockSideEffectTaskHandler[C, T]{ctrl: ctrl}
34 > mock.recorder = &MockSideEffectTaskHandlerMockRecorder[C, T]{mock}
35 > return mock
36 > }
37
38 // EXPECT returns an object that allows the caller to indicate expected use.
39 > func (m *MockSideEffectTaskHandler[C, T]) EXPECT() *MockSideEffectTaskHandlerMockRecorder[C, T] { task_mock.go ×3
40 > return m.recorder
41 > }
42
43 // Discard mocks base method.
44 > func (m *MockSideEffectTaskHandler[C, T]) Discard(arg0 context.Context, arg1 ComponentRef, arg2 TaskAttributes, arg3 T) error { tree.go ×3
45 > m.ctrl.T.Helper()
46 > ret := m.ctrl.Call(m, "Discard", arg0, arg1, arg2, arg3)
47 > ret0, _ := ret[0].(error)
48 > return ret0
49 > }
50
51 // Discard indicates an expected call of Discard.
52 > func (mr *MockSideEffectTaskHandlerMockRecorder[C, T]) Discard(arg0, arg1, arg2, arg3 any) *gomock.Call { tree.go ×3
53 > mr.mock.ctrl.T.Helper()
54 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Discard", reflect.TypeOf((*MockSideEffectTaskHandler[C, T])(nil).Discard), arg0, arg1, arg2, arg3)
55 > }
56
57 // Execute mocks base method.
58 > func (m *MockSideEffectTaskHandler[C, T]) Execute(arg0 context.Context, arg1 ComponentRef, arg2 TaskAttributes, arg3 T) error { task_mock.go ×2
59 > m.ctrl.T.Helper()
60 > ret := m.ctrl.Call(m, "Execute", arg0, arg1, arg2, arg3)
61 > ret0, _ := ret[0].(error)
62 > return ret0
63 > }
64
65 // Execute indicates an expected call of Execute.
66 > func (mr *MockSideEffectTaskHandlerMockRecorder[C, T]) Execute(arg0, arg1, arg2, arg3 any) *gomock.Call { task_mock.go ×2
67 > mr.mock.ctrl.T.Helper()
68 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Execute", reflect.TypeOf((*MockSideEffectTaskHandler[C, T])(nil).Execute), arg0, arg1, arg2, arg3)
69 > }
70
71 // Validate mocks base method.
72 > func (m *MockSideEffectTaskHandler[C, T]) Validate(arg0 Context, arg1 C, arg2 TaskInvocation, arg3 T) (bool, error) { task_mock.go ×3
73 > m.ctrl.T.Helper()
74 > ret := m.ctrl.Call(m, "Validate", arg0, arg1, arg2, arg3)
75 > ret0, _ := ret[0].(bool)
76 > ret1, _ := ret[1].(error)
77 > return ret0, ret1
78 > }
79
80 // Validate indicates an expected call of Validate.
81 > func (mr *MockSideEffectTaskHandlerMockRecorder[C, T]) Validate(arg0, arg1, arg2, arg3 any) *gomock.Call { task_mock.go ×3
82 > mr.mock.ctrl.T.Helper()
83 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockSideEffectTaskHandler[C, T])(nil).Validate), arg0, arg1, arg2, arg3)
84 > }
85
86 // sideEffectTaskHandler mocks base method.
87 func (m *MockSideEffectTaskHandler[C, T]) sideEffectTaskHandler() {
88 m.ctrl.T.Helper()
89 m.ctrl.Call(m, "sideEffectTaskHandler")
90 }
91
92 // sideEffectTaskHandler indicates an expected call of sideEffectTaskHandler.
93 func (mr *MockSideEffectTaskHandlerMockRecorder[C, T]) sideEffectTaskHandler() *gomock.Call {
94 mr.mock.ctrl.T.Helper()
95 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "sideEffectTaskHandler", reflect.TypeOf((*MockSideEffectTaskHandler[C, T])(nil).sideEffectTaskHandler))
96 }
97
98 // MockPureTaskHandler is a mock of PureTaskHandler interface.
99 type MockPureTaskHandler[C any, T any] struct {
100 ctrl *gomock.Controller
101 recorder *MockPureTaskHandlerMockRecorder[C, T]
102 isgomock struct{}
103 }
104
105 // MockPureTaskHandlerMockRecorder is the mock recorder for MockPureTaskHandler.
106 type MockPureTaskHandlerMockRecorder[C any, T any] struct {
107 mock *MockPureTaskHandler[C, T]
108 }
109
110 // NewMockPureTaskHandler creates a new mock instance.
111 > func NewMockPureTaskHandler[C any, T any](ctrl *gomock.Controller) *MockPureTaskHandler[C, T] { task_mock.go ×1
112 > mock := &MockPureTaskHandler[C, T]{ctrl: ctrl}
113 > mock.recorder = &MockPureTaskHandlerMockRecorder[C, T]{mock}
114 > return mock
115 > }
116
117 // EXPECT returns an object that allows the caller to indicate expected use.
118 > func (m *MockPureTaskHandler[C, T]) EXPECT() *MockPureTaskHandlerMockRecorder[C, T] { task_mock.go ×3
119 > return m.recorder
120 > }
121
122 // Execute mocks base method.
123 > func (m *MockPureTaskHandler[C, T]) Execute(arg0 MutableContext, arg1 C, arg2 TaskAttributes, arg3 T) error { task_mock.go ×2
124 > m.ctrl.T.Helper()
125 > ret := m.ctrl.Call(m, "Execute", arg0, arg1, arg2, arg3)
126 > ret0, _ := ret[0].(error)
127 > return ret0
128 > }
129
130 // Execute indicates an expected call of Execute.
131 > func (mr *MockPureTaskHandlerMockRecorder[C, T]) Execute(arg0, arg1, arg2, arg3 any) *gomock.Call { task_mock.go ×2
132 > mr.mock.ctrl.T.Helper()
133 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Execute", reflect.TypeOf((*MockPureTaskHandler[C, T])(nil).Execute), arg0, arg1, arg2, arg3)
134 > }
135
136 // Validate mocks base method.
137 > func (m *MockPureTaskHandler[C, T]) Validate(arg0 Context, arg1 C, arg2 TaskInvocation, arg3 T) (bool, error) { task_mock.go ×3
138 > m.ctrl.T.Helper()
139 > ret := m.ctrl.Call(m, "Validate", arg0, arg1, arg2, arg3)
140 > ret0, _ := ret[0].(bool)
141 > ret1, _ := ret[1].(error)
142 > return ret0, ret1
143 > }
144
145 // Validate indicates an expected call of Validate.
146 > func (mr *MockPureTaskHandlerMockRecorder[C, T]) Validate(arg0, arg1, arg2, arg3 any) *gomock.Call { task_mock.go ×3
147 > mr.mock.ctrl.T.Helper()
148 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockPureTaskHandler[C, T])(nil).Validate), arg0, arg1, arg2, arg3)
149 > }
150
151 // pureTaskHandler mocks base method.
152 func (m *MockPureTaskHandler[C, T]) pureTaskHandler() {
153 m.ctrl.T.Helper()
154 m.ctrl.Call(m, "pureTaskHandler")
155 }
156
157 // pureTaskHandler indicates an expected call of pureTaskHandler.
158 func (mr *MockPureTaskHandlerMockRecorder[C, T]) pureTaskHandler() *gomock.Call {
159 mr.mock.ctrl.T.Helper()
160 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "pureTaskHandler", reflect.TypeOf((*MockPureTaskHandler[C, T])(nil).pureTaskHandler))
161 }
162
163 // MockTaskValidator is a mock of TaskValidator interface.
164 type MockTaskValidator[C any, T any] struct {
165 ctrl *gomock.Controller
166 recorder *MockTaskValidatorMockRecorder[C, T]
167 isgomock struct{}
168 }
169
170 // MockTaskValidatorMockRecorder is the mock recorder for MockTaskValidator.
171 type MockTaskValidatorMockRecorder[C any, T any] struct {
172 mock *MockTaskValidator[C, T]
173 }
174
175 // NewMockTaskValidator creates a new mock instance.
176 func NewMockTaskValidator[C any, T any](ctrl *gomock.Controller) *MockTaskValidator[C, T] {
177 mock := &MockTaskValidator[C, T]{ctrl: ctrl}
178 mock.recorder = &MockTaskValidatorMockRecorder[C, T]{mock}
179 return mock
180 }
181
182 // EXPECT returns an object that allows the caller to indicate expected use.
183 func (m *MockTaskValidator[C, T]) EXPECT() *MockTaskValidatorMockRecorder[C, T] {
184 return m.recorder
185 }
186
187 // Validate mocks base method.
188 func (m *MockTaskValidator[C, T]) Validate(arg0 Context, arg1 C, arg2 TaskInvocation, arg3 T) (bool, error) {
189 m.ctrl.T.Helper()
190 ret := m.ctrl.Call(m, "Validate", arg0, arg1, arg2, arg3)
191 ret0, _ := ret[0].(bool)
192 ret1, _ := ret[1].(error)
193 return ret0, ret1
194 }
195
196 // Validate indicates an expected call of Validate.
197 func (mr *MockTaskValidatorMockRecorder[C, T]) Validate(arg0, arg1, arg2, arg3 any) *gomock.Call {
198 mr.mock.ctrl.T.Helper()
199 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockTaskValidator[C, T])(nil).Validate), arg0, arg1, arg2, arg3)
200 }