-
Notifications
You must be signed in to change notification settings - Fork 62
/
mock_store.go
272 lines (231 loc) · 8.68 KB
/
mock_store.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/marmotedu/miniblog/internal/miniblog/store (interfaces: IStore,UserStore,PostStore)
// Package store is a generated GoMock package.
package store
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
store "github.com/marmotedu/miniblog/internal/miniblog/store"
model "github.com/marmotedu/miniblog/internal/pkg/model"
gorm "gorm.io/gorm"
)
// MockIStore is a mock of IStore interface.
type MockIStore struct {
ctrl *gomock.Controller
recorder *MockIStoreMockRecorder
}
// MockIStoreMockRecorder is the mock recorder for MockIStore.
type MockIStoreMockRecorder struct {
mock *MockIStore
}
// NewMockIStore creates a new mock instance.
func NewMockIStore(ctrl *gomock.Controller) *MockIStore {
mock := &MockIStore{ctrl: ctrl}
mock.recorder = &MockIStoreMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockIStore) EXPECT() *MockIStoreMockRecorder {
return m.recorder
}
// DB mocks base method.
func (m *MockIStore) DB() *gorm.DB {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DB")
ret0, _ := ret[0].(*gorm.DB)
return ret0
}
// DB indicates an expected call of DB.
func (mr *MockIStoreMockRecorder) DB() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DB", reflect.TypeOf((*MockIStore)(nil).DB))
}
// Posts mocks base method.
func (m *MockIStore) Posts() store.PostStore {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Posts")
ret0, _ := ret[0].(store.PostStore)
return ret0
}
// Posts indicates an expected call of Posts.
func (mr *MockIStoreMockRecorder) Posts() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Posts", reflect.TypeOf((*MockIStore)(nil).Posts))
}
// Users mocks base method.
func (m *MockIStore) Users() store.UserStore {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Users")
ret0, _ := ret[0].(store.UserStore)
return ret0
}
// Users indicates an expected call of Users.
func (mr *MockIStoreMockRecorder) Users() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Users", reflect.TypeOf((*MockIStore)(nil).Users))
}
// MockUserStore is a mock of UserStore interface.
type MockUserStore struct {
ctrl *gomock.Controller
recorder *MockUserStoreMockRecorder
}
// MockUserStoreMockRecorder is the mock recorder for MockUserStore.
type MockUserStoreMockRecorder struct {
mock *MockUserStore
}
// NewMockUserStore creates a new mock instance.
func NewMockUserStore(ctrl *gomock.Controller) *MockUserStore {
mock := &MockUserStore{ctrl: ctrl}
mock.recorder = &MockUserStoreMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockUserStore) EXPECT() *MockUserStoreMockRecorder {
return m.recorder
}
// Create mocks base method.
func (m *MockUserStore) Create(arg0 context.Context, arg1 *model.UserM) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Create", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Create indicates an expected call of Create.
func (mr *MockUserStoreMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockUserStore)(nil).Create), arg0, arg1)
}
// Delete mocks base method.
func (m *MockUserStore) Delete(arg0 context.Context, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delete", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Delete indicates an expected call of Delete.
func (mr *MockUserStoreMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockUserStore)(nil).Delete), arg0, arg1)
}
// Get mocks base method.
func (m *MockUserStore) Get(arg0 context.Context, arg1 string) (*model.UserM, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", arg0, arg1)
ret0, _ := ret[0].(*model.UserM)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Get indicates an expected call of Get.
func (mr *MockUserStoreMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockUserStore)(nil).Get), arg0, arg1)
}
// List mocks base method.
func (m *MockUserStore) List(arg0 context.Context, arg1, arg2 int) (int64, []*model.UserM, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "List", arg0, arg1, arg2)
ret0, _ := ret[0].(int64)
ret1, _ := ret[1].([]*model.UserM)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// List indicates an expected call of List.
func (mr *MockUserStoreMockRecorder) List(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockUserStore)(nil).List), arg0, arg1, arg2)
}
// Update mocks base method.
func (m *MockUserStore) Update(arg0 context.Context, arg1 *model.UserM) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Update", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Update indicates an expected call of Update.
func (mr *MockUserStoreMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockUserStore)(nil).Update), arg0, arg1)
}
// MockPostStore is a mock of PostStore interface.
type MockPostStore struct {
ctrl *gomock.Controller
recorder *MockPostStoreMockRecorder
}
// MockPostStoreMockRecorder is the mock recorder for MockPostStore.
type MockPostStoreMockRecorder struct {
mock *MockPostStore
}
// NewMockPostStore creates a new mock instance.
func NewMockPostStore(ctrl *gomock.Controller) *MockPostStore {
mock := &MockPostStore{ctrl: ctrl}
mock.recorder = &MockPostStoreMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPostStore) EXPECT() *MockPostStoreMockRecorder {
return m.recorder
}
// Create mocks base method.
func (m *MockPostStore) Create(arg0 context.Context, arg1 *model.PostM) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Create", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Create indicates an expected call of Create.
func (mr *MockPostStoreMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockPostStore)(nil).Create), arg0, arg1)
}
// Delete mocks base method.
func (m *MockPostStore) Delete(arg0 context.Context, arg1 string, arg2 []string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delete", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// Delete indicates an expected call of Delete.
func (mr *MockPostStoreMockRecorder) Delete(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockPostStore)(nil).Delete), arg0, arg1, arg2)
}
// Get mocks base method.
func (m *MockPostStore) Get(arg0 context.Context, arg1, arg2 string) (*model.PostM, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", arg0, arg1, arg2)
ret0, _ := ret[0].(*model.PostM)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Get indicates an expected call of Get.
func (mr *MockPostStoreMockRecorder) Get(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPostStore)(nil).Get), arg0, arg1, arg2)
}
// List mocks base method.
func (m *MockPostStore) List(arg0 context.Context, arg1 string, arg2, arg3 int) (int64, []*model.PostM, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "List", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(int64)
ret1, _ := ret[1].([]*model.PostM)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// List indicates an expected call of List.
func (mr *MockPostStoreMockRecorder) List(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPostStore)(nil).List), arg0, arg1, arg2, arg3)
}
// Update mocks base method.
func (m *MockPostStore) Update(arg0 context.Context, arg1 *model.PostM) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Update", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Update indicates an expected call of Update.
func (mr *MockPostStoreMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockPostStore)(nil).Update), arg0, arg1)
}