forked from arana-db/arana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mock_runtime.go
386 lines (330 loc) · 11.7 KB
/
mock_runtime.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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/arana-db/arana/pkg/proto (interfaces: VConn,Plan,Optimizer,DB)
// Package testdata is a generated GoMock package.
package testdata
import (
context "context"
reflect "reflect"
time "time"
)
import (
gomock "github.com/golang/mock/gomock"
)
import (
proto "github.com/arana-db/arana/pkg/proto"
)
// MockVConn is a mock of VConn interface.
type MockVConn struct {
ctrl *gomock.Controller
recorder *MockVConnMockRecorder
}
// MockVConnMockRecorder is the mock recorder for MockVConn.
type MockVConnMockRecorder struct {
mock *MockVConn
}
// NewMockVConn creates a new mock instance.
func NewMockVConn(ctrl *gomock.Controller) *MockVConn {
mock := &MockVConn{ctrl: ctrl}
mock.recorder = &MockVConnMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockVConn) EXPECT() *MockVConnMockRecorder {
return m.recorder
}
// Exec mocks base method.
func (m *MockVConn) Exec(arg0 context.Context, arg1, arg2 string, arg3 ...proto.Value) (proto.Result, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1, arg2}
for _, a := range arg3 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Exec", varargs...)
ret0, _ := ret[0].(proto.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Exec indicates an expected call of Exec.
func (mr *MockVConnMockRecorder) Exec(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1, arg2}, arg3...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exec", reflect.TypeOf((*MockVConn)(nil).Exec), varargs...)
}
// Query mocks base method.
func (m *MockVConn) Query(arg0 context.Context, arg1, arg2 string, arg3 ...proto.Value) (proto.Result, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1, arg2}
for _, a := range arg3 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Query", varargs...)
ret0, _ := ret[0].(proto.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Query indicates an expected call of Query.
func (mr *MockVConnMockRecorder) Query(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1, arg2}, arg3...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Query", reflect.TypeOf((*MockVConn)(nil).Query), varargs...)
}
// MockPlan is a mock of Plan interface.
type MockPlan struct {
ctrl *gomock.Controller
recorder *MockPlanMockRecorder
}
// MockPlanMockRecorder is the mock recorder for MockPlan.
type MockPlanMockRecorder struct {
mock *MockPlan
}
// NewMockPlan creates a new mock instance.
func NewMockPlan(ctrl *gomock.Controller) *MockPlan {
mock := &MockPlan{ctrl: ctrl}
mock.recorder = &MockPlanMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPlan) EXPECT() *MockPlanMockRecorder {
return m.recorder
}
// ExecIn mocks base method.
func (m *MockPlan) ExecIn(arg0 context.Context, arg1 proto.VConn) (proto.Result, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ExecIn", arg0, arg1)
ret0, _ := ret[0].(proto.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ExecIn indicates an expected call of ExecIn.
func (mr *MockPlanMockRecorder) ExecIn(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecIn", reflect.TypeOf((*MockPlan)(nil).ExecIn), arg0, arg1)
}
// Type mocks base method.
func (m *MockPlan) Type() proto.PlanType {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Type")
ret0, _ := ret[0].(proto.PlanType)
return ret0
}
// Type indicates an expected call of Type.
func (mr *MockPlanMockRecorder) Type() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockPlan)(nil).Type))
}
// MockOptimizer is a mock of Optimizer interface.
type MockOptimizer struct {
ctrl *gomock.Controller
recorder *MockOptimizerMockRecorder
}
// MockOptimizerMockRecorder is the mock recorder for MockOptimizer.
type MockOptimizerMockRecorder struct {
mock *MockOptimizer
}
// NewMockOptimizer creates a new mock instance.
func NewMockOptimizer(ctrl *gomock.Controller) *MockOptimizer {
mock := &MockOptimizer{ctrl: ctrl}
mock.recorder = &MockOptimizerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockOptimizer) EXPECT() *MockOptimizerMockRecorder {
return m.recorder
}
// Optimize mocks base method.
func (m *MockOptimizer) Optimize(arg0 context.Context) (proto.Plan, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Optimize", arg0)
ret0, _ := ret[0].(proto.Plan)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Optimize indicates an expected call of Optimize.
func (mr *MockOptimizerMockRecorder) Optimize(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Optimize", reflect.TypeOf((*MockOptimizer)(nil).Optimize), arg0)
}
// MockDB is a mock of DB interface.
type MockDB struct {
ctrl *gomock.Controller
recorder *MockDBMockRecorder
}
// MockDBMockRecorder is the mock recorder for MockDB.
type MockDBMockRecorder struct {
mock *MockDB
}
// NewMockDB creates a new mock instance.
func NewMockDB(ctrl *gomock.Controller) *MockDB {
mock := &MockDB{ctrl: ctrl}
mock.recorder = &MockDBMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockDB) EXPECT() *MockDBMockRecorder {
return m.recorder
}
// Call mocks base method.
func (m *MockDB) Call(arg0 context.Context, arg1 string, arg2 ...proto.Value) (proto.Result, uint16, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Call", varargs...)
ret0, _ := ret[0].(proto.Result)
ret1, _ := ret[1].(uint16)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// Call indicates an expected call of Call.
func (mr *MockDBMockRecorder) Call(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Call", reflect.TypeOf((*MockDB)(nil).Call), varargs...)
}
// CallFieldList mocks base method.
func (m *MockDB) CallFieldList(arg0 context.Context, arg1, arg2 string) ([]proto.Field, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CallFieldList", arg0, arg1, arg2)
ret0, _ := ret[0].([]proto.Field)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CallFieldList indicates an expected call of CallFieldList.
func (mr *MockDBMockRecorder) CallFieldList(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CallFieldList", reflect.TypeOf((*MockDB)(nil).CallFieldList), arg0, arg1, arg2)
}
// Capacity mocks base method.
func (m *MockDB) Capacity() int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Capacity")
ret0, _ := ret[0].(int)
return ret0
}
// Capacity indicates an expected call of Capacity.
func (mr *MockDBMockRecorder) Capacity() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Capacity", reflect.TypeOf((*MockDB)(nil).Capacity))
}
// Close mocks base method.
func (m *MockDB) Close() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Close")
ret0, _ := ret[0].(error)
return ret0
}
// Close indicates an expected call of Close.
func (mr *MockDBMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDB)(nil).Close))
}
// ID mocks base method.
func (m *MockDB) ID() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ID")
ret0, _ := ret[0].(string)
return ret0
}
// ID indicates an expected call of ID.
func (mr *MockDBMockRecorder) ID() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockDB)(nil).ID))
}
// IdleTimeout mocks base method.
func (m *MockDB) IdleTimeout() time.Duration {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IdleTimeout")
ret0, _ := ret[0].(time.Duration)
return ret0
}
// IdleTimeout indicates an expected call of IdleTimeout.
func (mr *MockDBMockRecorder) IdleTimeout() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IdleTimeout", reflect.TypeOf((*MockDB)(nil).IdleTimeout))
}
// MaxCapacity mocks base method.
func (m *MockDB) MaxCapacity() int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "MaxCapacity")
ret0, _ := ret[0].(int)
return ret0
}
// MaxCapacity indicates an expected call of MaxCapacity.
func (mr *MockDBMockRecorder) MaxCapacity() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaxCapacity", reflect.TypeOf((*MockDB)(nil).MaxCapacity))
}
// SetCapacity mocks base method.
func (m *MockDB) SetCapacity(arg0 int) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetCapacity", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetCapacity indicates an expected call of SetCapacity.
func (mr *MockDBMockRecorder) SetCapacity(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCapacity", reflect.TypeOf((*MockDB)(nil).SetCapacity), arg0)
}
// SetIdleTimeout mocks base method.
func (m *MockDB) SetIdleTimeout(arg0 time.Duration) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetIdleTimeout", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetIdleTimeout indicates an expected call of SetIdleTimeout.
func (mr *MockDBMockRecorder) SetIdleTimeout(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIdleTimeout", reflect.TypeOf((*MockDB)(nil).SetIdleTimeout), arg0)
}
// SetMaxCapacity mocks base method.
func (m *MockDB) SetMaxCapacity(arg0 int) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetMaxCapacity", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetMaxCapacity indicates an expected call of SetMaxCapacity.
func (mr *MockDBMockRecorder) SetMaxCapacity(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMaxCapacity", reflect.TypeOf((*MockDB)(nil).SetMaxCapacity), arg0)
}
// SetWeight mocks base method.
func (m *MockDB) SetWeight(arg0 proto.Weight) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetWeight", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetWeight indicates an expected call of SetWeight.
func (mr *MockDBMockRecorder) SetWeight(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWeight", reflect.TypeOf((*MockDB)(nil).SetWeight), arg0)
}
// Variable mocks base method.
func (m *MockDB) Variable(arg0 context.Context, arg1 string) (interface{}, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Variable", arg0, arg1)
ret0, _ := ret[0].(interface{})
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Variable indicates an expected call of Variable.
func (mr *MockDBMockRecorder) Variable(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Variable", reflect.TypeOf((*MockDB)(nil).Variable), arg0, arg1)
}
// Weight mocks base method.
func (m *MockDB) Weight() proto.Weight {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Weight")
ret0, _ := ret[0].(proto.Weight)
return ret0
}
// Weight indicates an expected call of Weight.
func (mr *MockDBMockRecorder) Weight() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Weight", reflect.TypeOf((*MockDB)(nil).Weight))
}