~evanj/cms

ref: 27de4d9c907e2258a828fbfcda8f22b910df0f63 cms/internal/c/content/content_mock.go -rw-r--r-- 9.4 KiB
27de4d9cEvan M Jones Feat(spaces): Added the ability to copy an entire space. 1 year, 3 months ago
                                                                                
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
// Code generated by MockGen. DO NOT EDIT.
// Source: git.sr.ht/~evanj/cms/internal/c/content (interfaces: DBer,E3er,Hooker)

// Package content is a generated GoMock package.
package content

import (
	context "context"
	io "io"
	reflect "reflect"

	content "git.sr.ht/~evanj/cms/internal/m/content"
	contenttype "git.sr.ht/~evanj/cms/internal/m/contenttype"
	space "git.sr.ht/~evanj/cms/internal/m/space"
	user "git.sr.ht/~evanj/cms/internal/m/user"
	db "git.sr.ht/~evanj/cms/internal/s/db"
	hook "git.sr.ht/~evanj/cms/internal/s/hook"
	gomock "github.com/golang/mock/gomock"
)

// MockDBer is a mock of DBer interface.
type MockDBer struct {
	ctrl     *gomock.Controller
	recorder *MockDBerMockRecorder
}

// MockDBerMockRecorder is the mock recorder for MockDBer.
type MockDBerMockRecorder struct {
	mock *MockDBer
}

// NewMockDBer creates a new mock instance.
func NewMockDBer(ctrl *gomock.Controller) *MockDBer {
	mock := &MockDBer{ctrl: ctrl}
	mock.recorder = &MockDBerMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockDBer) EXPECT() *MockDBerMockRecorder {
	return m.recorder
}

// ContentDelete mocks base method.
func (m *MockDBer) ContentDelete(arg0 space.Space, arg1 contenttype.ContentType, arg2 content.Content) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ContentDelete", arg0, arg1, arg2)
	ret0, _ := ret[0].(error)
	return ret0
}

// ContentDelete indicates an expected call of ContentDelete.
func (mr *MockDBerMockRecorder) ContentDelete(arg0, arg1, arg2 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContentDelete", reflect.TypeOf((*MockDBer)(nil).ContentDelete), arg0, arg1, arg2)
}

// ContentGet mocks base method.
func (m *MockDBer) ContentGet(arg0 space.Space, arg1 contenttype.ContentType, arg2 string) (content.Content, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ContentGet", arg0, arg1, arg2)
	ret0, _ := ret[0].(content.Content)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// ContentGet indicates an expected call of ContentGet.
func (mr *MockDBerMockRecorder) ContentGet(arg0, arg1, arg2 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContentGet", reflect.TypeOf((*MockDBer)(nil).ContentGet), arg0, arg1, arg2)
}

// ContentNew mocks base method.
func (m *MockDBer) ContentNew(arg0 space.Space, arg1 contenttype.ContentType, arg2 []db.ContentNewParam) (content.Content, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ContentNew", arg0, arg1, arg2)
	ret0, _ := ret[0].(content.Content)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// ContentNew indicates an expected call of ContentNew.
func (mr *MockDBerMockRecorder) ContentNew(arg0, arg1, arg2 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContentNew", reflect.TypeOf((*MockDBer)(nil).ContentNew), arg0, arg1, arg2)
}

// ContentPerContentType mocks base method.
func (m *MockDBer) ContentPerContentType(arg0 space.Space, arg1 contenttype.ContentType, arg2 int, arg3 db.OrderType, arg4 string) ([]content.Content, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ContentPerContentType", arg0, arg1, arg2, arg3, arg4)
	ret0, _ := ret[0].([]content.Content)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// ContentPerContentType indicates an expected call of ContentPerContentType.
func (mr *MockDBerMockRecorder) ContentPerContentType(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContentPerContentType", reflect.TypeOf((*MockDBer)(nil).ContentPerContentType), arg0, arg1, arg2, arg3, arg4)
}

// ContentSearch mocks base method.
func (m *MockDBer) ContentSearch(arg0 space.Space, arg1 contenttype.ContentType, arg2, arg3 string, arg4 int) ([]content.Content, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ContentSearch", arg0, arg1, arg2, arg3, arg4)
	ret0, _ := ret[0].([]content.Content)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// ContentSearch indicates an expected call of ContentSearch.
func (mr *MockDBerMockRecorder) ContentSearch(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContentSearch", reflect.TypeOf((*MockDBer)(nil).ContentSearch), arg0, arg1, arg2, arg3, arg4)
}

// ContentTypeGet mocks base method.
func (m *MockDBer) ContentTypeGet(arg0 space.Space, arg1 string) (contenttype.ContentType, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ContentTypeGet", arg0, arg1)
	ret0, _ := ret[0].(contenttype.ContentType)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// ContentTypeGet indicates an expected call of ContentTypeGet.
func (mr *MockDBerMockRecorder) ContentTypeGet(arg0, arg1 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContentTypeGet", reflect.TypeOf((*MockDBer)(nil).ContentTypeGet), arg0, arg1)
}

// ContentUpdate mocks base method.
func (m *MockDBer) ContentUpdate(arg0 space.Space, arg1 contenttype.ContentType, arg2 content.Content, arg3 []db.ContentNewParam, arg4 []db.ContentUpdateParam) (content.Content, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ContentUpdate", arg0, arg1, arg2, arg3, arg4)
	ret0, _ := ret[0].(content.Content)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// ContentUpdate indicates an expected call of ContentUpdate.
func (mr *MockDBerMockRecorder) ContentUpdate(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContentUpdate", reflect.TypeOf((*MockDBer)(nil).ContentUpdate), arg0, arg1, arg2, arg3, arg4)
}

// SpaceGet mocks base method.
func (m *MockDBer) SpaceGet(arg0 user.User, arg1 string) (space.Space, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "SpaceGet", arg0, arg1)
	ret0, _ := ret[0].(space.Space)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// SpaceGet indicates an expected call of SpaceGet.
func (mr *MockDBerMockRecorder) SpaceGet(arg0, arg1 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceGet", reflect.TypeOf((*MockDBer)(nil).SpaceGet), arg0, arg1)
}

// UserGet mocks base method.
func (m *MockDBer) UserGet(arg0, arg1 string) (user.User, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UserGet", arg0, arg1)
	ret0, _ := ret[0].(user.User)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// UserGet indicates an expected call of UserGet.
func (mr *MockDBerMockRecorder) UserGet(arg0, arg1 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserGet", reflect.TypeOf((*MockDBer)(nil).UserGet), arg0, arg1)
}

// UserGetFromToken mocks base method.
func (m *MockDBer) UserGetFromToken(arg0 string) (user.User, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UserGetFromToken", arg0)
	ret0, _ := ret[0].(user.User)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// UserGetFromToken indicates an expected call of UserGetFromToken.
func (mr *MockDBerMockRecorder) UserGetFromToken(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserGetFromToken", reflect.TypeOf((*MockDBer)(nil).UserGetFromToken), arg0)
}

// MockE3er is a mock of E3er interface.
type MockE3er struct {
	ctrl     *gomock.Controller
	recorder *MockE3erMockRecorder
}

// MockE3erMockRecorder is the mock recorder for MockE3er.
type MockE3erMockRecorder struct {
	mock *MockE3er
}

// NewMockE3er creates a new mock instance.
func NewMockE3er(ctrl *gomock.Controller) *MockE3er {
	mock := &MockE3er{ctrl: ctrl}
	mock.recorder = &MockE3erMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockE3er) EXPECT() *MockE3erMockRecorder {
	return m.recorder
}

// Upload mocks base method.
func (m *MockE3er) Upload(arg0 context.Context, arg1 bool, arg2 string, arg3 io.Reader) (string, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Upload", arg0, arg1, arg2, arg3)
	ret0, _ := ret[0].(string)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Upload indicates an expected call of Upload.
func (mr *MockE3erMockRecorder) Upload(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upload", reflect.TypeOf((*MockE3er)(nil).Upload), arg0, arg1, arg2, arg3)
}

// MockHooker is a mock of Hooker interface.
type MockHooker struct {
	ctrl     *gomock.Controller
	recorder *MockHookerMockRecorder
}

// MockHookerMockRecorder is the mock recorder for MockHooker.
type MockHookerMockRecorder struct {
	mock *MockHooker
}

// NewMockHooker creates a new mock instance.
func NewMockHooker(ctrl *gomock.Controller) *MockHooker {
	mock := &MockHooker{ctrl: ctrl}
	mock.recorder = &MockHookerMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockHooker) EXPECT() *MockHookerMockRecorder {
	return m.recorder
}

// Do mocks base method.
func (m *MockHooker) Do(arg0 space.Space, arg1 content.Content, arg2 hook.HookType) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "Do", arg0, arg1, arg2)
}

// Do indicates an expected call of Do.
func (mr *MockHookerMockRecorder) Do(arg0, arg1, arg2 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockHooker)(nil).Do), arg0, arg1, arg2)
}