-
Notifications
You must be signed in to change notification settings - Fork 173
/
mock.go
306 lines (258 loc) · 10.8 KB
/
mock.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/moiot/gravity/pkg/position_store (interfaces: MySQLPositionStore,MongoPositionStore,MySQLTablePositionStore)
// Package mock_position_store is a generated GoMock package.
package mock_position_store
import (
gomock "github.com/golang/mock/gomock"
config "github.com/moiot/gravity/pkg/config"
position_store "github.com/moiot/gravity/pkg/position_store"
utils "github.com/moiot/gravity/pkg/utils"
reflect "reflect"
)
// MockMySQLPositionStore is a mock of MySQLPositionStore interface
type MockMySQLPositionStore struct {
ctrl *gomock.Controller
recorder *MockMySQLPositionStoreMockRecorder
}
// MockMySQLPositionStoreMockRecorder is the mock recorder for MockMySQLPositionStore
type MockMySQLPositionStoreMockRecorder struct {
mock *MockMySQLPositionStore
}
// NewMockMySQLPositionStore creates a new mock instance
func NewMockMySQLPositionStore(ctrl *gomock.Controller) *MockMySQLPositionStore {
mock := &MockMySQLPositionStore{ctrl: ctrl}
mock.recorder = &MockMySQLPositionStoreMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockMySQLPositionStore) EXPECT() *MockMySQLPositionStoreMockRecorder {
return m.recorder
}
// Close mocks base method
func (m *MockMySQLPositionStore) Close() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Close")
}
// Close indicates an expected call of Close
func (mr *MockMySQLPositionStoreMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockMySQLPositionStore)(nil).Close))
}
// FSync mocks base method
func (m *MockMySQLPositionStore) FSync() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "FSync")
}
// FSync indicates an expected call of FSync
func (mr *MockMySQLPositionStoreMockRecorder) FSync() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FSync", reflect.TypeOf((*MockMySQLPositionStore)(nil).FSync))
}
// Get mocks base method
func (m *MockMySQLPositionStore) Get() utils.MySQLBinlogPosition {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get")
ret0, _ := ret[0].(utils.MySQLBinlogPosition)
return ret0
}
// Get indicates an expected call of Get
func (mr *MockMySQLPositionStoreMockRecorder) Get() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockMySQLPositionStore)(nil).Get))
}
// Put mocks base method
func (m *MockMySQLPositionStore) Put(arg0 utils.MySQLBinlogPosition) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Put", arg0)
}
// Put indicates an expected call of Put
func (mr *MockMySQLPositionStoreMockRecorder) Put(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockMySQLPositionStore)(nil).Put), arg0)
}
// Start mocks base method
func (m *MockMySQLPositionStore) Start() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Start")
ret0, _ := ret[0].(error)
return ret0
}
// Start indicates an expected call of Start
func (mr *MockMySQLPositionStoreMockRecorder) Start() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockMySQLPositionStore)(nil).Start))
}
// MockMongoPositionStore is a mock of MongoPositionStore interface
type MockMongoPositionStore struct {
ctrl *gomock.Controller
recorder *MockMongoPositionStoreMockRecorder
}
// MockMongoPositionStoreMockRecorder is the mock recorder for MockMongoPositionStore
type MockMongoPositionStoreMockRecorder struct {
mock *MockMongoPositionStore
}
// NewMockMongoPositionStore creates a new mock instance
func NewMockMongoPositionStore(ctrl *gomock.Controller) *MockMongoPositionStore {
mock := &MockMongoPositionStore{ctrl: ctrl}
mock.recorder = &MockMongoPositionStoreMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockMongoPositionStore) EXPECT() *MockMongoPositionStoreMockRecorder {
return m.recorder
}
// Close mocks base method
func (m *MockMongoPositionStore) Close() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Close")
}
// Close indicates an expected call of Close
func (mr *MockMongoPositionStoreMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockMongoPositionStore)(nil).Close))
}
// Get mocks base method
func (m *MockMongoPositionStore) Get() config.MongoPosition {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get")
ret0, _ := ret[0].(config.MongoPosition)
return ret0
}
// Get indicates an expected call of Get
func (mr *MockMongoPositionStoreMockRecorder) Get() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockMongoPositionStore)(nil).Get))
}
// Put mocks base method
func (m *MockMongoPositionStore) Put(arg0 config.MongoPosition) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Put", arg0)
}
// Put indicates an expected call of Put
func (mr *MockMongoPositionStoreMockRecorder) Put(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockMongoPositionStore)(nil).Put), arg0)
}
// Start mocks base method
func (m *MockMongoPositionStore) Start() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Start")
ret0, _ := ret[0].(error)
return ret0
}
// Start indicates an expected call of Start
func (mr *MockMongoPositionStoreMockRecorder) Start() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockMongoPositionStore)(nil).Start))
}
// MockMySQLTablePositionStore is a mock of MySQLTablePositionStore interface
type MockMySQLTablePositionStore struct {
ctrl *gomock.Controller
recorder *MockMySQLTablePositionStoreMockRecorder
}
// MockMySQLTablePositionStoreMockRecorder is the mock recorder for MockMySQLTablePositionStore
type MockMySQLTablePositionStoreMockRecorder struct {
mock *MockMySQLTablePositionStore
}
// NewMockMySQLTablePositionStore creates a new mock instance
func NewMockMySQLTablePositionStore(ctrl *gomock.Controller) *MockMySQLTablePositionStore {
mock := &MockMySQLTablePositionStore{ctrl: ctrl}
mock.recorder = &MockMySQLTablePositionStoreMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockMySQLTablePositionStore) EXPECT() *MockMySQLTablePositionStoreMockRecorder {
return m.recorder
}
// Close mocks base method
func (m *MockMySQLTablePositionStore) Close() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Close")
}
// Close indicates an expected call of Close
func (mr *MockMySQLTablePositionStoreMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockMySQLTablePositionStore)(nil).Close))
}
// GetCurrent mocks base method
func (m *MockMySQLTablePositionStore) GetCurrent(arg0 string) (position_store.MySQLTablePosition, bool) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCurrent", arg0)
ret0, _ := ret[0].(position_store.MySQLTablePosition)
ret1, _ := ret[1].(bool)
return ret0, ret1
}
// GetCurrent indicates an expected call of GetCurrent
func (mr *MockMySQLTablePositionStoreMockRecorder) GetCurrent(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCurrent", reflect.TypeOf((*MockMySQLTablePositionStore)(nil).GetCurrent), arg0)
}
// GetMaxMin mocks base method
func (m *MockMySQLTablePositionStore) GetMaxMin(arg0 string) (position_store.MySQLTablePosition, position_store.MySQLTablePosition, bool) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetMaxMin", arg0)
ret0, _ := ret[0].(position_store.MySQLTablePosition)
ret1, _ := ret[1].(position_store.MySQLTablePosition)
ret2, _ := ret[2].(bool)
return ret0, ret1, ret2
}
// GetMaxMin indicates an expected call of GetMaxMin
func (mr *MockMySQLTablePositionStoreMockRecorder) GetMaxMin(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMaxMin", reflect.TypeOf((*MockMySQLTablePositionStore)(nil).GetMaxMin), arg0)
}
// GetStartBinlogPos mocks base method
func (m *MockMySQLTablePositionStore) GetStartBinlogPos() (utils.MySQLBinlogPosition, bool) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetStartBinlogPos")
ret0, _ := ret[0].(utils.MySQLBinlogPosition)
ret1, _ := ret[1].(bool)
return ret0, ret1
}
// GetStartBinlogPos indicates an expected call of GetStartBinlogPos
func (mr *MockMySQLTablePositionStoreMockRecorder) GetStartBinlogPos() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStartBinlogPos", reflect.TypeOf((*MockMySQLTablePositionStore)(nil).GetStartBinlogPos))
}
// PutCurrent mocks base method
func (m *MockMySQLTablePositionStore) PutCurrent(arg0 string, arg1 position_store.MySQLTablePosition) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "PutCurrent", arg0, arg1)
}
// PutCurrent indicates an expected call of PutCurrent
func (mr *MockMySQLTablePositionStoreMockRecorder) PutCurrent(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutCurrent", reflect.TypeOf((*MockMySQLTablePositionStore)(nil).PutCurrent), arg0, arg1)
}
// PutMaxMin mocks base method
func (m *MockMySQLTablePositionStore) PutMaxMin(arg0 string, arg1, arg2 position_store.MySQLTablePosition) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "PutMaxMin", arg0, arg1, arg2)
}
// PutMaxMin indicates an expected call of PutMaxMin
func (mr *MockMySQLTablePositionStoreMockRecorder) PutMaxMin(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutMaxMin", reflect.TypeOf((*MockMySQLTablePositionStore)(nil).PutMaxMin), arg0, arg1, arg2)
}
// PutStartBinlogPos mocks base method
func (m *MockMySQLTablePositionStore) PutStartBinlogPos(arg0 utils.MySQLBinlogPosition) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "PutStartBinlogPos", arg0)
}
// PutStartBinlogPos indicates an expected call of PutStartBinlogPos
func (mr *MockMySQLTablePositionStoreMockRecorder) PutStartBinlogPos(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutStartBinlogPos", reflect.TypeOf((*MockMySQLTablePositionStore)(nil).PutStartBinlogPos), arg0)
}
// Start mocks base method
func (m *MockMySQLTablePositionStore) Start() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Start")
ret0, _ := ret[0].(error)
return ret0
}
// Start indicates an expected call of Start
func (mr *MockMySQLTablePositionStoreMockRecorder) Start() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockMySQLTablePositionStore)(nil).Start))
}