-
Notifications
You must be signed in to change notification settings - Fork 153
/
mock.go
208 lines (175 loc) · 6.33 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
// Code generated by MockGen. DO NOT EDIT.
// Source: pkg/datastore/datastore.go
package datastore
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
)
// MockCollection is a mock of Collection interface.
type MockCollection struct {
ctrl *gomock.Controller
recorder *MockCollectionMockRecorder
}
// MockCollectionMockRecorder is the mock recorder for MockCollection.
type MockCollectionMockRecorder struct {
mock *MockCollection
}
// NewMockCollection creates a new mock instance.
func NewMockCollection(ctrl *gomock.Controller) *MockCollection {
mock := &MockCollection{ctrl: ctrl}
mock.recorder = &MockCollectionMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockCollection) EXPECT() *MockCollectionMockRecorder {
return m.recorder
}
// Factory mocks base method.
func (m *MockCollection) Factory() Factory {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Factory")
ret0, _ := ret[0].(Factory)
return ret0
}
// Factory indicates an expected call of Factory.
func (mr *MockCollectionMockRecorder) Factory() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Factory", reflect.TypeOf((*MockCollection)(nil).Factory))
}
// Kind mocks base method.
func (m *MockCollection) Kind() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Kind")
ret0, _ := ret[0].(string)
return ret0
}
// Kind indicates an expected call of Kind.
func (mr *MockCollectionMockRecorder) Kind() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Kind", reflect.TypeOf((*MockCollection)(nil).Kind))
}
// MockDataStore is a mock of DataStore interface.
type MockDataStore struct {
ctrl *gomock.Controller
recorder *MockDataStoreMockRecorder
}
// MockDataStoreMockRecorder is the mock recorder for MockDataStore.
type MockDataStoreMockRecorder struct {
mock *MockDataStore
}
// NewMockDataStore creates a new mock instance.
func NewMockDataStore(ctrl *gomock.Controller) *MockDataStore {
mock := &MockDataStore{ctrl: ctrl}
mock.recorder = &MockDataStoreMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockDataStore) EXPECT() *MockDataStoreMockRecorder {
return m.recorder
}
// Close mocks base method.
func (m *MockDataStore) 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 *MockDataStoreMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDataStore)(nil).Close))
}
// Create mocks base method.
func (m *MockDataStore) Create(ctx context.Context, col Collection, id string, entity interface{}) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Create", ctx, col, id, entity)
ret0, _ := ret[0].(error)
return ret0
}
// Create indicates an expected call of Create.
func (mr *MockDataStoreMockRecorder) Create(ctx, col, id, entity interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockDataStore)(nil).Create), ctx, col, id, entity)
}
// Find mocks base method.
func (m *MockDataStore) Find(ctx context.Context, col Collection, opts ListOptions) (Iterator, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Find", ctx, col, opts)
ret0, _ := ret[0].(Iterator)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Find indicates an expected call of Find.
func (mr *MockDataStoreMockRecorder) Find(ctx, col, opts interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Find", reflect.TypeOf((*MockDataStore)(nil).Find), ctx, col, opts)
}
// Get mocks base method.
func (m *MockDataStore) Get(ctx context.Context, col Collection, id string, entity interface{}) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", ctx, col, id, entity)
ret0, _ := ret[0].(error)
return ret0
}
// Get indicates an expected call of Get.
func (mr *MockDataStoreMockRecorder) Get(ctx, col, id, entity interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockDataStore)(nil).Get), ctx, col, id, entity)
}
// Update mocks base method.
func (m *MockDataStore) Update(ctx context.Context, col Collection, id string, updater Updater) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Update", ctx, col, id, updater)
ret0, _ := ret[0].(error)
return ret0
}
// Update indicates an expected call of Update.
func (mr *MockDataStoreMockRecorder) Update(ctx, col, id, updater interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockDataStore)(nil).Update), ctx, col, id, updater)
}
// MockIterator is a mock of Iterator interface.
type MockIterator struct {
ctrl *gomock.Controller
recorder *MockIteratorMockRecorder
}
// MockIteratorMockRecorder is the mock recorder for MockIterator.
type MockIteratorMockRecorder struct {
mock *MockIterator
}
// NewMockIterator creates a new mock instance.
func NewMockIterator(ctrl *gomock.Controller) *MockIterator {
mock := &MockIterator{ctrl: ctrl}
mock.recorder = &MockIteratorMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockIterator) EXPECT() *MockIteratorMockRecorder {
return m.recorder
}
// Cursor mocks base method.
func (m *MockIterator) Cursor() (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Cursor")
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Cursor indicates an expected call of Cursor.
func (mr *MockIteratorMockRecorder) Cursor() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cursor", reflect.TypeOf((*MockIterator)(nil).Cursor))
}
// Next mocks base method.
func (m *MockIterator) Next(dst interface{}) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Next", dst)
ret0, _ := ret[0].(error)
return ret0
}
// Next indicates an expected call of Next.
func (mr *MockIteratorMockRecorder) Next(dst interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Next", reflect.TypeOf((*MockIterator)(nil).Next), dst)
}