-
Notifications
You must be signed in to change notification settings - Fork 269
/
client_mock.go
134 lines (115 loc) · 4.32 KB
/
client_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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/pingcap/tiflow/engine/pkg/meta/model (interfaces: KVClient)
// Package mock is a generated GoMock package.
package mock
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
model "github.com/pingcap/tiflow/engine/pkg/meta/model"
)
// MockKVClient is a mock of KVClient interface.
type MockKVClient struct {
ctrl *gomock.Controller
recorder *MockKVClientMockRecorder
}
// MockKVClientMockRecorder is the mock recorder for MockKVClient.
type MockKVClientMockRecorder struct {
mock *MockKVClient
}
// NewMockKVClient creates a new mock instance.
func NewMockKVClient(ctrl *gomock.Controller) *MockKVClient {
mock := &MockKVClient{ctrl: ctrl}
mock.recorder = &MockKVClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockKVClient) EXPECT() *MockKVClientMockRecorder {
return m.recorder
}
// Close mocks base method.
func (m *MockKVClient) 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 *MockKVClientMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockKVClient)(nil).Close))
}
// Delete mocks base method.
func (m *MockKVClient) Delete(arg0 context.Context, arg1 string, arg2 ...model.OpOption) (*model.DeleteResponse, model.Error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Delete", varargs...)
ret0, _ := ret[0].(*model.DeleteResponse)
ret1, _ := ret[1].(model.Error)
return ret0, ret1
}
// Delete indicates an expected call of Delete.
func (mr *MockKVClientMockRecorder) Delete(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, "Delete", reflect.TypeOf((*MockKVClient)(nil).Delete), varargs...)
}
// GenEpoch mocks base method.
func (m *MockKVClient) GenEpoch(arg0 context.Context) (int64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GenEpoch", arg0)
ret0, _ := ret[0].(int64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GenEpoch indicates an expected call of GenEpoch.
func (mr *MockKVClientMockRecorder) GenEpoch(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GenEpoch", reflect.TypeOf((*MockKVClient)(nil).GenEpoch), arg0)
}
// Get mocks base method.
func (m *MockKVClient) Get(arg0 context.Context, arg1 string, arg2 ...model.OpOption) (*model.GetResponse, model.Error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Get", varargs...)
ret0, _ := ret[0].(*model.GetResponse)
ret1, _ := ret[1].(model.Error)
return ret0, ret1
}
// Get indicates an expected call of Get.
func (mr *MockKVClientMockRecorder) Get(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, "Get", reflect.TypeOf((*MockKVClient)(nil).Get), varargs...)
}
// Put mocks base method.
func (m *MockKVClient) Put(arg0 context.Context, arg1, arg2 string) (*model.PutResponse, model.Error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Put", arg0, arg1, arg2)
ret0, _ := ret[0].(*model.PutResponse)
ret1, _ := ret[1].(model.Error)
return ret0, ret1
}
// Put indicates an expected call of Put.
func (mr *MockKVClientMockRecorder) Put(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockKVClient)(nil).Put), arg0, arg1, arg2)
}
// Txn mocks base method.
func (m *MockKVClient) Txn(arg0 context.Context) model.Txn {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Txn", arg0)
ret0, _ := ret[0].(model.Txn)
return ret0
}
// Txn indicates an expected call of Txn.
func (mr *MockKVClientMockRecorder) Txn(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Txn", reflect.TypeOf((*MockKVClient)(nil).Txn), arg0)
}