/
lease_interface.go
195 lines (157 loc) · 5.22 KB
/
lease_interface.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
// Code generated by mockery v2.5.1. DO NOT EDIT.
package kubernetes_mocks
import (
context "context"
mock "github.com/stretchr/testify/mock"
types "k8s.io/apimachinery/pkg/types"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1beta1 "k8s.io/api/coordination/v1beta1"
watch "k8s.io/apimachinery/pkg/watch"
)
// LeaseInterface is an autogenerated mock type for the LeaseInterface type
type LeaseInterface struct {
mock.Mock
}
// Create provides a mock function with given fields: ctx, lease, opts
func (_m *LeaseInterface) Create(ctx context.Context, lease *v1beta1.Lease, opts v1.CreateOptions) (*v1beta1.Lease, error) {
ret := _m.Called(ctx, lease, opts)
var r0 *v1beta1.Lease
if rf, ok := ret.Get(0).(func(context.Context, *v1beta1.Lease, v1.CreateOptions) *v1beta1.Lease); ok {
r0 = rf(ctx, lease, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1beta1.Lease)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *v1beta1.Lease, v1.CreateOptions) error); ok {
r1 = rf(ctx, lease, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Delete provides a mock function with given fields: ctx, name, opts
func (_m *LeaseInterface) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
ret := _m.Called(ctx, name, opts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, v1.DeleteOptions) error); ok {
r0 = rf(ctx, name, opts)
} else {
r0 = ret.Error(0)
}
return r0
}
// DeleteCollection provides a mock function with given fields: ctx, opts, listOpts
func (_m *LeaseInterface) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
ret := _m.Called(ctx, opts, listOpts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, v1.DeleteOptions, v1.ListOptions) error); ok {
r0 = rf(ctx, opts, listOpts)
} else {
r0 = ret.Error(0)
}
return r0
}
// Get provides a mock function with given fields: ctx, name, opts
func (_m *LeaseInterface) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Lease, error) {
ret := _m.Called(ctx, name, opts)
var r0 *v1beta1.Lease
if rf, ok := ret.Get(0).(func(context.Context, string, v1.GetOptions) *v1beta1.Lease); ok {
r0 = rf(ctx, name, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1beta1.Lease)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, v1.GetOptions) error); ok {
r1 = rf(ctx, name, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// List provides a mock function with given fields: ctx, opts
func (_m *LeaseInterface) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.LeaseList, error) {
ret := _m.Called(ctx, opts)
var r0 *v1beta1.LeaseList
if rf, ok := ret.Get(0).(func(context.Context, v1.ListOptions) *v1beta1.LeaseList); ok {
r0 = rf(ctx, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1beta1.LeaseList)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, v1.ListOptions) error); ok {
r1 = rf(ctx, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Patch provides a mock function with given fields: ctx, name, pt, data, opts, subresources
func (_m *LeaseInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (*v1beta1.Lease, error) {
_va := make([]interface{}, len(subresources))
for _i := range subresources {
_va[_i] = subresources[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, name, pt, data, opts)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
var r0 *v1beta1.Lease
if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) *v1beta1.Lease); ok {
r0 = rf(ctx, name, pt, data, opts, subresources...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1beta1.Lease)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) error); ok {
r1 = rf(ctx, name, pt, data, opts, subresources...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Update provides a mock function with given fields: ctx, lease, opts
func (_m *LeaseInterface) Update(ctx context.Context, lease *v1beta1.Lease, opts v1.UpdateOptions) (*v1beta1.Lease, error) {
ret := _m.Called(ctx, lease, opts)
var r0 *v1beta1.Lease
if rf, ok := ret.Get(0).(func(context.Context, *v1beta1.Lease, v1.UpdateOptions) *v1beta1.Lease); ok {
r0 = rf(ctx, lease, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1beta1.Lease)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *v1beta1.Lease, v1.UpdateOptions) error); ok {
r1 = rf(ctx, lease, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Watch provides a mock function with given fields: ctx, opts
func (_m *LeaseInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
ret := _m.Called(ctx, opts)
var r0 watch.Interface
if rf, ok := ret.Get(0).(func(context.Context, v1.ListOptions) watch.Interface); ok {
r0 = rf(ctx, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(watch.Interface)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, v1.ListOptions) error); ok {
r1 = rf(ctx, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}