This repository has been archived by the owner on Mar 13, 2021. It is now read-only.
/
ServiceInterface.go
211 lines (173 loc) · 5.1 KB
/
ServiceInterface.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
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mockserving
import mock "github.com/stretchr/testify/mock"
import types "k8s.io/apimachinery/pkg/types"
import v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
import v1alpha1 "github.com/knative/serving/pkg/apis/serving/v1alpha1"
import watch "k8s.io/apimachinery/pkg/watch"
// ServiceInterface is an autogenerated mock type for the ServiceInterface type
type ServiceInterface struct {
mock.Mock
}
// Create provides a mock function with given fields: _a0
func (_m *ServiceInterface) Create(_a0 *v1alpha1.Service) (*v1alpha1.Service, error) {
ret := _m.Called(_a0)
var r0 *v1alpha1.Service
if rf, ok := ret.Get(0).(func(*v1alpha1.Service) *v1alpha1.Service); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1alpha1.Service)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*v1alpha1.Service) error); ok {
r1 = rf(_a0)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Delete provides a mock function with given fields: name, options
func (_m *ServiceInterface) Delete(name string, options *v1.DeleteOptions) error {
ret := _m.Called(name, options)
var r0 error
if rf, ok := ret.Get(0).(func(string, *v1.DeleteOptions) error); ok {
r0 = rf(name, options)
} else {
r0 = ret.Error(0)
}
return r0
}
// DeleteCollection provides a mock function with given fields: options, listOptions
func (_m *ServiceInterface) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
ret := _m.Called(options, listOptions)
var r0 error
if rf, ok := ret.Get(0).(func(*v1.DeleteOptions, v1.ListOptions) error); ok {
r0 = rf(options, listOptions)
} else {
r0 = ret.Error(0)
}
return r0
}
// Get provides a mock function with given fields: name, options
func (_m *ServiceInterface) Get(name string, options v1.GetOptions) (*v1alpha1.Service, error) {
ret := _m.Called(name, options)
var r0 *v1alpha1.Service
if rf, ok := ret.Get(0).(func(string, v1.GetOptions) *v1alpha1.Service); ok {
r0 = rf(name, options)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1alpha1.Service)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, v1.GetOptions) error); ok {
r1 = rf(name, options)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// List provides a mock function with given fields: opts
func (_m *ServiceInterface) List(opts v1.ListOptions) (*v1alpha1.ServiceList, error) {
ret := _m.Called(opts)
var r0 *v1alpha1.ServiceList
if rf, ok := ret.Get(0).(func(v1.ListOptions) *v1alpha1.ServiceList); ok {
r0 = rf(opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1alpha1.ServiceList)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(v1.ListOptions) error); ok {
r1 = rf(opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Patch provides a mock function with given fields: name, pt, data, subresources
func (_m *ServiceInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v1alpha1.Service, error) {
_va := make([]interface{}, len(subresources))
for _i := range subresources {
_va[_i] = subresources[_i]
}
var _ca []interface{}
_ca = append(_ca, name, pt, data)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
var r0 *v1alpha1.Service
if rf, ok := ret.Get(0).(func(string, types.PatchType, []byte, ...string) *v1alpha1.Service); ok {
r0 = rf(name, pt, data, subresources...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1alpha1.Service)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, types.PatchType, []byte, ...string) error); ok {
r1 = rf(name, pt, data, subresources...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Update provides a mock function with given fields: _a0
func (_m *ServiceInterface) Update(_a0 *v1alpha1.Service) (*v1alpha1.Service, error) {
ret := _m.Called(_a0)
var r0 *v1alpha1.Service
if rf, ok := ret.Get(0).(func(*v1alpha1.Service) *v1alpha1.Service); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1alpha1.Service)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*v1alpha1.Service) error); ok {
r1 = rf(_a0)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// UpdateStatus provides a mock function with given fields: _a0
func (_m *ServiceInterface) UpdateStatus(_a0 *v1alpha1.Service) (*v1alpha1.Service, error) {
ret := _m.Called(_a0)
var r0 *v1alpha1.Service
if rf, ok := ret.Get(0).(func(*v1alpha1.Service) *v1alpha1.Service); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1alpha1.Service)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*v1alpha1.Service) error); ok {
r1 = rf(_a0)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Watch provides a mock function with given fields: opts
func (_m *ServiceInterface) Watch(opts v1.ListOptions) (watch.Interface, error) {
ret := _m.Called(opts)
var r0 watch.Interface
if rf, ok := ret.Get(0).(func(v1.ListOptions) watch.Interface); ok {
r0 = rf(opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(watch.Interface)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(v1.ListOptions) error); ok {
r1 = rf(opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}