This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 59
/
ExecutableSubWorkflow.go
404 lines (321 loc) · 11.4 KB
/
ExecutableSubWorkflow.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
// Code generated by mockery v1.0.1. DO NOT EDIT.
package mocks
import (
v1alpha1 "github.com/flyteorg/flytepropeller/pkg/apis/flyteworkflow/v1alpha1"
mock "github.com/stretchr/testify/mock"
)
// ExecutableSubWorkflow is an autogenerated mock type for the ExecutableSubWorkflow type
type ExecutableSubWorkflow struct {
mock.Mock
}
type ExecutableSubWorkflow_FromNode struct {
*mock.Call
}
func (_m ExecutableSubWorkflow_FromNode) Return(_a0 []string, _a1 error) *ExecutableSubWorkflow_FromNode {
return &ExecutableSubWorkflow_FromNode{Call: _m.Call.Return(_a0, _a1)}
}
func (_m *ExecutableSubWorkflow) OnFromNode(name string) *ExecutableSubWorkflow_FromNode {
c_call := _m.On("FromNode", name)
return &ExecutableSubWorkflow_FromNode{Call: c_call}
}
func (_m *ExecutableSubWorkflow) OnFromNodeMatch(matchers ...interface{}) *ExecutableSubWorkflow_FromNode {
c_call := _m.On("FromNode", matchers...)
return &ExecutableSubWorkflow_FromNode{Call: c_call}
}
// FromNode provides a mock function with given fields: name
func (_m *ExecutableSubWorkflow) FromNode(name string) ([]string, error) {
ret := _m.Called(name)
var r0 []string
if rf, ok := ret.Get(0).(func(string) []string); ok {
r0 = rf(name)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(name)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type ExecutableSubWorkflow_GetConnections struct {
*mock.Call
}
func (_m ExecutableSubWorkflow_GetConnections) Return(_a0 *v1alpha1.Connections) *ExecutableSubWorkflow_GetConnections {
return &ExecutableSubWorkflow_GetConnections{Call: _m.Call.Return(_a0)}
}
func (_m *ExecutableSubWorkflow) OnGetConnections() *ExecutableSubWorkflow_GetConnections {
c_call := _m.On("GetConnections")
return &ExecutableSubWorkflow_GetConnections{Call: c_call}
}
func (_m *ExecutableSubWorkflow) OnGetConnectionsMatch(matchers ...interface{}) *ExecutableSubWorkflow_GetConnections {
c_call := _m.On("GetConnections", matchers...)
return &ExecutableSubWorkflow_GetConnections{Call: c_call}
}
// GetConnections provides a mock function with given fields:
func (_m *ExecutableSubWorkflow) GetConnections() *v1alpha1.Connections {
ret := _m.Called()
var r0 *v1alpha1.Connections
if rf, ok := ret.Get(0).(func() *v1alpha1.Connections); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1alpha1.Connections)
}
}
return r0
}
type ExecutableSubWorkflow_GetID struct {
*mock.Call
}
func (_m ExecutableSubWorkflow_GetID) Return(_a0 string) *ExecutableSubWorkflow_GetID {
return &ExecutableSubWorkflow_GetID{Call: _m.Call.Return(_a0)}
}
func (_m *ExecutableSubWorkflow) OnGetID() *ExecutableSubWorkflow_GetID {
c_call := _m.On("GetID")
return &ExecutableSubWorkflow_GetID{Call: c_call}
}
func (_m *ExecutableSubWorkflow) OnGetIDMatch(matchers ...interface{}) *ExecutableSubWorkflow_GetID {
c_call := _m.On("GetID", matchers...)
return &ExecutableSubWorkflow_GetID{Call: c_call}
}
// GetID provides a mock function with given fields:
func (_m *ExecutableSubWorkflow) GetID() string {
ret := _m.Called()
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
type ExecutableSubWorkflow_GetNode struct {
*mock.Call
}
func (_m ExecutableSubWorkflow_GetNode) Return(_a0 v1alpha1.ExecutableNode, _a1 bool) *ExecutableSubWorkflow_GetNode {
return &ExecutableSubWorkflow_GetNode{Call: _m.Call.Return(_a0, _a1)}
}
func (_m *ExecutableSubWorkflow) OnGetNode(nodeID string) *ExecutableSubWorkflow_GetNode {
c_call := _m.On("GetNode", nodeID)
return &ExecutableSubWorkflow_GetNode{Call: c_call}
}
func (_m *ExecutableSubWorkflow) OnGetNodeMatch(matchers ...interface{}) *ExecutableSubWorkflow_GetNode {
c_call := _m.On("GetNode", matchers...)
return &ExecutableSubWorkflow_GetNode{Call: c_call}
}
// GetNode provides a mock function with given fields: nodeID
func (_m *ExecutableSubWorkflow) GetNode(nodeID string) (v1alpha1.ExecutableNode, bool) {
ret := _m.Called(nodeID)
var r0 v1alpha1.ExecutableNode
if rf, ok := ret.Get(0).(func(string) v1alpha1.ExecutableNode); ok {
r0 = rf(nodeID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(v1alpha1.ExecutableNode)
}
}
var r1 bool
if rf, ok := ret.Get(1).(func(string) bool); ok {
r1 = rf(nodeID)
} else {
r1 = ret.Get(1).(bool)
}
return r0, r1
}
type ExecutableSubWorkflow_GetNodes struct {
*mock.Call
}
func (_m ExecutableSubWorkflow_GetNodes) Return(_a0 []string) *ExecutableSubWorkflow_GetNodes {
return &ExecutableSubWorkflow_GetNodes{Call: _m.Call.Return(_a0)}
}
func (_m *ExecutableSubWorkflow) OnGetNodes() *ExecutableSubWorkflow_GetNodes {
c_call := _m.On("GetNodes")
return &ExecutableSubWorkflow_GetNodes{Call: c_call}
}
func (_m *ExecutableSubWorkflow) OnGetNodesMatch(matchers ...interface{}) *ExecutableSubWorkflow_GetNodes {
c_call := _m.On("GetNodes", matchers...)
return &ExecutableSubWorkflow_GetNodes{Call: c_call}
}
// GetNodes provides a mock function with given fields:
func (_m *ExecutableSubWorkflow) GetNodes() []string {
ret := _m.Called()
var r0 []string
if rf, ok := ret.Get(0).(func() []string); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
return r0
}
type ExecutableSubWorkflow_GetOnFailureNode struct {
*mock.Call
}
func (_m ExecutableSubWorkflow_GetOnFailureNode) Return(_a0 v1alpha1.ExecutableNode) *ExecutableSubWorkflow_GetOnFailureNode {
return &ExecutableSubWorkflow_GetOnFailureNode{Call: _m.Call.Return(_a0)}
}
func (_m *ExecutableSubWorkflow) OnGetOnFailureNode() *ExecutableSubWorkflow_GetOnFailureNode {
c_call := _m.On("GetOnFailureNode")
return &ExecutableSubWorkflow_GetOnFailureNode{Call: c_call}
}
func (_m *ExecutableSubWorkflow) OnGetOnFailureNodeMatch(matchers ...interface{}) *ExecutableSubWorkflow_GetOnFailureNode {
c_call := _m.On("GetOnFailureNode", matchers...)
return &ExecutableSubWorkflow_GetOnFailureNode{Call: c_call}
}
// GetOnFailureNode provides a mock function with given fields:
func (_m *ExecutableSubWorkflow) GetOnFailureNode() v1alpha1.ExecutableNode {
ret := _m.Called()
var r0 v1alpha1.ExecutableNode
if rf, ok := ret.Get(0).(func() v1alpha1.ExecutableNode); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(v1alpha1.ExecutableNode)
}
}
return r0
}
type ExecutableSubWorkflow_GetOnFailurePolicy struct {
*mock.Call
}
func (_m ExecutableSubWorkflow_GetOnFailurePolicy) Return(_a0 v1alpha1.WorkflowOnFailurePolicy) *ExecutableSubWorkflow_GetOnFailurePolicy {
return &ExecutableSubWorkflow_GetOnFailurePolicy{Call: _m.Call.Return(_a0)}
}
func (_m *ExecutableSubWorkflow) OnGetOnFailurePolicy() *ExecutableSubWorkflow_GetOnFailurePolicy {
c_call := _m.On("GetOnFailurePolicy")
return &ExecutableSubWorkflow_GetOnFailurePolicy{Call: c_call}
}
func (_m *ExecutableSubWorkflow) OnGetOnFailurePolicyMatch(matchers ...interface{}) *ExecutableSubWorkflow_GetOnFailurePolicy {
c_call := _m.On("GetOnFailurePolicy", matchers...)
return &ExecutableSubWorkflow_GetOnFailurePolicy{Call: c_call}
}
// GetOnFailurePolicy provides a mock function with given fields:
func (_m *ExecutableSubWorkflow) GetOnFailurePolicy() v1alpha1.WorkflowOnFailurePolicy {
ret := _m.Called()
var r0 v1alpha1.WorkflowOnFailurePolicy
if rf, ok := ret.Get(0).(func() v1alpha1.WorkflowOnFailurePolicy); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(v1alpha1.WorkflowOnFailurePolicy)
}
return r0
}
type ExecutableSubWorkflow_GetOutputBindings struct {
*mock.Call
}
func (_m ExecutableSubWorkflow_GetOutputBindings) Return(_a0 []*v1alpha1.Binding) *ExecutableSubWorkflow_GetOutputBindings {
return &ExecutableSubWorkflow_GetOutputBindings{Call: _m.Call.Return(_a0)}
}
func (_m *ExecutableSubWorkflow) OnGetOutputBindings() *ExecutableSubWorkflow_GetOutputBindings {
c_call := _m.On("GetOutputBindings")
return &ExecutableSubWorkflow_GetOutputBindings{Call: c_call}
}
func (_m *ExecutableSubWorkflow) OnGetOutputBindingsMatch(matchers ...interface{}) *ExecutableSubWorkflow_GetOutputBindings {
c_call := _m.On("GetOutputBindings", matchers...)
return &ExecutableSubWorkflow_GetOutputBindings{Call: c_call}
}
// GetOutputBindings provides a mock function with given fields:
func (_m *ExecutableSubWorkflow) GetOutputBindings() []*v1alpha1.Binding {
ret := _m.Called()
var r0 []*v1alpha1.Binding
if rf, ok := ret.Get(0).(func() []*v1alpha1.Binding); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*v1alpha1.Binding)
}
}
return r0
}
type ExecutableSubWorkflow_GetOutputs struct {
*mock.Call
}
func (_m ExecutableSubWorkflow_GetOutputs) Return(_a0 *v1alpha1.OutputVarMap) *ExecutableSubWorkflow_GetOutputs {
return &ExecutableSubWorkflow_GetOutputs{Call: _m.Call.Return(_a0)}
}
func (_m *ExecutableSubWorkflow) OnGetOutputs() *ExecutableSubWorkflow_GetOutputs {
c_call := _m.On("GetOutputs")
return &ExecutableSubWorkflow_GetOutputs{Call: c_call}
}
func (_m *ExecutableSubWorkflow) OnGetOutputsMatch(matchers ...interface{}) *ExecutableSubWorkflow_GetOutputs {
c_call := _m.On("GetOutputs", matchers...)
return &ExecutableSubWorkflow_GetOutputs{Call: c_call}
}
// GetOutputs provides a mock function with given fields:
func (_m *ExecutableSubWorkflow) GetOutputs() *v1alpha1.OutputVarMap {
ret := _m.Called()
var r0 *v1alpha1.OutputVarMap
if rf, ok := ret.Get(0).(func() *v1alpha1.OutputVarMap); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1alpha1.OutputVarMap)
}
}
return r0
}
type ExecutableSubWorkflow_StartNode struct {
*mock.Call
}
func (_m ExecutableSubWorkflow_StartNode) Return(_a0 v1alpha1.ExecutableNode) *ExecutableSubWorkflow_StartNode {
return &ExecutableSubWorkflow_StartNode{Call: _m.Call.Return(_a0)}
}
func (_m *ExecutableSubWorkflow) OnStartNode() *ExecutableSubWorkflow_StartNode {
c_call := _m.On("StartNode")
return &ExecutableSubWorkflow_StartNode{Call: c_call}
}
func (_m *ExecutableSubWorkflow) OnStartNodeMatch(matchers ...interface{}) *ExecutableSubWorkflow_StartNode {
c_call := _m.On("StartNode", matchers...)
return &ExecutableSubWorkflow_StartNode{Call: c_call}
}
// StartNode provides a mock function with given fields:
func (_m *ExecutableSubWorkflow) StartNode() v1alpha1.ExecutableNode {
ret := _m.Called()
var r0 v1alpha1.ExecutableNode
if rf, ok := ret.Get(0).(func() v1alpha1.ExecutableNode); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(v1alpha1.ExecutableNode)
}
}
return r0
}
type ExecutableSubWorkflow_ToNode struct {
*mock.Call
}
func (_m ExecutableSubWorkflow_ToNode) Return(_a0 []string, _a1 error) *ExecutableSubWorkflow_ToNode {
return &ExecutableSubWorkflow_ToNode{Call: _m.Call.Return(_a0, _a1)}
}
func (_m *ExecutableSubWorkflow) OnToNode(name string) *ExecutableSubWorkflow_ToNode {
c_call := _m.On("ToNode", name)
return &ExecutableSubWorkflow_ToNode{Call: c_call}
}
func (_m *ExecutableSubWorkflow) OnToNodeMatch(matchers ...interface{}) *ExecutableSubWorkflow_ToNode {
c_call := _m.On("ToNode", matchers...)
return &ExecutableSubWorkflow_ToNode{Call: c_call}
}
// ToNode provides a mock function with given fields: name
func (_m *ExecutableSubWorkflow) ToNode(name string) ([]string, error) {
ret := _m.Called(name)
var r0 []string
if rf, ok := ret.Get(0).(func(string) []string); ok {
r0 = rf(name)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(name)
} else {
r1 = ret.Error(1)
}
return r0, r1
}