This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
/
client.go
98 lines (76 loc) · 2.4 KB
/
client.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
// Code generated by mockery v1.0.1. DO NOT EDIT.
package mocks
import (
context "context"
core "github.com/flyteorg/flyteplugins/go/tasks/pluginmachinery/core"
mock "github.com/stretchr/testify/mock"
webapi "github.com/flyteorg/flyteplugins/go/tasks/pluginmachinery/webapi"
)
// Client is an autogenerated mock type for the Client type
type Client struct {
mock.Mock
}
type Client_Get struct {
*mock.Call
}
func (_m Client_Get) Return(latest interface{}, err error) *Client_Get {
return &Client_Get{Call: _m.Call.Return(latest, err)}
}
func (_m *Client) OnGet(ctx context.Context, tCtx webapi.GetContext) *Client_Get {
c_call := _m.On("Get", ctx, tCtx)
return &Client_Get{Call: c_call}
}
func (_m *Client) OnGetMatch(matchers ...interface{}) *Client_Get {
c_call := _m.On("Get", matchers...)
return &Client_Get{Call: c_call}
}
// Get provides a mock function with given fields: ctx, tCtx
func (_m *Client) Get(ctx context.Context, tCtx webapi.GetContext) (interface{}, error) {
ret := _m.Called(ctx, tCtx)
var r0 interface{}
if rf, ok := ret.Get(0).(func(context.Context, webapi.GetContext) interface{}); ok {
r0 = rf(ctx, tCtx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(interface{})
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, webapi.GetContext) error); ok {
r1 = rf(ctx, tCtx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type Client_Status struct {
*mock.Call
}
func (_m Client_Status) Return(phase core.PhaseInfo, err error) *Client_Status {
return &Client_Status{Call: _m.Call.Return(phase, err)}
}
func (_m *Client) OnStatus(ctx context.Context, tCtx webapi.StatusContext) *Client_Status {
c_call := _m.On("Status", ctx, tCtx)
return &Client_Status{Call: c_call}
}
func (_m *Client) OnStatusMatch(matchers ...interface{}) *Client_Status {
c_call := _m.On("Status", matchers...)
return &Client_Status{Call: c_call}
}
// Status provides a mock function with given fields: ctx, tCtx
func (_m *Client) Status(ctx context.Context, tCtx webapi.StatusContext) (core.PhaseInfo, error) {
ret := _m.Called(ctx, tCtx)
var r0 core.PhaseInfo
if rf, ok := ret.Get(0).(func(context.Context, webapi.StatusContext) core.PhaseInfo); ok {
r0 = rf(ctx, tCtx)
} else {
r0 = ret.Get(0).(core.PhaseInfo)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, webapi.StatusContext) error); ok {
r1 = rf(ctx, tCtx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}