github.com/haalcala/mattermost-server-change-repo/v5@v5.33.2/store/storetest/mocks/PostStore.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 // Regenerate this file using `make store-mocks`. 4 5 package mocks 6 7 import ( 8 model "github.com/mattermost/mattermost-server/v5/model" 9 mock "github.com/stretchr/testify/mock" 10 ) 11 12 // PostStore is an autogenerated mock type for the PostStore type 13 type PostStore struct { 14 mock.Mock 15 } 16 17 // AnalyticsPostCount provides a mock function with given fields: teamId, mustHaveFile, mustHaveHashtag 18 func (_m *PostStore) AnalyticsPostCount(teamId string, mustHaveFile bool, mustHaveHashtag bool) (int64, error) { 19 ret := _m.Called(teamId, mustHaveFile, mustHaveHashtag) 20 21 var r0 int64 22 if rf, ok := ret.Get(0).(func(string, bool, bool) int64); ok { 23 r0 = rf(teamId, mustHaveFile, mustHaveHashtag) 24 } else { 25 r0 = ret.Get(0).(int64) 26 } 27 28 var r1 error 29 if rf, ok := ret.Get(1).(func(string, bool, bool) error); ok { 30 r1 = rf(teamId, mustHaveFile, mustHaveHashtag) 31 } else { 32 r1 = ret.Error(1) 33 } 34 35 return r0, r1 36 } 37 38 // AnalyticsPostCountsByDay provides a mock function with given fields: options 39 func (_m *PostStore) AnalyticsPostCountsByDay(options *model.AnalyticsPostCountsOptions) (model.AnalyticsRows, error) { 40 ret := _m.Called(options) 41 42 var r0 model.AnalyticsRows 43 if rf, ok := ret.Get(0).(func(*model.AnalyticsPostCountsOptions) model.AnalyticsRows); ok { 44 r0 = rf(options) 45 } else { 46 if ret.Get(0) != nil { 47 r0 = ret.Get(0).(model.AnalyticsRows) 48 } 49 } 50 51 var r1 error 52 if rf, ok := ret.Get(1).(func(*model.AnalyticsPostCountsOptions) error); ok { 53 r1 = rf(options) 54 } else { 55 r1 = ret.Error(1) 56 } 57 58 return r0, r1 59 } 60 61 // AnalyticsUserCountsWithPostsByDay provides a mock function with given fields: teamId 62 func (_m *PostStore) AnalyticsUserCountsWithPostsByDay(teamId string) (model.AnalyticsRows, error) { 63 ret := _m.Called(teamId) 64 65 var r0 model.AnalyticsRows 66 if rf, ok := ret.Get(0).(func(string) model.AnalyticsRows); ok { 67 r0 = rf(teamId) 68 } else { 69 if ret.Get(0) != nil { 70 r0 = ret.Get(0).(model.AnalyticsRows) 71 } 72 } 73 74 var r1 error 75 if rf, ok := ret.Get(1).(func(string) error); ok { 76 r1 = rf(teamId) 77 } else { 78 r1 = ret.Error(1) 79 } 80 81 return r0, r1 82 } 83 84 // ClearCaches provides a mock function with given fields: 85 func (_m *PostStore) ClearCaches() { 86 _m.Called() 87 } 88 89 // Delete provides a mock function with given fields: postId, time, deleteByID 90 func (_m *PostStore) Delete(postId string, time int64, deleteByID string) error { 91 ret := _m.Called(postId, time, deleteByID) 92 93 var r0 error 94 if rf, ok := ret.Get(0).(func(string, int64, string) error); ok { 95 r0 = rf(postId, time, deleteByID) 96 } else { 97 r0 = ret.Error(0) 98 } 99 100 return r0 101 } 102 103 // Get provides a mock function with given fields: id, skipFetchThreads, collapsedThreads, collapsedThreadsExtended 104 func (_m *PostStore) Get(id string, skipFetchThreads bool, collapsedThreads bool, collapsedThreadsExtended bool) (*model.PostList, error) { 105 ret := _m.Called(id, skipFetchThreads, collapsedThreads, collapsedThreadsExtended) 106 107 var r0 *model.PostList 108 if rf, ok := ret.Get(0).(func(string, bool, bool, bool) *model.PostList); ok { 109 r0 = rf(id, skipFetchThreads, collapsedThreads, collapsedThreadsExtended) 110 } else { 111 if ret.Get(0) != nil { 112 r0 = ret.Get(0).(*model.PostList) 113 } 114 } 115 116 var r1 error 117 if rf, ok := ret.Get(1).(func(string, bool, bool, bool) error); ok { 118 r1 = rf(id, skipFetchThreads, collapsedThreads, collapsedThreadsExtended) 119 } else { 120 r1 = ret.Error(1) 121 } 122 123 return r0, r1 124 } 125 126 // GetDirectPostParentsForExportAfter provides a mock function with given fields: limit, afterId 127 func (_m *PostStore) GetDirectPostParentsForExportAfter(limit int, afterId string) ([]*model.DirectPostForExport, error) { 128 ret := _m.Called(limit, afterId) 129 130 var r0 []*model.DirectPostForExport 131 if rf, ok := ret.Get(0).(func(int, string) []*model.DirectPostForExport); ok { 132 r0 = rf(limit, afterId) 133 } else { 134 if ret.Get(0) != nil { 135 r0 = ret.Get(0).([]*model.DirectPostForExport) 136 } 137 } 138 139 var r1 error 140 if rf, ok := ret.Get(1).(func(int, string) error); ok { 141 r1 = rf(limit, afterId) 142 } else { 143 r1 = ret.Error(1) 144 } 145 146 return r0, r1 147 } 148 149 // GetEtag provides a mock function with given fields: channelId, allowFromCache, collapsedThreads 150 func (_m *PostStore) GetEtag(channelId string, allowFromCache bool, collapsedThreads bool) string { 151 ret := _m.Called(channelId, allowFromCache, collapsedThreads) 152 153 var r0 string 154 if rf, ok := ret.Get(0).(func(string, bool, bool) string); ok { 155 r0 = rf(channelId, allowFromCache, collapsedThreads) 156 } else { 157 r0 = ret.Get(0).(string) 158 } 159 160 return r0 161 } 162 163 // GetFlaggedPosts provides a mock function with given fields: userId, offset, limit 164 func (_m *PostStore) GetFlaggedPosts(userId string, offset int, limit int) (*model.PostList, error) { 165 ret := _m.Called(userId, offset, limit) 166 167 var r0 *model.PostList 168 if rf, ok := ret.Get(0).(func(string, int, int) *model.PostList); ok { 169 r0 = rf(userId, offset, limit) 170 } else { 171 if ret.Get(0) != nil { 172 r0 = ret.Get(0).(*model.PostList) 173 } 174 } 175 176 var r1 error 177 if rf, ok := ret.Get(1).(func(string, int, int) error); ok { 178 r1 = rf(userId, offset, limit) 179 } else { 180 r1 = ret.Error(1) 181 } 182 183 return r0, r1 184 } 185 186 // GetFlaggedPostsForChannel provides a mock function with given fields: userId, channelId, offset, limit 187 func (_m *PostStore) GetFlaggedPostsForChannel(userId string, channelId string, offset int, limit int) (*model.PostList, error) { 188 ret := _m.Called(userId, channelId, offset, limit) 189 190 var r0 *model.PostList 191 if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok { 192 r0 = rf(userId, channelId, offset, limit) 193 } else { 194 if ret.Get(0) != nil { 195 r0 = ret.Get(0).(*model.PostList) 196 } 197 } 198 199 var r1 error 200 if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok { 201 r1 = rf(userId, channelId, offset, limit) 202 } else { 203 r1 = ret.Error(1) 204 } 205 206 return r0, r1 207 } 208 209 // GetFlaggedPostsForTeam provides a mock function with given fields: userId, teamId, offset, limit 210 func (_m *PostStore) GetFlaggedPostsForTeam(userId string, teamId string, offset int, limit int) (*model.PostList, error) { 211 ret := _m.Called(userId, teamId, offset, limit) 212 213 var r0 *model.PostList 214 if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok { 215 r0 = rf(userId, teamId, offset, limit) 216 } else { 217 if ret.Get(0) != nil { 218 r0 = ret.Get(0).(*model.PostList) 219 } 220 } 221 222 var r1 error 223 if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok { 224 r1 = rf(userId, teamId, offset, limit) 225 } else { 226 r1 = ret.Error(1) 227 } 228 229 return r0, r1 230 } 231 232 // GetMaxPostSize provides a mock function with given fields: 233 func (_m *PostStore) GetMaxPostSize() int { 234 ret := _m.Called() 235 236 var r0 int 237 if rf, ok := ret.Get(0).(func() int); ok { 238 r0 = rf() 239 } else { 240 r0 = ret.Get(0).(int) 241 } 242 243 return r0 244 } 245 246 // GetOldest provides a mock function with given fields: 247 func (_m *PostStore) GetOldest() (*model.Post, error) { 248 ret := _m.Called() 249 250 var r0 *model.Post 251 if rf, ok := ret.Get(0).(func() *model.Post); ok { 252 r0 = rf() 253 } else { 254 if ret.Get(0) != nil { 255 r0 = ret.Get(0).(*model.Post) 256 } 257 } 258 259 var r1 error 260 if rf, ok := ret.Get(1).(func() error); ok { 261 r1 = rf() 262 } else { 263 r1 = ret.Error(1) 264 } 265 266 return r0, r1 267 } 268 269 // GetOldestEntityCreationTime provides a mock function with given fields: 270 func (_m *PostStore) GetOldestEntityCreationTime() (int64, error) { 271 ret := _m.Called() 272 273 var r0 int64 274 if rf, ok := ret.Get(0).(func() int64); ok { 275 r0 = rf() 276 } else { 277 r0 = ret.Get(0).(int64) 278 } 279 280 var r1 error 281 if rf, ok := ret.Get(1).(func() error); ok { 282 r1 = rf() 283 } else { 284 r1 = ret.Error(1) 285 } 286 287 return r0, r1 288 } 289 290 // GetParentsForExportAfter provides a mock function with given fields: limit, afterId 291 func (_m *PostStore) GetParentsForExportAfter(limit int, afterId string) ([]*model.PostForExport, error) { 292 ret := _m.Called(limit, afterId) 293 294 var r0 []*model.PostForExport 295 if rf, ok := ret.Get(0).(func(int, string) []*model.PostForExport); ok { 296 r0 = rf(limit, afterId) 297 } else { 298 if ret.Get(0) != nil { 299 r0 = ret.Get(0).([]*model.PostForExport) 300 } 301 } 302 303 var r1 error 304 if rf, ok := ret.Get(1).(func(int, string) error); ok { 305 r1 = rf(limit, afterId) 306 } else { 307 r1 = ret.Error(1) 308 } 309 310 return r0, r1 311 } 312 313 // GetPostAfterTime provides a mock function with given fields: channelId, time 314 func (_m *PostStore) GetPostAfterTime(channelId string, time int64) (*model.Post, error) { 315 ret := _m.Called(channelId, time) 316 317 var r0 *model.Post 318 if rf, ok := ret.Get(0).(func(string, int64) *model.Post); ok { 319 r0 = rf(channelId, time) 320 } else { 321 if ret.Get(0) != nil { 322 r0 = ret.Get(0).(*model.Post) 323 } 324 } 325 326 var r1 error 327 if rf, ok := ret.Get(1).(func(string, int64) error); ok { 328 r1 = rf(channelId, time) 329 } else { 330 r1 = ret.Error(1) 331 } 332 333 return r0, r1 334 } 335 336 // GetPostIdAfterTime provides a mock function with given fields: channelId, time 337 func (_m *PostStore) GetPostIdAfterTime(channelId string, time int64) (string, error) { 338 ret := _m.Called(channelId, time) 339 340 var r0 string 341 if rf, ok := ret.Get(0).(func(string, int64) string); ok { 342 r0 = rf(channelId, time) 343 } else { 344 r0 = ret.Get(0).(string) 345 } 346 347 var r1 error 348 if rf, ok := ret.Get(1).(func(string, int64) error); ok { 349 r1 = rf(channelId, time) 350 } else { 351 r1 = ret.Error(1) 352 } 353 354 return r0, r1 355 } 356 357 // GetPostIdBeforeTime provides a mock function with given fields: channelId, time 358 func (_m *PostStore) GetPostIdBeforeTime(channelId string, time int64) (string, error) { 359 ret := _m.Called(channelId, time) 360 361 var r0 string 362 if rf, ok := ret.Get(0).(func(string, int64) string); ok { 363 r0 = rf(channelId, time) 364 } else { 365 r0 = ret.Get(0).(string) 366 } 367 368 var r1 error 369 if rf, ok := ret.Get(1).(func(string, int64) error); ok { 370 r1 = rf(channelId, time) 371 } else { 372 r1 = ret.Error(1) 373 } 374 375 return r0, r1 376 } 377 378 // GetPosts provides a mock function with given fields: options, allowFromCache 379 func (_m *PostStore) GetPosts(options model.GetPostsOptions, allowFromCache bool) (*model.PostList, error) { 380 ret := _m.Called(options, allowFromCache) 381 382 var r0 *model.PostList 383 if rf, ok := ret.Get(0).(func(model.GetPostsOptions, bool) *model.PostList); ok { 384 r0 = rf(options, allowFromCache) 385 } else { 386 if ret.Get(0) != nil { 387 r0 = ret.Get(0).(*model.PostList) 388 } 389 } 390 391 var r1 error 392 if rf, ok := ret.Get(1).(func(model.GetPostsOptions, bool) error); ok { 393 r1 = rf(options, allowFromCache) 394 } else { 395 r1 = ret.Error(1) 396 } 397 398 return r0, r1 399 } 400 401 // GetPostsAfter provides a mock function with given fields: options 402 func (_m *PostStore) GetPostsAfter(options model.GetPostsOptions) (*model.PostList, error) { 403 ret := _m.Called(options) 404 405 var r0 *model.PostList 406 if rf, ok := ret.Get(0).(func(model.GetPostsOptions) *model.PostList); ok { 407 r0 = rf(options) 408 } else { 409 if ret.Get(0) != nil { 410 r0 = ret.Get(0).(*model.PostList) 411 } 412 } 413 414 var r1 error 415 if rf, ok := ret.Get(1).(func(model.GetPostsOptions) error); ok { 416 r1 = rf(options) 417 } else { 418 r1 = ret.Error(1) 419 } 420 421 return r0, r1 422 } 423 424 // GetPostsBatchForIndexing provides a mock function with given fields: startTime, endTime, limit 425 func (_m *PostStore) GetPostsBatchForIndexing(startTime int64, endTime int64, limit int) ([]*model.PostForIndexing, error) { 426 ret := _m.Called(startTime, endTime, limit) 427 428 var r0 []*model.PostForIndexing 429 if rf, ok := ret.Get(0).(func(int64, int64, int) []*model.PostForIndexing); ok { 430 r0 = rf(startTime, endTime, limit) 431 } else { 432 if ret.Get(0) != nil { 433 r0 = ret.Get(0).([]*model.PostForIndexing) 434 } 435 } 436 437 var r1 error 438 if rf, ok := ret.Get(1).(func(int64, int64, int) error); ok { 439 r1 = rf(startTime, endTime, limit) 440 } else { 441 r1 = ret.Error(1) 442 } 443 444 return r0, r1 445 } 446 447 // GetPostsBefore provides a mock function with given fields: options 448 func (_m *PostStore) GetPostsBefore(options model.GetPostsOptions) (*model.PostList, error) { 449 ret := _m.Called(options) 450 451 var r0 *model.PostList 452 if rf, ok := ret.Get(0).(func(model.GetPostsOptions) *model.PostList); ok { 453 r0 = rf(options) 454 } else { 455 if ret.Get(0) != nil { 456 r0 = ret.Get(0).(*model.PostList) 457 } 458 } 459 460 var r1 error 461 if rf, ok := ret.Get(1).(func(model.GetPostsOptions) error); ok { 462 r1 = rf(options) 463 } else { 464 r1 = ret.Error(1) 465 } 466 467 return r0, r1 468 } 469 470 // GetPostsByIds provides a mock function with given fields: postIds 471 func (_m *PostStore) GetPostsByIds(postIds []string) ([]*model.Post, error) { 472 ret := _m.Called(postIds) 473 474 var r0 []*model.Post 475 if rf, ok := ret.Get(0).(func([]string) []*model.Post); ok { 476 r0 = rf(postIds) 477 } else { 478 if ret.Get(0) != nil { 479 r0 = ret.Get(0).([]*model.Post) 480 } 481 } 482 483 var r1 error 484 if rf, ok := ret.Get(1).(func([]string) error); ok { 485 r1 = rf(postIds) 486 } else { 487 r1 = ret.Error(1) 488 } 489 490 return r0, r1 491 } 492 493 // GetPostsCreatedAt provides a mock function with given fields: channelId, time 494 func (_m *PostStore) GetPostsCreatedAt(channelId string, time int64) ([]*model.Post, error) { 495 ret := _m.Called(channelId, time) 496 497 var r0 []*model.Post 498 if rf, ok := ret.Get(0).(func(string, int64) []*model.Post); ok { 499 r0 = rf(channelId, time) 500 } else { 501 if ret.Get(0) != nil { 502 r0 = ret.Get(0).([]*model.Post) 503 } 504 } 505 506 var r1 error 507 if rf, ok := ret.Get(1).(func(string, int64) error); ok { 508 r1 = rf(channelId, time) 509 } else { 510 r1 = ret.Error(1) 511 } 512 513 return r0, r1 514 } 515 516 // GetPostsSince provides a mock function with given fields: options, allowFromCache 517 func (_m *PostStore) GetPostsSince(options model.GetPostsSinceOptions, allowFromCache bool) (*model.PostList, error) { 518 ret := _m.Called(options, allowFromCache) 519 520 var r0 *model.PostList 521 if rf, ok := ret.Get(0).(func(model.GetPostsSinceOptions, bool) *model.PostList); ok { 522 r0 = rf(options, allowFromCache) 523 } else { 524 if ret.Get(0) != nil { 525 r0 = ret.Get(0).(*model.PostList) 526 } 527 } 528 529 var r1 error 530 if rf, ok := ret.Get(1).(func(model.GetPostsSinceOptions, bool) error); ok { 531 r1 = rf(options, allowFromCache) 532 } else { 533 r1 = ret.Error(1) 534 } 535 536 return r0, r1 537 } 538 539 // GetRepliesForExport provides a mock function with given fields: parentId 540 func (_m *PostStore) GetRepliesForExport(parentId string) ([]*model.ReplyForExport, error) { 541 ret := _m.Called(parentId) 542 543 var r0 []*model.ReplyForExport 544 if rf, ok := ret.Get(0).(func(string) []*model.ReplyForExport); ok { 545 r0 = rf(parentId) 546 } else { 547 if ret.Get(0) != nil { 548 r0 = ret.Get(0).([]*model.ReplyForExport) 549 } 550 } 551 552 var r1 error 553 if rf, ok := ret.Get(1).(func(string) error); ok { 554 r1 = rf(parentId) 555 } else { 556 r1 = ret.Error(1) 557 } 558 559 return r0, r1 560 } 561 562 // GetSingle provides a mock function with given fields: id 563 func (_m *PostStore) GetSingle(id string) (*model.Post, error) { 564 ret := _m.Called(id) 565 566 var r0 *model.Post 567 if rf, ok := ret.Get(0).(func(string) *model.Post); ok { 568 r0 = rf(id) 569 } else { 570 if ret.Get(0) != nil { 571 r0 = ret.Get(0).(*model.Post) 572 } 573 } 574 575 var r1 error 576 if rf, ok := ret.Get(1).(func(string) error); ok { 577 r1 = rf(id) 578 } else { 579 r1 = ret.Error(1) 580 } 581 582 return r0, r1 583 } 584 585 // InvalidateLastPostTimeCache provides a mock function with given fields: channelId 586 func (_m *PostStore) InvalidateLastPostTimeCache(channelId string) { 587 _m.Called(channelId) 588 } 589 590 // Overwrite provides a mock function with given fields: post 591 func (_m *PostStore) Overwrite(post *model.Post) (*model.Post, error) { 592 ret := _m.Called(post) 593 594 var r0 *model.Post 595 if rf, ok := ret.Get(0).(func(*model.Post) *model.Post); ok { 596 r0 = rf(post) 597 } else { 598 if ret.Get(0) != nil { 599 r0 = ret.Get(0).(*model.Post) 600 } 601 } 602 603 var r1 error 604 if rf, ok := ret.Get(1).(func(*model.Post) error); ok { 605 r1 = rf(post) 606 } else { 607 r1 = ret.Error(1) 608 } 609 610 return r0, r1 611 } 612 613 // OverwriteMultiple provides a mock function with given fields: posts 614 func (_m *PostStore) OverwriteMultiple(posts []*model.Post) ([]*model.Post, int, error) { 615 ret := _m.Called(posts) 616 617 var r0 []*model.Post 618 if rf, ok := ret.Get(0).(func([]*model.Post) []*model.Post); ok { 619 r0 = rf(posts) 620 } else { 621 if ret.Get(0) != nil { 622 r0 = ret.Get(0).([]*model.Post) 623 } 624 } 625 626 var r1 int 627 if rf, ok := ret.Get(1).(func([]*model.Post) int); ok { 628 r1 = rf(posts) 629 } else { 630 r1 = ret.Get(1).(int) 631 } 632 633 var r2 error 634 if rf, ok := ret.Get(2).(func([]*model.Post) error); ok { 635 r2 = rf(posts) 636 } else { 637 r2 = ret.Error(2) 638 } 639 640 return r0, r1, r2 641 } 642 643 // PermanentDeleteBatch provides a mock function with given fields: endTime, limit 644 func (_m *PostStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, error) { 645 ret := _m.Called(endTime, limit) 646 647 var r0 int64 648 if rf, ok := ret.Get(0).(func(int64, int64) int64); ok { 649 r0 = rf(endTime, limit) 650 } else { 651 r0 = ret.Get(0).(int64) 652 } 653 654 var r1 error 655 if rf, ok := ret.Get(1).(func(int64, int64) error); ok { 656 r1 = rf(endTime, limit) 657 } else { 658 r1 = ret.Error(1) 659 } 660 661 return r0, r1 662 } 663 664 // PermanentDeleteByChannel provides a mock function with given fields: channelId 665 func (_m *PostStore) PermanentDeleteByChannel(channelId string) error { 666 ret := _m.Called(channelId) 667 668 var r0 error 669 if rf, ok := ret.Get(0).(func(string) error); ok { 670 r0 = rf(channelId) 671 } else { 672 r0 = ret.Error(0) 673 } 674 675 return r0 676 } 677 678 // PermanentDeleteByUser provides a mock function with given fields: userId 679 func (_m *PostStore) PermanentDeleteByUser(userId string) error { 680 ret := _m.Called(userId) 681 682 var r0 error 683 if rf, ok := ret.Get(0).(func(string) error); ok { 684 r0 = rf(userId) 685 } else { 686 r0 = ret.Error(0) 687 } 688 689 return r0 690 } 691 692 // Save provides a mock function with given fields: post 693 func (_m *PostStore) Save(post *model.Post) (*model.Post, error) { 694 ret := _m.Called(post) 695 696 var r0 *model.Post 697 if rf, ok := ret.Get(0).(func(*model.Post) *model.Post); ok { 698 r0 = rf(post) 699 } else { 700 if ret.Get(0) != nil { 701 r0 = ret.Get(0).(*model.Post) 702 } 703 } 704 705 var r1 error 706 if rf, ok := ret.Get(1).(func(*model.Post) error); ok { 707 r1 = rf(post) 708 } else { 709 r1 = ret.Error(1) 710 } 711 712 return r0, r1 713 } 714 715 // SaveMultiple provides a mock function with given fields: posts 716 func (_m *PostStore) SaveMultiple(posts []*model.Post) ([]*model.Post, int, error) { 717 ret := _m.Called(posts) 718 719 var r0 []*model.Post 720 if rf, ok := ret.Get(0).(func([]*model.Post) []*model.Post); ok { 721 r0 = rf(posts) 722 } else { 723 if ret.Get(0) != nil { 724 r0 = ret.Get(0).([]*model.Post) 725 } 726 } 727 728 var r1 int 729 if rf, ok := ret.Get(1).(func([]*model.Post) int); ok { 730 r1 = rf(posts) 731 } else { 732 r1 = ret.Get(1).(int) 733 } 734 735 var r2 error 736 if rf, ok := ret.Get(2).(func([]*model.Post) error); ok { 737 r2 = rf(posts) 738 } else { 739 r2 = ret.Error(2) 740 } 741 742 return r0, r1, r2 743 } 744 745 // Search provides a mock function with given fields: teamId, userId, params 746 func (_m *PostStore) Search(teamId string, userId string, params *model.SearchParams) (*model.PostList, error) { 747 ret := _m.Called(teamId, userId, params) 748 749 var r0 *model.PostList 750 if rf, ok := ret.Get(0).(func(string, string, *model.SearchParams) *model.PostList); ok { 751 r0 = rf(teamId, userId, params) 752 } else { 753 if ret.Get(0) != nil { 754 r0 = ret.Get(0).(*model.PostList) 755 } 756 } 757 758 var r1 error 759 if rf, ok := ret.Get(1).(func(string, string, *model.SearchParams) error); ok { 760 r1 = rf(teamId, userId, params) 761 } else { 762 r1 = ret.Error(1) 763 } 764 765 return r0, r1 766 } 767 768 // SearchPostsInTeamForUser provides a mock function with given fields: paramsList, userId, teamId, page, perPage 769 func (_m *PostStore) SearchPostsInTeamForUser(paramsList []*model.SearchParams, userId string, teamId string, page int, perPage int) (*model.PostSearchResults, error) { 770 ret := _m.Called(paramsList, userId, teamId, page, perPage) 771 772 var r0 *model.PostSearchResults 773 if rf, ok := ret.Get(0).(func([]*model.SearchParams, string, string, int, int) *model.PostSearchResults); ok { 774 r0 = rf(paramsList, userId, teamId, page, perPage) 775 } else { 776 if ret.Get(0) != nil { 777 r0 = ret.Get(0).(*model.PostSearchResults) 778 } 779 } 780 781 var r1 error 782 if rf, ok := ret.Get(1).(func([]*model.SearchParams, string, string, int, int) error); ok { 783 r1 = rf(paramsList, userId, teamId, page, perPage) 784 } else { 785 r1 = ret.Error(1) 786 } 787 788 return r0, r1 789 } 790 791 // Update provides a mock function with given fields: newPost, oldPost 792 func (_m *PostStore) Update(newPost *model.Post, oldPost *model.Post) (*model.Post, error) { 793 ret := _m.Called(newPost, oldPost) 794 795 var r0 *model.Post 796 if rf, ok := ret.Get(0).(func(*model.Post, *model.Post) *model.Post); ok { 797 r0 = rf(newPost, oldPost) 798 } else { 799 if ret.Get(0) != nil { 800 r0 = ret.Get(0).(*model.Post) 801 } 802 } 803 804 var r1 error 805 if rf, ok := ret.Get(1).(func(*model.Post, *model.Post) error); ok { 806 r1 = rf(newPost, oldPost) 807 } else { 808 r1 = ret.Error(1) 809 } 810 811 return r0, r1 812 }