-
Notifications
You must be signed in to change notification settings - Fork 53
/
ext.go
270 lines (227 loc) · 9.14 KB
/
ext.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
// Code generated by MockGen. DO NOT EDIT.
// Source: pkg/test/testdata/plugins/ext/ext_grpc.pb.go
// Package mock_ext is a generated GoMock package.
package mock_ext
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
ext "github.com/rancher/opni/pkg/test/testdata/plugins/ext"
grpc "google.golang.org/grpc"
)
// MockExtClient is a mock of ExtClient interface.
type MockExtClient struct {
ctrl *gomock.Controller
recorder *MockExtClientMockRecorder
}
// MockExtClientMockRecorder is the mock recorder for MockExtClient.
type MockExtClientMockRecorder struct {
mock *MockExtClient
}
// NewMockExtClient creates a new mock instance.
func NewMockExtClient(ctrl *gomock.Controller) *MockExtClient {
mock := &MockExtClient{ctrl: ctrl}
mock.recorder = &MockExtClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockExtClient) EXPECT() *MockExtClientMockRecorder {
return m.recorder
}
// Foo mocks base method.
func (m *MockExtClient) Foo(ctx context.Context, in *ext.FooRequest, opts ...grpc.CallOption) (*ext.FooResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Foo", varargs...)
ret0, _ := ret[0].(*ext.FooResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Foo indicates an expected call of Foo.
func (mr *MockExtClientMockRecorder) Foo(ctx, in interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Foo", reflect.TypeOf((*MockExtClient)(nil).Foo), varargs...)
}
// MockExtServer is a mock of ExtServer interface.
type MockExtServer struct {
ctrl *gomock.Controller
recorder *MockExtServerMockRecorder
}
// MockExtServerMockRecorder is the mock recorder for MockExtServer.
type MockExtServerMockRecorder struct {
mock *MockExtServer
}
// NewMockExtServer creates a new mock instance.
func NewMockExtServer(ctrl *gomock.Controller) *MockExtServer {
mock := &MockExtServer{ctrl: ctrl}
mock.recorder = &MockExtServerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockExtServer) EXPECT() *MockExtServerMockRecorder {
return m.recorder
}
// Foo mocks base method.
func (m *MockExtServer) Foo(arg0 context.Context, arg1 *ext.FooRequest) (*ext.FooResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Foo", arg0, arg1)
ret0, _ := ret[0].(*ext.FooResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Foo indicates an expected call of Foo.
func (mr *MockExtServerMockRecorder) Foo(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Foo", reflect.TypeOf((*MockExtServer)(nil).Foo), arg0, arg1)
}
// mustEmbedUnimplementedExtServer mocks base method.
func (m *MockExtServer) mustEmbedUnimplementedExtServer() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "mustEmbedUnimplementedExtServer")
}
// mustEmbedUnimplementedExtServer indicates an expected call of mustEmbedUnimplementedExtServer.
func (mr *MockExtServerMockRecorder) mustEmbedUnimplementedExtServer() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "mustEmbedUnimplementedExtServer", reflect.TypeOf((*MockExtServer)(nil).mustEmbedUnimplementedExtServer))
}
// MockUnsafeExtServer is a mock of UnsafeExtServer interface.
type MockUnsafeExtServer struct {
ctrl *gomock.Controller
recorder *MockUnsafeExtServerMockRecorder
}
// MockUnsafeExtServerMockRecorder is the mock recorder for MockUnsafeExtServer.
type MockUnsafeExtServerMockRecorder struct {
mock *MockUnsafeExtServer
}
// NewMockUnsafeExtServer creates a new mock instance.
func NewMockUnsafeExtServer(ctrl *gomock.Controller) *MockUnsafeExtServer {
mock := &MockUnsafeExtServer{ctrl: ctrl}
mock.recorder = &MockUnsafeExtServerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockUnsafeExtServer) EXPECT() *MockUnsafeExtServerMockRecorder {
return m.recorder
}
// mustEmbedUnimplementedExtServer mocks base method.
func (m *MockUnsafeExtServer) mustEmbedUnimplementedExtServer() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "mustEmbedUnimplementedExtServer")
}
// mustEmbedUnimplementedExtServer indicates an expected call of mustEmbedUnimplementedExtServer.
func (mr *MockUnsafeExtServerMockRecorder) mustEmbedUnimplementedExtServer() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "mustEmbedUnimplementedExtServer", reflect.TypeOf((*MockUnsafeExtServer)(nil).mustEmbedUnimplementedExtServer))
}
// MockExt2Client is a mock of Ext2Client interface.
type MockExt2Client struct {
ctrl *gomock.Controller
recorder *MockExt2ClientMockRecorder
}
// MockExt2ClientMockRecorder is the mock recorder for MockExt2Client.
type MockExt2ClientMockRecorder struct {
mock *MockExt2Client
}
// NewMockExt2Client creates a new mock instance.
func NewMockExt2Client(ctrl *gomock.Controller) *MockExt2Client {
mock := &MockExt2Client{ctrl: ctrl}
mock.recorder = &MockExt2ClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockExt2Client) EXPECT() *MockExt2ClientMockRecorder {
return m.recorder
}
// Foo mocks base method.
func (m *MockExt2Client) Foo(ctx context.Context, in *ext.FooRequest, opts ...grpc.CallOption) (*ext.FooResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Foo", varargs...)
ret0, _ := ret[0].(*ext.FooResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Foo indicates an expected call of Foo.
func (mr *MockExt2ClientMockRecorder) Foo(ctx, in interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Foo", reflect.TypeOf((*MockExt2Client)(nil).Foo), varargs...)
}
// MockExt2Server is a mock of Ext2Server interface.
type MockExt2Server struct {
ctrl *gomock.Controller
recorder *MockExt2ServerMockRecorder
}
// MockExt2ServerMockRecorder is the mock recorder for MockExt2Server.
type MockExt2ServerMockRecorder struct {
mock *MockExt2Server
}
// NewMockExt2Server creates a new mock instance.
func NewMockExt2Server(ctrl *gomock.Controller) *MockExt2Server {
mock := &MockExt2Server{ctrl: ctrl}
mock.recorder = &MockExt2ServerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockExt2Server) EXPECT() *MockExt2ServerMockRecorder {
return m.recorder
}
// Foo mocks base method.
func (m *MockExt2Server) Foo(arg0 context.Context, arg1 *ext.FooRequest) (*ext.FooResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Foo", arg0, arg1)
ret0, _ := ret[0].(*ext.FooResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Foo indicates an expected call of Foo.
func (mr *MockExt2ServerMockRecorder) Foo(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Foo", reflect.TypeOf((*MockExt2Server)(nil).Foo), arg0, arg1)
}
// mustEmbedUnimplementedExt2Server mocks base method.
func (m *MockExt2Server) mustEmbedUnimplementedExt2Server() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "mustEmbedUnimplementedExt2Server")
}
// mustEmbedUnimplementedExt2Server indicates an expected call of mustEmbedUnimplementedExt2Server.
func (mr *MockExt2ServerMockRecorder) mustEmbedUnimplementedExt2Server() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "mustEmbedUnimplementedExt2Server", reflect.TypeOf((*MockExt2Server)(nil).mustEmbedUnimplementedExt2Server))
}
// MockUnsafeExt2Server is a mock of UnsafeExt2Server interface.
type MockUnsafeExt2Server struct {
ctrl *gomock.Controller
recorder *MockUnsafeExt2ServerMockRecorder
}
// MockUnsafeExt2ServerMockRecorder is the mock recorder for MockUnsafeExt2Server.
type MockUnsafeExt2ServerMockRecorder struct {
mock *MockUnsafeExt2Server
}
// NewMockUnsafeExt2Server creates a new mock instance.
func NewMockUnsafeExt2Server(ctrl *gomock.Controller) *MockUnsafeExt2Server {
mock := &MockUnsafeExt2Server{ctrl: ctrl}
mock.recorder = &MockUnsafeExt2ServerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockUnsafeExt2Server) EXPECT() *MockUnsafeExt2ServerMockRecorder {
return m.recorder
}
// mustEmbedUnimplementedExt2Server mocks base method.
func (m *MockUnsafeExt2Server) mustEmbedUnimplementedExt2Server() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "mustEmbedUnimplementedExt2Server")
}
// mustEmbedUnimplementedExt2Server indicates an expected call of mustEmbedUnimplementedExt2Server.
func (mr *MockUnsafeExt2ServerMockRecorder) mustEmbedUnimplementedExt2Server() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "mustEmbedUnimplementedExt2Server", reflect.TypeOf((*MockUnsafeExt2Server)(nil).mustEmbedUnimplementedExt2Server))
}