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 60
/
flyte_admin.go
207 lines (162 loc) · 6.34 KB
/
flyte_admin.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
// Code generated by mockery v1.0.1. DO NOT EDIT.
package mocks
import (
context "context"
admin "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin"
core "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core"
launchplan "github.com/flyteorg/flytepropeller/pkg/controller/nodes/subworkflow/launchplan"
mock "github.com/stretchr/testify/mock"
)
// FlyteAdmin is an autogenerated mock type for the FlyteAdmin type
type FlyteAdmin struct {
mock.Mock
}
type FlyteAdmin_GetLaunchPlan struct {
*mock.Call
}
func (_m FlyteAdmin_GetLaunchPlan) Return(_a0 *admin.LaunchPlan, _a1 error) *FlyteAdmin_GetLaunchPlan {
return &FlyteAdmin_GetLaunchPlan{Call: _m.Call.Return(_a0, _a1)}
}
func (_m *FlyteAdmin) OnGetLaunchPlan(ctx context.Context, launchPlanRef *core.Identifier) *FlyteAdmin_GetLaunchPlan {
c_call := _m.On("GetLaunchPlan", ctx, launchPlanRef)
return &FlyteAdmin_GetLaunchPlan{Call: c_call}
}
func (_m *FlyteAdmin) OnGetLaunchPlanMatch(matchers ...interface{}) *FlyteAdmin_GetLaunchPlan {
c_call := _m.On("GetLaunchPlan", matchers...)
return &FlyteAdmin_GetLaunchPlan{Call: c_call}
}
// GetLaunchPlan provides a mock function with given fields: ctx, launchPlanRef
func (_m *FlyteAdmin) GetLaunchPlan(ctx context.Context, launchPlanRef *core.Identifier) (*admin.LaunchPlan, error) {
ret := _m.Called(ctx, launchPlanRef)
var r0 *admin.LaunchPlan
if rf, ok := ret.Get(0).(func(context.Context, *core.Identifier) *admin.LaunchPlan); ok {
r0 = rf(ctx, launchPlanRef)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*admin.LaunchPlan)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *core.Identifier) error); ok {
r1 = rf(ctx, launchPlanRef)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type FlyteAdmin_GetStatus struct {
*mock.Call
}
func (_m FlyteAdmin_GetStatus) Return(_a0 *admin.ExecutionClosure, _a1 *core.LiteralMap, _a2 error) *FlyteAdmin_GetStatus {
return &FlyteAdmin_GetStatus{Call: _m.Call.Return(_a0, _a1, _a2)}
}
func (_m *FlyteAdmin) OnGetStatus(ctx context.Context, executionID *core.WorkflowExecutionIdentifier) *FlyteAdmin_GetStatus {
c_call := _m.On("GetStatus", ctx, executionID)
return &FlyteAdmin_GetStatus{Call: c_call}
}
func (_m *FlyteAdmin) OnGetStatusMatch(matchers ...interface{}) *FlyteAdmin_GetStatus {
c_call := _m.On("GetStatus", matchers...)
return &FlyteAdmin_GetStatus{Call: c_call}
}
// GetStatus provides a mock function with given fields: ctx, executionID
func (_m *FlyteAdmin) GetStatus(ctx context.Context, executionID *core.WorkflowExecutionIdentifier) (*admin.ExecutionClosure, *core.LiteralMap, error) {
ret := _m.Called(ctx, executionID)
var r0 *admin.ExecutionClosure
if rf, ok := ret.Get(0).(func(context.Context, *core.WorkflowExecutionIdentifier) *admin.ExecutionClosure); ok {
r0 = rf(ctx, executionID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*admin.ExecutionClosure)
}
}
var r1 *core.LiteralMap
if rf, ok := ret.Get(1).(func(context.Context, *core.WorkflowExecutionIdentifier) *core.LiteralMap); ok {
r1 = rf(ctx, executionID)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*core.LiteralMap)
}
}
var r2 error
if rf, ok := ret.Get(2).(func(context.Context, *core.WorkflowExecutionIdentifier) error); ok {
r2 = rf(ctx, executionID)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
type FlyteAdmin_Initialize struct {
*mock.Call
}
func (_m FlyteAdmin_Initialize) Return(_a0 error) *FlyteAdmin_Initialize {
return &FlyteAdmin_Initialize{Call: _m.Call.Return(_a0)}
}
func (_m *FlyteAdmin) OnInitialize(ctx context.Context) *FlyteAdmin_Initialize {
c_call := _m.On("Initialize", ctx)
return &FlyteAdmin_Initialize{Call: c_call}
}
func (_m *FlyteAdmin) OnInitializeMatch(matchers ...interface{}) *FlyteAdmin_Initialize {
c_call := _m.On("Initialize", matchers...)
return &FlyteAdmin_Initialize{Call: c_call}
}
// Initialize provides a mock function with given fields: ctx
func (_m *FlyteAdmin) Initialize(ctx context.Context) error {
ret := _m.Called(ctx)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
r0 = rf(ctx)
} else {
r0 = ret.Error(0)
}
return r0
}
type FlyteAdmin_Kill struct {
*mock.Call
}
func (_m FlyteAdmin_Kill) Return(_a0 error) *FlyteAdmin_Kill {
return &FlyteAdmin_Kill{Call: _m.Call.Return(_a0)}
}
func (_m *FlyteAdmin) OnKill(ctx context.Context, executionID *core.WorkflowExecutionIdentifier, reason string) *FlyteAdmin_Kill {
c_call := _m.On("Kill", ctx, executionID, reason)
return &FlyteAdmin_Kill{Call: c_call}
}
func (_m *FlyteAdmin) OnKillMatch(matchers ...interface{}) *FlyteAdmin_Kill {
c_call := _m.On("Kill", matchers...)
return &FlyteAdmin_Kill{Call: c_call}
}
// Kill provides a mock function with given fields: ctx, executionID, reason
func (_m *FlyteAdmin) Kill(ctx context.Context, executionID *core.WorkflowExecutionIdentifier, reason string) error {
ret := _m.Called(ctx, executionID, reason)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *core.WorkflowExecutionIdentifier, string) error); ok {
r0 = rf(ctx, executionID, reason)
} else {
r0 = ret.Error(0)
}
return r0
}
type FlyteAdmin_Launch struct {
*mock.Call
}
func (_m FlyteAdmin_Launch) Return(_a0 error) *FlyteAdmin_Launch {
return &FlyteAdmin_Launch{Call: _m.Call.Return(_a0)}
}
func (_m *FlyteAdmin) OnLaunch(ctx context.Context, launchCtx launchplan.LaunchContext, executionID *core.WorkflowExecutionIdentifier, launchPlanRef *core.Identifier, inputs *core.LiteralMap) *FlyteAdmin_Launch {
c_call := _m.On("Launch", ctx, launchCtx, executionID, launchPlanRef, inputs)
return &FlyteAdmin_Launch{Call: c_call}
}
func (_m *FlyteAdmin) OnLaunchMatch(matchers ...interface{}) *FlyteAdmin_Launch {
c_call := _m.On("Launch", matchers...)
return &FlyteAdmin_Launch{Call: c_call}
}
// Launch provides a mock function with given fields: ctx, launchCtx, executionID, launchPlanRef, inputs
func (_m *FlyteAdmin) Launch(ctx context.Context, launchCtx launchplan.LaunchContext, executionID *core.WorkflowExecutionIdentifier, launchPlanRef *core.Identifier, inputs *core.LiteralMap) error {
ret := _m.Called(ctx, launchCtx, executionID, launchPlanRef, inputs)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, launchplan.LaunchContext, *core.WorkflowExecutionIdentifier, *core.Identifier, *core.LiteralMap) error); ok {
r0 = rf(ctx, launchCtx, executionID, launchPlanRef, inputs)
} else {
r0 = ret.Error(0)
}
return r0
}