github.com/wgh-/mattermost-server@v4.8.0-rc2+incompatible/store/storetest/mocks/PostStore.go (about) 1 // Code generated by mockery v1.0.0 2 3 // Regenerate this file using `make store-mocks`. 4 5 package mocks 6 7 import mock "github.com/stretchr/testify/mock" 8 import model "github.com/mattermost/mattermost-server/model" 9 import store "github.com/mattermost/mattermost-server/store" 10 11 // PostStore is an autogenerated mock type for the PostStore type 12 type PostStore struct { 13 mock.Mock 14 } 15 16 // AnalyticsPostCount provides a mock function with given fields: teamId, mustHaveFile, mustHaveHashtag 17 func (_m *PostStore) AnalyticsPostCount(teamId string, mustHaveFile bool, mustHaveHashtag bool) store.StoreChannel { 18 ret := _m.Called(teamId, mustHaveFile, mustHaveHashtag) 19 20 var r0 store.StoreChannel 21 if rf, ok := ret.Get(0).(func(string, bool, bool) store.StoreChannel); ok { 22 r0 = rf(teamId, mustHaveFile, mustHaveHashtag) 23 } else { 24 if ret.Get(0) != nil { 25 r0 = ret.Get(0).(store.StoreChannel) 26 } 27 } 28 29 return r0 30 } 31 32 // AnalyticsPostCountsByDay provides a mock function with given fields: teamId 33 func (_m *PostStore) AnalyticsPostCountsByDay(teamId string) store.StoreChannel { 34 ret := _m.Called(teamId) 35 36 var r0 store.StoreChannel 37 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 38 r0 = rf(teamId) 39 } else { 40 if ret.Get(0) != nil { 41 r0 = ret.Get(0).(store.StoreChannel) 42 } 43 } 44 45 return r0 46 } 47 48 // AnalyticsUserCountsWithPostsByDay provides a mock function with given fields: teamId 49 func (_m *PostStore) AnalyticsUserCountsWithPostsByDay(teamId string) store.StoreChannel { 50 ret := _m.Called(teamId) 51 52 var r0 store.StoreChannel 53 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 54 r0 = rf(teamId) 55 } else { 56 if ret.Get(0) != nil { 57 r0 = ret.Get(0).(store.StoreChannel) 58 } 59 } 60 61 return r0 62 } 63 64 // Delete provides a mock function with given fields: postId, time 65 func (_m *PostStore) Delete(postId string, time int64) store.StoreChannel { 66 ret := _m.Called(postId, time) 67 68 var r0 store.StoreChannel 69 if rf, ok := ret.Get(0).(func(string, int64) store.StoreChannel); ok { 70 r0 = rf(postId, time) 71 } else { 72 if ret.Get(0) != nil { 73 r0 = ret.Get(0).(store.StoreChannel) 74 } 75 } 76 77 return r0 78 } 79 80 // Get provides a mock function with given fields: id 81 func (_m *PostStore) Get(id string) store.StoreChannel { 82 ret := _m.Called(id) 83 84 var r0 store.StoreChannel 85 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 86 r0 = rf(id) 87 } else { 88 if ret.Get(0) != nil { 89 r0 = ret.Get(0).(store.StoreChannel) 90 } 91 } 92 93 return r0 94 } 95 96 // GetEtag provides a mock function with given fields: channelId, allowFromCache 97 func (_m *PostStore) GetEtag(channelId string, allowFromCache bool) store.StoreChannel { 98 ret := _m.Called(channelId, allowFromCache) 99 100 var r0 store.StoreChannel 101 if rf, ok := ret.Get(0).(func(string, bool) store.StoreChannel); ok { 102 r0 = rf(channelId, allowFromCache) 103 } else { 104 if ret.Get(0) != nil { 105 r0 = ret.Get(0).(store.StoreChannel) 106 } 107 } 108 109 return r0 110 } 111 112 // GetFlaggedPosts provides a mock function with given fields: userId, offset, limit 113 func (_m *PostStore) GetFlaggedPosts(userId string, offset int, limit int) store.StoreChannel { 114 ret := _m.Called(userId, offset, limit) 115 116 var r0 store.StoreChannel 117 if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok { 118 r0 = rf(userId, offset, limit) 119 } else { 120 if ret.Get(0) != nil { 121 r0 = ret.Get(0).(store.StoreChannel) 122 } 123 } 124 125 return r0 126 } 127 128 // GetFlaggedPostsForChannel provides a mock function with given fields: userId, channelId, offset, limit 129 func (_m *PostStore) GetFlaggedPostsForChannel(userId string, channelId string, offset int, limit int) store.StoreChannel { 130 ret := _m.Called(userId, channelId, offset, limit) 131 132 var r0 store.StoreChannel 133 if rf, ok := ret.Get(0).(func(string, string, int, int) store.StoreChannel); ok { 134 r0 = rf(userId, channelId, offset, limit) 135 } else { 136 if ret.Get(0) != nil { 137 r0 = ret.Get(0).(store.StoreChannel) 138 } 139 } 140 141 return r0 142 } 143 144 // GetFlaggedPostsForTeam provides a mock function with given fields: userId, teamId, offset, limit 145 func (_m *PostStore) GetFlaggedPostsForTeam(userId string, teamId string, offset int, limit int) store.StoreChannel { 146 ret := _m.Called(userId, teamId, offset, limit) 147 148 var r0 store.StoreChannel 149 if rf, ok := ret.Get(0).(func(string, string, int, int) store.StoreChannel); ok { 150 r0 = rf(userId, teamId, offset, limit) 151 } else { 152 if ret.Get(0) != nil { 153 r0 = ret.Get(0).(store.StoreChannel) 154 } 155 } 156 157 return r0 158 } 159 160 // GetOldest provides a mock function with given fields: 161 func (_m *PostStore) GetOldest() store.StoreChannel { 162 ret := _m.Called() 163 164 var r0 store.StoreChannel 165 if rf, ok := ret.Get(0).(func() store.StoreChannel); ok { 166 r0 = rf() 167 } else { 168 if ret.Get(0) != nil { 169 r0 = ret.Get(0).(store.StoreChannel) 170 } 171 } 172 173 return r0 174 } 175 176 // GetPosts provides a mock function with given fields: channelId, offset, limit, allowFromCache 177 func (_m *PostStore) GetPosts(channelId string, offset int, limit int, allowFromCache bool) store.StoreChannel { 178 ret := _m.Called(channelId, offset, limit, allowFromCache) 179 180 var r0 store.StoreChannel 181 if rf, ok := ret.Get(0).(func(string, int, int, bool) store.StoreChannel); ok { 182 r0 = rf(channelId, offset, limit, allowFromCache) 183 } else { 184 if ret.Get(0) != nil { 185 r0 = ret.Get(0).(store.StoreChannel) 186 } 187 } 188 189 return r0 190 } 191 192 // GetPostsAfter provides a mock function with given fields: channelId, postId, numPosts, offset 193 func (_m *PostStore) GetPostsAfter(channelId string, postId string, numPosts int, offset int) store.StoreChannel { 194 ret := _m.Called(channelId, postId, numPosts, offset) 195 196 var r0 store.StoreChannel 197 if rf, ok := ret.Get(0).(func(string, string, int, int) store.StoreChannel); ok { 198 r0 = rf(channelId, postId, numPosts, offset) 199 } else { 200 if ret.Get(0) != nil { 201 r0 = ret.Get(0).(store.StoreChannel) 202 } 203 } 204 205 return r0 206 } 207 208 // GetPostsBatchForIndexing provides a mock function with given fields: startTime, endTime, limit 209 func (_m *PostStore) GetPostsBatchForIndexing(startTime int64, endTime int64, limit int) store.StoreChannel { 210 ret := _m.Called(startTime, endTime, limit) 211 212 var r0 store.StoreChannel 213 if rf, ok := ret.Get(0).(func(int64, int64, int) store.StoreChannel); ok { 214 r0 = rf(startTime, endTime, limit) 215 } else { 216 if ret.Get(0) != nil { 217 r0 = ret.Get(0).(store.StoreChannel) 218 } 219 } 220 221 return r0 222 } 223 224 // GetPostsBefore provides a mock function with given fields: channelId, postId, numPosts, offset 225 func (_m *PostStore) GetPostsBefore(channelId string, postId string, numPosts int, offset int) store.StoreChannel { 226 ret := _m.Called(channelId, postId, numPosts, offset) 227 228 var r0 store.StoreChannel 229 if rf, ok := ret.Get(0).(func(string, string, int, int) store.StoreChannel); ok { 230 r0 = rf(channelId, postId, numPosts, offset) 231 } else { 232 if ret.Get(0) != nil { 233 r0 = ret.Get(0).(store.StoreChannel) 234 } 235 } 236 237 return r0 238 } 239 240 // GetPostsByIds provides a mock function with given fields: postIds 241 func (_m *PostStore) GetPostsByIds(postIds []string) store.StoreChannel { 242 ret := _m.Called(postIds) 243 244 var r0 store.StoreChannel 245 if rf, ok := ret.Get(0).(func([]string) store.StoreChannel); ok { 246 r0 = rf(postIds) 247 } else { 248 if ret.Get(0) != nil { 249 r0 = ret.Get(0).(store.StoreChannel) 250 } 251 } 252 253 return r0 254 } 255 256 // GetPostsCreatedAt provides a mock function with given fields: channelId, time 257 func (_m *PostStore) GetPostsCreatedAt(channelId string, time int64) store.StoreChannel { 258 ret := _m.Called(channelId, time) 259 260 var r0 store.StoreChannel 261 if rf, ok := ret.Get(0).(func(string, int64) store.StoreChannel); ok { 262 r0 = rf(channelId, time) 263 } else { 264 if ret.Get(0) != nil { 265 r0 = ret.Get(0).(store.StoreChannel) 266 } 267 } 268 269 return r0 270 } 271 272 // GetPostsSince provides a mock function with given fields: channelId, time, allowFromCache 273 func (_m *PostStore) GetPostsSince(channelId string, time int64, allowFromCache bool) store.StoreChannel { 274 ret := _m.Called(channelId, time, allowFromCache) 275 276 var r0 store.StoreChannel 277 if rf, ok := ret.Get(0).(func(string, int64, bool) store.StoreChannel); ok { 278 r0 = rf(channelId, time, allowFromCache) 279 } else { 280 if ret.Get(0) != nil { 281 r0 = ret.Get(0).(store.StoreChannel) 282 } 283 } 284 285 return r0 286 } 287 288 // GetSingle provides a mock function with given fields: id 289 func (_m *PostStore) GetSingle(id string) store.StoreChannel { 290 ret := _m.Called(id) 291 292 var r0 store.StoreChannel 293 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 294 r0 = rf(id) 295 } else { 296 if ret.Get(0) != nil { 297 r0 = ret.Get(0).(store.StoreChannel) 298 } 299 } 300 301 return r0 302 } 303 304 // InvalidateLastPostTimeCache provides a mock function with given fields: channelId 305 func (_m *PostStore) InvalidateLastPostTimeCache(channelId string) { 306 _m.Called(channelId) 307 } 308 309 // Overwrite provides a mock function with given fields: post 310 func (_m *PostStore) Overwrite(post *model.Post) store.StoreChannel { 311 ret := _m.Called(post) 312 313 var r0 store.StoreChannel 314 if rf, ok := ret.Get(0).(func(*model.Post) store.StoreChannel); ok { 315 r0 = rf(post) 316 } else { 317 if ret.Get(0) != nil { 318 r0 = ret.Get(0).(store.StoreChannel) 319 } 320 } 321 322 return r0 323 } 324 325 // PermanentDeleteBatch provides a mock function with given fields: endTime, limit 326 func (_m *PostStore) PermanentDeleteBatch(endTime int64, limit int64) store.StoreChannel { 327 ret := _m.Called(endTime, limit) 328 329 var r0 store.StoreChannel 330 if rf, ok := ret.Get(0).(func(int64, int64) store.StoreChannel); ok { 331 r0 = rf(endTime, limit) 332 } else { 333 if ret.Get(0) != nil { 334 r0 = ret.Get(0).(store.StoreChannel) 335 } 336 } 337 338 return r0 339 } 340 341 // PermanentDeleteByChannel provides a mock function with given fields: channelId 342 func (_m *PostStore) PermanentDeleteByChannel(channelId string) store.StoreChannel { 343 ret := _m.Called(channelId) 344 345 var r0 store.StoreChannel 346 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 347 r0 = rf(channelId) 348 } else { 349 if ret.Get(0) != nil { 350 r0 = ret.Get(0).(store.StoreChannel) 351 } 352 } 353 354 return r0 355 } 356 357 // PermanentDeleteByUser provides a mock function with given fields: userId 358 func (_m *PostStore) PermanentDeleteByUser(userId string) store.StoreChannel { 359 ret := _m.Called(userId) 360 361 var r0 store.StoreChannel 362 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 363 r0 = rf(userId) 364 } else { 365 if ret.Get(0) != nil { 366 r0 = ret.Get(0).(store.StoreChannel) 367 } 368 } 369 370 return r0 371 } 372 373 // Save provides a mock function with given fields: post 374 func (_m *PostStore) Save(post *model.Post) store.StoreChannel { 375 ret := _m.Called(post) 376 377 var r0 store.StoreChannel 378 if rf, ok := ret.Get(0).(func(*model.Post) store.StoreChannel); ok { 379 r0 = rf(post) 380 } else { 381 if ret.Get(0) != nil { 382 r0 = ret.Get(0).(store.StoreChannel) 383 } 384 } 385 386 return r0 387 } 388 389 // Search provides a mock function with given fields: teamId, userId, params 390 func (_m *PostStore) Search(teamId string, userId string, params *model.SearchParams) store.StoreChannel { 391 ret := _m.Called(teamId, userId, params) 392 393 var r0 store.StoreChannel 394 if rf, ok := ret.Get(0).(func(string, string, *model.SearchParams) store.StoreChannel); ok { 395 r0 = rf(teamId, userId, params) 396 } else { 397 if ret.Get(0) != nil { 398 r0 = ret.Get(0).(store.StoreChannel) 399 } 400 } 401 402 return r0 403 } 404 405 // Update provides a mock function with given fields: newPost, oldPost 406 func (_m *PostStore) Update(newPost *model.Post, oldPost *model.Post) store.StoreChannel { 407 ret := _m.Called(newPost, oldPost) 408 409 var r0 store.StoreChannel 410 if rf, ok := ret.Get(0).(func(*model.Post, *model.Post) store.StoreChannel); ok { 411 r0 = rf(newPost, oldPost) 412 } else { 413 if ret.Get(0) != nil { 414 r0 = ret.Get(0).(store.StoreChannel) 415 } 416 } 417 418 return r0 419 }