github.com/haalcala/mattermost-server-change-repo/v5@v5.33.2/store/storetest/mocks/ChannelStore.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 store "github.com/mattermost/mattermost-server/v5/store" 10 mock "github.com/stretchr/testify/mock" 11 ) 12 13 // ChannelStore is an autogenerated mock type for the ChannelStore type 14 type ChannelStore struct { 15 mock.Mock 16 } 17 18 // AnalyticsDeletedTypeCount provides a mock function with given fields: teamId, channelType 19 func (_m *ChannelStore) AnalyticsDeletedTypeCount(teamId string, channelType string) (int64, error) { 20 ret := _m.Called(teamId, channelType) 21 22 var r0 int64 23 if rf, ok := ret.Get(0).(func(string, string) int64); ok { 24 r0 = rf(teamId, channelType) 25 } else { 26 r0 = ret.Get(0).(int64) 27 } 28 29 var r1 error 30 if rf, ok := ret.Get(1).(func(string, string) error); ok { 31 r1 = rf(teamId, channelType) 32 } else { 33 r1 = ret.Error(1) 34 } 35 36 return r0, r1 37 } 38 39 // AnalyticsTypeCount provides a mock function with given fields: teamId, channelType 40 func (_m *ChannelStore) AnalyticsTypeCount(teamId string, channelType string) (int64, error) { 41 ret := _m.Called(teamId, channelType) 42 43 var r0 int64 44 if rf, ok := ret.Get(0).(func(string, string) int64); ok { 45 r0 = rf(teamId, channelType) 46 } else { 47 r0 = ret.Get(0).(int64) 48 } 49 50 var r1 error 51 if rf, ok := ret.Get(1).(func(string, string) error); ok { 52 r1 = rf(teamId, channelType) 53 } else { 54 r1 = ret.Error(1) 55 } 56 57 return r0, r1 58 } 59 60 // AutocompleteInTeam provides a mock function with given fields: teamId, term, includeDeleted 61 func (_m *ChannelStore) AutocompleteInTeam(teamId string, term string, includeDeleted bool) (*model.ChannelList, error) { 62 ret := _m.Called(teamId, term, includeDeleted) 63 64 var r0 *model.ChannelList 65 if rf, ok := ret.Get(0).(func(string, string, bool) *model.ChannelList); ok { 66 r0 = rf(teamId, term, includeDeleted) 67 } else { 68 if ret.Get(0) != nil { 69 r0 = ret.Get(0).(*model.ChannelList) 70 } 71 } 72 73 var r1 error 74 if rf, ok := ret.Get(1).(func(string, string, bool) error); ok { 75 r1 = rf(teamId, term, includeDeleted) 76 } else { 77 r1 = ret.Error(1) 78 } 79 80 return r0, r1 81 } 82 83 // AutocompleteInTeamForSearch provides a mock function with given fields: teamId, userId, term, includeDeleted 84 func (_m *ChannelStore) AutocompleteInTeamForSearch(teamId string, userId string, term string, includeDeleted bool) (*model.ChannelList, error) { 85 ret := _m.Called(teamId, userId, term, includeDeleted) 86 87 var r0 *model.ChannelList 88 if rf, ok := ret.Get(0).(func(string, string, string, bool) *model.ChannelList); ok { 89 r0 = rf(teamId, userId, term, includeDeleted) 90 } else { 91 if ret.Get(0) != nil { 92 r0 = ret.Get(0).(*model.ChannelList) 93 } 94 } 95 96 var r1 error 97 if rf, ok := ret.Get(1).(func(string, string, string, bool) error); ok { 98 r1 = rf(teamId, userId, term, includeDeleted) 99 } else { 100 r1 = ret.Error(1) 101 } 102 103 return r0, r1 104 } 105 106 // ClearAllCustomRoleAssignments provides a mock function with given fields: 107 func (_m *ChannelStore) ClearAllCustomRoleAssignments() error { 108 ret := _m.Called() 109 110 var r0 error 111 if rf, ok := ret.Get(0).(func() error); ok { 112 r0 = rf() 113 } else { 114 r0 = ret.Error(0) 115 } 116 117 return r0 118 } 119 120 // ClearCaches provides a mock function with given fields: 121 func (_m *ChannelStore) ClearCaches() { 122 _m.Called() 123 } 124 125 // ClearSidebarOnTeamLeave provides a mock function with given fields: userId, teamId 126 func (_m *ChannelStore) ClearSidebarOnTeamLeave(userId string, teamId string) error { 127 ret := _m.Called(userId, teamId) 128 129 var r0 error 130 if rf, ok := ret.Get(0).(func(string, string) error); ok { 131 r0 = rf(userId, teamId) 132 } else { 133 r0 = ret.Error(0) 134 } 135 136 return r0 137 } 138 139 // CountPostsAfter provides a mock function with given fields: channelId, timestamp, userId 140 func (_m *ChannelStore) CountPostsAfter(channelId string, timestamp int64, userId string) (int, error) { 141 ret := _m.Called(channelId, timestamp, userId) 142 143 var r0 int 144 if rf, ok := ret.Get(0).(func(string, int64, string) int); ok { 145 r0 = rf(channelId, timestamp, userId) 146 } else { 147 r0 = ret.Get(0).(int) 148 } 149 150 var r1 error 151 if rf, ok := ret.Get(1).(func(string, int64, string) error); ok { 152 r1 = rf(channelId, timestamp, userId) 153 } else { 154 r1 = ret.Error(1) 155 } 156 157 return r0, r1 158 } 159 160 // CreateDirectChannel provides a mock function with given fields: userId, otherUserId 161 func (_m *ChannelStore) CreateDirectChannel(userId *model.User, otherUserId *model.User) (*model.Channel, error) { 162 ret := _m.Called(userId, otherUserId) 163 164 var r0 *model.Channel 165 if rf, ok := ret.Get(0).(func(*model.User, *model.User) *model.Channel); ok { 166 r0 = rf(userId, otherUserId) 167 } else { 168 if ret.Get(0) != nil { 169 r0 = ret.Get(0).(*model.Channel) 170 } 171 } 172 173 var r1 error 174 if rf, ok := ret.Get(1).(func(*model.User, *model.User) error); ok { 175 r1 = rf(userId, otherUserId) 176 } else { 177 r1 = ret.Error(1) 178 } 179 180 return r0, r1 181 } 182 183 // CreateInitialSidebarCategories provides a mock function with given fields: userId, teamId 184 func (_m *ChannelStore) CreateInitialSidebarCategories(userId string, teamId string) error { 185 ret := _m.Called(userId, teamId) 186 187 var r0 error 188 if rf, ok := ret.Get(0).(func(string, string) error); ok { 189 r0 = rf(userId, teamId) 190 } else { 191 r0 = ret.Error(0) 192 } 193 194 return r0 195 } 196 197 // CreateSidebarCategory provides a mock function with given fields: userId, teamId, newCategory 198 func (_m *ChannelStore) CreateSidebarCategory(userId string, teamId string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, error) { 199 ret := _m.Called(userId, teamId, newCategory) 200 201 var r0 *model.SidebarCategoryWithChannels 202 if rf, ok := ret.Get(0).(func(string, string, *model.SidebarCategoryWithChannels) *model.SidebarCategoryWithChannels); ok { 203 r0 = rf(userId, teamId, newCategory) 204 } else { 205 if ret.Get(0) != nil { 206 r0 = ret.Get(0).(*model.SidebarCategoryWithChannels) 207 } 208 } 209 210 var r1 error 211 if rf, ok := ret.Get(1).(func(string, string, *model.SidebarCategoryWithChannels) error); ok { 212 r1 = rf(userId, teamId, newCategory) 213 } else { 214 r1 = ret.Error(1) 215 } 216 217 return r0, r1 218 } 219 220 // Delete provides a mock function with given fields: channelId, time 221 func (_m *ChannelStore) Delete(channelId string, time int64) error { 222 ret := _m.Called(channelId, time) 223 224 var r0 error 225 if rf, ok := ret.Get(0).(func(string, int64) error); ok { 226 r0 = rf(channelId, time) 227 } else { 228 r0 = ret.Error(0) 229 } 230 231 return r0 232 } 233 234 // DeleteSidebarCategory provides a mock function with given fields: categoryId 235 func (_m *ChannelStore) DeleteSidebarCategory(categoryId string) error { 236 ret := _m.Called(categoryId) 237 238 var r0 error 239 if rf, ok := ret.Get(0).(func(string) error); ok { 240 r0 = rf(categoryId) 241 } else { 242 r0 = ret.Error(0) 243 } 244 245 return r0 246 } 247 248 // DeleteSidebarChannelsByPreferences provides a mock function with given fields: preferences 249 func (_m *ChannelStore) DeleteSidebarChannelsByPreferences(preferences *model.Preferences) error { 250 ret := _m.Called(preferences) 251 252 var r0 error 253 if rf, ok := ret.Get(0).(func(*model.Preferences) error); ok { 254 r0 = rf(preferences) 255 } else { 256 r0 = ret.Error(0) 257 } 258 259 return r0 260 } 261 262 // Get provides a mock function with given fields: id, allowFromCache 263 func (_m *ChannelStore) Get(id string, allowFromCache bool) (*model.Channel, error) { 264 ret := _m.Called(id, allowFromCache) 265 266 var r0 *model.Channel 267 if rf, ok := ret.Get(0).(func(string, bool) *model.Channel); ok { 268 r0 = rf(id, allowFromCache) 269 } else { 270 if ret.Get(0) != nil { 271 r0 = ret.Get(0).(*model.Channel) 272 } 273 } 274 275 var r1 error 276 if rf, ok := ret.Get(1).(func(string, bool) error); ok { 277 r1 = rf(id, allowFromCache) 278 } else { 279 r1 = ret.Error(1) 280 } 281 282 return r0, r1 283 } 284 285 // GetAll provides a mock function with given fields: teamId 286 func (_m *ChannelStore) GetAll(teamId string) ([]*model.Channel, error) { 287 ret := _m.Called(teamId) 288 289 var r0 []*model.Channel 290 if rf, ok := ret.Get(0).(func(string) []*model.Channel); ok { 291 r0 = rf(teamId) 292 } else { 293 if ret.Get(0) != nil { 294 r0 = ret.Get(0).([]*model.Channel) 295 } 296 } 297 298 var r1 error 299 if rf, ok := ret.Get(1).(func(string) error); ok { 300 r1 = rf(teamId) 301 } else { 302 r1 = ret.Error(1) 303 } 304 305 return r0, r1 306 } 307 308 // GetAllChannelMembersForUser provides a mock function with given fields: userId, allowFromCache, includeDeleted 309 func (_m *ChannelStore) GetAllChannelMembersForUser(userId string, allowFromCache bool, includeDeleted bool) (map[string]string, error) { 310 ret := _m.Called(userId, allowFromCache, includeDeleted) 311 312 var r0 map[string]string 313 if rf, ok := ret.Get(0).(func(string, bool, bool) map[string]string); ok { 314 r0 = rf(userId, allowFromCache, includeDeleted) 315 } else { 316 if ret.Get(0) != nil { 317 r0 = ret.Get(0).(map[string]string) 318 } 319 } 320 321 var r1 error 322 if rf, ok := ret.Get(1).(func(string, bool, bool) error); ok { 323 r1 = rf(userId, allowFromCache, includeDeleted) 324 } else { 325 r1 = ret.Error(1) 326 } 327 328 return r0, r1 329 } 330 331 // GetAllChannelMembersNotifyPropsForChannel provides a mock function with given fields: channelId, allowFromCache 332 func (_m *ChannelStore) GetAllChannelMembersNotifyPropsForChannel(channelId string, allowFromCache bool) (map[string]model.StringMap, error) { 333 ret := _m.Called(channelId, allowFromCache) 334 335 var r0 map[string]model.StringMap 336 if rf, ok := ret.Get(0).(func(string, bool) map[string]model.StringMap); ok { 337 r0 = rf(channelId, allowFromCache) 338 } else { 339 if ret.Get(0) != nil { 340 r0 = ret.Get(0).(map[string]model.StringMap) 341 } 342 } 343 344 var r1 error 345 if rf, ok := ret.Get(1).(func(string, bool) error); ok { 346 r1 = rf(channelId, allowFromCache) 347 } else { 348 r1 = ret.Error(1) 349 } 350 351 return r0, r1 352 } 353 354 // GetAllChannels provides a mock function with given fields: page, perPage, opts 355 func (_m *ChannelStore) GetAllChannels(page int, perPage int, opts store.ChannelSearchOpts) (*model.ChannelListWithTeamData, error) { 356 ret := _m.Called(page, perPage, opts) 357 358 var r0 *model.ChannelListWithTeamData 359 if rf, ok := ret.Get(0).(func(int, int, store.ChannelSearchOpts) *model.ChannelListWithTeamData); ok { 360 r0 = rf(page, perPage, opts) 361 } else { 362 if ret.Get(0) != nil { 363 r0 = ret.Get(0).(*model.ChannelListWithTeamData) 364 } 365 } 366 367 var r1 error 368 if rf, ok := ret.Get(1).(func(int, int, store.ChannelSearchOpts) error); ok { 369 r1 = rf(page, perPage, opts) 370 } else { 371 r1 = ret.Error(1) 372 } 373 374 return r0, r1 375 } 376 377 // GetAllChannelsCount provides a mock function with given fields: opts 378 func (_m *ChannelStore) GetAllChannelsCount(opts store.ChannelSearchOpts) (int64, error) { 379 ret := _m.Called(opts) 380 381 var r0 int64 382 if rf, ok := ret.Get(0).(func(store.ChannelSearchOpts) int64); ok { 383 r0 = rf(opts) 384 } else { 385 r0 = ret.Get(0).(int64) 386 } 387 388 var r1 error 389 if rf, ok := ret.Get(1).(func(store.ChannelSearchOpts) error); ok { 390 r1 = rf(opts) 391 } else { 392 r1 = ret.Error(1) 393 } 394 395 return r0, r1 396 } 397 398 // GetAllChannelsForExportAfter provides a mock function with given fields: limit, afterId 399 func (_m *ChannelStore) GetAllChannelsForExportAfter(limit int, afterId string) ([]*model.ChannelForExport, error) { 400 ret := _m.Called(limit, afterId) 401 402 var r0 []*model.ChannelForExport 403 if rf, ok := ret.Get(0).(func(int, string) []*model.ChannelForExport); ok { 404 r0 = rf(limit, afterId) 405 } else { 406 if ret.Get(0) != nil { 407 r0 = ret.Get(0).([]*model.ChannelForExport) 408 } 409 } 410 411 var r1 error 412 if rf, ok := ret.Get(1).(func(int, string) error); ok { 413 r1 = rf(limit, afterId) 414 } else { 415 r1 = ret.Error(1) 416 } 417 418 return r0, r1 419 } 420 421 // GetAllDirectChannelsForExportAfter provides a mock function with given fields: limit, afterId 422 func (_m *ChannelStore) GetAllDirectChannelsForExportAfter(limit int, afterId string) ([]*model.DirectChannelForExport, error) { 423 ret := _m.Called(limit, afterId) 424 425 var r0 []*model.DirectChannelForExport 426 if rf, ok := ret.Get(0).(func(int, string) []*model.DirectChannelForExport); ok { 427 r0 = rf(limit, afterId) 428 } else { 429 if ret.Get(0) != nil { 430 r0 = ret.Get(0).([]*model.DirectChannelForExport) 431 } 432 } 433 434 var r1 error 435 if rf, ok := ret.Get(1).(func(int, string) error); ok { 436 r1 = rf(limit, afterId) 437 } else { 438 r1 = ret.Error(1) 439 } 440 441 return r0, r1 442 } 443 444 // GetByName provides a mock function with given fields: team_id, name, allowFromCache 445 func (_m *ChannelStore) GetByName(team_id string, name string, allowFromCache bool) (*model.Channel, error) { 446 ret := _m.Called(team_id, name, allowFromCache) 447 448 var r0 *model.Channel 449 if rf, ok := ret.Get(0).(func(string, string, bool) *model.Channel); ok { 450 r0 = rf(team_id, name, allowFromCache) 451 } else { 452 if ret.Get(0) != nil { 453 r0 = ret.Get(0).(*model.Channel) 454 } 455 } 456 457 var r1 error 458 if rf, ok := ret.Get(1).(func(string, string, bool) error); ok { 459 r1 = rf(team_id, name, allowFromCache) 460 } else { 461 r1 = ret.Error(1) 462 } 463 464 return r0, r1 465 } 466 467 // GetByNameIncludeDeleted provides a mock function with given fields: team_id, name, allowFromCache 468 func (_m *ChannelStore) GetByNameIncludeDeleted(team_id string, name string, allowFromCache bool) (*model.Channel, error) { 469 ret := _m.Called(team_id, name, allowFromCache) 470 471 var r0 *model.Channel 472 if rf, ok := ret.Get(0).(func(string, string, bool) *model.Channel); ok { 473 r0 = rf(team_id, name, allowFromCache) 474 } else { 475 if ret.Get(0) != nil { 476 r0 = ret.Get(0).(*model.Channel) 477 } 478 } 479 480 var r1 error 481 if rf, ok := ret.Get(1).(func(string, string, bool) error); ok { 482 r1 = rf(team_id, name, allowFromCache) 483 } else { 484 r1 = ret.Error(1) 485 } 486 487 return r0, r1 488 } 489 490 // GetByNames provides a mock function with given fields: team_id, names, allowFromCache 491 func (_m *ChannelStore) GetByNames(team_id string, names []string, allowFromCache bool) ([]*model.Channel, error) { 492 ret := _m.Called(team_id, names, allowFromCache) 493 494 var r0 []*model.Channel 495 if rf, ok := ret.Get(0).(func(string, []string, bool) []*model.Channel); ok { 496 r0 = rf(team_id, names, allowFromCache) 497 } else { 498 if ret.Get(0) != nil { 499 r0 = ret.Get(0).([]*model.Channel) 500 } 501 } 502 503 var r1 error 504 if rf, ok := ret.Get(1).(func(string, []string, bool) error); ok { 505 r1 = rf(team_id, names, allowFromCache) 506 } else { 507 r1 = ret.Error(1) 508 } 509 510 return r0, r1 511 } 512 513 // GetChannelCounts provides a mock function with given fields: teamId, userId 514 func (_m *ChannelStore) GetChannelCounts(teamId string, userId string) (*model.ChannelCounts, error) { 515 ret := _m.Called(teamId, userId) 516 517 var r0 *model.ChannelCounts 518 if rf, ok := ret.Get(0).(func(string, string) *model.ChannelCounts); ok { 519 r0 = rf(teamId, userId) 520 } else { 521 if ret.Get(0) != nil { 522 r0 = ret.Get(0).(*model.ChannelCounts) 523 } 524 } 525 526 var r1 error 527 if rf, ok := ret.Get(1).(func(string, string) error); ok { 528 r1 = rf(teamId, userId) 529 } else { 530 r1 = ret.Error(1) 531 } 532 533 return r0, r1 534 } 535 536 // GetChannelMembersForExport provides a mock function with given fields: userId, teamId 537 func (_m *ChannelStore) GetChannelMembersForExport(userId string, teamId string) ([]*model.ChannelMemberForExport, error) { 538 ret := _m.Called(userId, teamId) 539 540 var r0 []*model.ChannelMemberForExport 541 if rf, ok := ret.Get(0).(func(string, string) []*model.ChannelMemberForExport); ok { 542 r0 = rf(userId, teamId) 543 } else { 544 if ret.Get(0) != nil { 545 r0 = ret.Get(0).([]*model.ChannelMemberForExport) 546 } 547 } 548 549 var r1 error 550 if rf, ok := ret.Get(1).(func(string, string) error); ok { 551 r1 = rf(userId, teamId) 552 } else { 553 r1 = ret.Error(1) 554 } 555 556 return r0, r1 557 } 558 559 // GetChannelMembersTimezones provides a mock function with given fields: channelId 560 func (_m *ChannelStore) GetChannelMembersTimezones(channelId string) ([]model.StringMap, error) { 561 ret := _m.Called(channelId) 562 563 var r0 []model.StringMap 564 if rf, ok := ret.Get(0).(func(string) []model.StringMap); ok { 565 r0 = rf(channelId) 566 } else { 567 if ret.Get(0) != nil { 568 r0 = ret.Get(0).([]model.StringMap) 569 } 570 } 571 572 var r1 error 573 if rf, ok := ret.Get(1).(func(string) error); ok { 574 r1 = rf(channelId) 575 } else { 576 r1 = ret.Error(1) 577 } 578 579 return r0, r1 580 } 581 582 // GetChannelUnread provides a mock function with given fields: channelId, userId 583 func (_m *ChannelStore) GetChannelUnread(channelId string, userId string) (*model.ChannelUnread, error) { 584 ret := _m.Called(channelId, userId) 585 586 var r0 *model.ChannelUnread 587 if rf, ok := ret.Get(0).(func(string, string) *model.ChannelUnread); ok { 588 r0 = rf(channelId, userId) 589 } else { 590 if ret.Get(0) != nil { 591 r0 = ret.Get(0).(*model.ChannelUnread) 592 } 593 } 594 595 var r1 error 596 if rf, ok := ret.Get(1).(func(string, string) error); ok { 597 r1 = rf(channelId, userId) 598 } else { 599 r1 = ret.Error(1) 600 } 601 602 return r0, r1 603 } 604 605 // GetChannels provides a mock function with given fields: teamId, userId, includeDeleted, lastDeleteAt 606 func (_m *ChannelStore) GetChannels(teamId string, userId string, includeDeleted bool, lastDeleteAt int) (*model.ChannelList, error) { 607 ret := _m.Called(teamId, userId, includeDeleted, lastDeleteAt) 608 609 var r0 *model.ChannelList 610 if rf, ok := ret.Get(0).(func(string, string, bool, int) *model.ChannelList); ok { 611 r0 = rf(teamId, userId, includeDeleted, lastDeleteAt) 612 } else { 613 if ret.Get(0) != nil { 614 r0 = ret.Get(0).(*model.ChannelList) 615 } 616 } 617 618 var r1 error 619 if rf, ok := ret.Get(1).(func(string, string, bool, int) error); ok { 620 r1 = rf(teamId, userId, includeDeleted, lastDeleteAt) 621 } else { 622 r1 = ret.Error(1) 623 } 624 625 return r0, r1 626 } 627 628 // GetChannelsBatchForIndexing provides a mock function with given fields: startTime, endTime, limit 629 func (_m *ChannelStore) GetChannelsBatchForIndexing(startTime int64, endTime int64, limit int) ([]*model.Channel, error) { 630 ret := _m.Called(startTime, endTime, limit) 631 632 var r0 []*model.Channel 633 if rf, ok := ret.Get(0).(func(int64, int64, int) []*model.Channel); ok { 634 r0 = rf(startTime, endTime, limit) 635 } else { 636 if ret.Get(0) != nil { 637 r0 = ret.Get(0).([]*model.Channel) 638 } 639 } 640 641 var r1 error 642 if rf, ok := ret.Get(1).(func(int64, int64, int) error); ok { 643 r1 = rf(startTime, endTime, limit) 644 } else { 645 r1 = ret.Error(1) 646 } 647 648 return r0, r1 649 } 650 651 // GetChannelsByIds provides a mock function with given fields: channelIds, includeDeleted 652 func (_m *ChannelStore) GetChannelsByIds(channelIds []string, includeDeleted bool) ([]*model.Channel, error) { 653 ret := _m.Called(channelIds, includeDeleted) 654 655 var r0 []*model.Channel 656 if rf, ok := ret.Get(0).(func([]string, bool) []*model.Channel); ok { 657 r0 = rf(channelIds, includeDeleted) 658 } else { 659 if ret.Get(0) != nil { 660 r0 = ret.Get(0).([]*model.Channel) 661 } 662 } 663 664 var r1 error 665 if rf, ok := ret.Get(1).(func([]string, bool) error); ok { 666 r1 = rf(channelIds, includeDeleted) 667 } else { 668 r1 = ret.Error(1) 669 } 670 671 return r0, r1 672 } 673 674 // GetChannelsByScheme provides a mock function with given fields: schemeId, offset, limit 675 func (_m *ChannelStore) GetChannelsByScheme(schemeId string, offset int, limit int) (model.ChannelList, error) { 676 ret := _m.Called(schemeId, offset, limit) 677 678 var r0 model.ChannelList 679 if rf, ok := ret.Get(0).(func(string, int, int) model.ChannelList); ok { 680 r0 = rf(schemeId, offset, limit) 681 } else { 682 if ret.Get(0) != nil { 683 r0 = ret.Get(0).(model.ChannelList) 684 } 685 } 686 687 var r1 error 688 if rf, ok := ret.Get(1).(func(string, int, int) error); ok { 689 r1 = rf(schemeId, offset, limit) 690 } else { 691 r1 = ret.Error(1) 692 } 693 694 return r0, r1 695 } 696 697 // GetDeleted provides a mock function with given fields: team_id, offset, limit, userId 698 func (_m *ChannelStore) GetDeleted(team_id string, offset int, limit int, userId string) (*model.ChannelList, error) { 699 ret := _m.Called(team_id, offset, limit, userId) 700 701 var r0 *model.ChannelList 702 if rf, ok := ret.Get(0).(func(string, int, int, string) *model.ChannelList); ok { 703 r0 = rf(team_id, offset, limit, userId) 704 } else { 705 if ret.Get(0) != nil { 706 r0 = ret.Get(0).(*model.ChannelList) 707 } 708 } 709 710 var r1 error 711 if rf, ok := ret.Get(1).(func(string, int, int, string) error); ok { 712 r1 = rf(team_id, offset, limit, userId) 713 } else { 714 r1 = ret.Error(1) 715 } 716 717 return r0, r1 718 } 719 720 // GetDeletedByName provides a mock function with given fields: team_id, name 721 func (_m *ChannelStore) GetDeletedByName(team_id string, name string) (*model.Channel, error) { 722 ret := _m.Called(team_id, name) 723 724 var r0 *model.Channel 725 if rf, ok := ret.Get(0).(func(string, string) *model.Channel); ok { 726 r0 = rf(team_id, name) 727 } else { 728 if ret.Get(0) != nil { 729 r0 = ret.Get(0).(*model.Channel) 730 } 731 } 732 733 var r1 error 734 if rf, ok := ret.Get(1).(func(string, string) error); ok { 735 r1 = rf(team_id, name) 736 } else { 737 r1 = ret.Error(1) 738 } 739 740 return r0, r1 741 } 742 743 // GetForPost provides a mock function with given fields: postId 744 func (_m *ChannelStore) GetForPost(postId string) (*model.Channel, error) { 745 ret := _m.Called(postId) 746 747 var r0 *model.Channel 748 if rf, ok := ret.Get(0).(func(string) *model.Channel); ok { 749 r0 = rf(postId) 750 } else { 751 if ret.Get(0) != nil { 752 r0 = ret.Get(0).(*model.Channel) 753 } 754 } 755 756 var r1 error 757 if rf, ok := ret.Get(1).(func(string) error); ok { 758 r1 = rf(postId) 759 } else { 760 r1 = ret.Error(1) 761 } 762 763 return r0, r1 764 } 765 766 // GetFromMaster provides a mock function with given fields: id 767 func (_m *ChannelStore) GetFromMaster(id string) (*model.Channel, error) { 768 ret := _m.Called(id) 769 770 var r0 *model.Channel 771 if rf, ok := ret.Get(0).(func(string) *model.Channel); ok { 772 r0 = rf(id) 773 } else { 774 if ret.Get(0) != nil { 775 r0 = ret.Get(0).(*model.Channel) 776 } 777 } 778 779 var r1 error 780 if rf, ok := ret.Get(1).(func(string) error); ok { 781 r1 = rf(id) 782 } else { 783 r1 = ret.Error(1) 784 } 785 786 return r0, r1 787 } 788 789 // GetGuestCount provides a mock function with given fields: channelId, allowFromCache 790 func (_m *ChannelStore) GetGuestCount(channelId string, allowFromCache bool) (int64, error) { 791 ret := _m.Called(channelId, allowFromCache) 792 793 var r0 int64 794 if rf, ok := ret.Get(0).(func(string, bool) int64); ok { 795 r0 = rf(channelId, allowFromCache) 796 } else { 797 r0 = ret.Get(0).(int64) 798 } 799 800 var r1 error 801 if rf, ok := ret.Get(1).(func(string, bool) error); ok { 802 r1 = rf(channelId, allowFromCache) 803 } else { 804 r1 = ret.Error(1) 805 } 806 807 return r0, r1 808 } 809 810 // GetMember provides a mock function with given fields: channelId, userId 811 func (_m *ChannelStore) GetMember(channelId string, userId string) (*model.ChannelMember, error) { 812 ret := _m.Called(channelId, userId) 813 814 var r0 *model.ChannelMember 815 if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMember); ok { 816 r0 = rf(channelId, userId) 817 } else { 818 if ret.Get(0) != nil { 819 r0 = ret.Get(0).(*model.ChannelMember) 820 } 821 } 822 823 var r1 error 824 if rf, ok := ret.Get(1).(func(string, string) error); ok { 825 r1 = rf(channelId, userId) 826 } else { 827 r1 = ret.Error(1) 828 } 829 830 return r0, r1 831 } 832 833 // GetMemberCount provides a mock function with given fields: channelId, allowFromCache 834 func (_m *ChannelStore) GetMemberCount(channelId string, allowFromCache bool) (int64, error) { 835 ret := _m.Called(channelId, allowFromCache) 836 837 var r0 int64 838 if rf, ok := ret.Get(0).(func(string, bool) int64); ok { 839 r0 = rf(channelId, allowFromCache) 840 } else { 841 r0 = ret.Get(0).(int64) 842 } 843 844 var r1 error 845 if rf, ok := ret.Get(1).(func(string, bool) error); ok { 846 r1 = rf(channelId, allowFromCache) 847 } else { 848 r1 = ret.Error(1) 849 } 850 851 return r0, r1 852 } 853 854 // GetMemberCountFromCache provides a mock function with given fields: channelId 855 func (_m *ChannelStore) GetMemberCountFromCache(channelId string) int64 { 856 ret := _m.Called(channelId) 857 858 var r0 int64 859 if rf, ok := ret.Get(0).(func(string) int64); ok { 860 r0 = rf(channelId) 861 } else { 862 r0 = ret.Get(0).(int64) 863 } 864 865 return r0 866 } 867 868 // GetMemberCountsByGroup provides a mock function with given fields: channelID, includeTimezones 869 func (_m *ChannelStore) GetMemberCountsByGroup(channelID string, includeTimezones bool) ([]*model.ChannelMemberCountByGroup, error) { 870 ret := _m.Called(channelID, includeTimezones) 871 872 var r0 []*model.ChannelMemberCountByGroup 873 if rf, ok := ret.Get(0).(func(string, bool) []*model.ChannelMemberCountByGroup); ok { 874 r0 = rf(channelID, includeTimezones) 875 } else { 876 if ret.Get(0) != nil { 877 r0 = ret.Get(0).([]*model.ChannelMemberCountByGroup) 878 } 879 } 880 881 var r1 error 882 if rf, ok := ret.Get(1).(func(string, bool) error); ok { 883 r1 = rf(channelID, includeTimezones) 884 } else { 885 r1 = ret.Error(1) 886 } 887 888 return r0, r1 889 } 890 891 // GetMemberForPost provides a mock function with given fields: postId, userId 892 func (_m *ChannelStore) GetMemberForPost(postId string, userId string) (*model.ChannelMember, error) { 893 ret := _m.Called(postId, userId) 894 895 var r0 *model.ChannelMember 896 if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMember); ok { 897 r0 = rf(postId, userId) 898 } else { 899 if ret.Get(0) != nil { 900 r0 = ret.Get(0).(*model.ChannelMember) 901 } 902 } 903 904 var r1 error 905 if rf, ok := ret.Get(1).(func(string, string) error); ok { 906 r1 = rf(postId, userId) 907 } else { 908 r1 = ret.Error(1) 909 } 910 911 return r0, r1 912 } 913 914 // GetMembers provides a mock function with given fields: channelId, offset, limit 915 func (_m *ChannelStore) GetMembers(channelId string, offset int, limit int) (*model.ChannelMembers, error) { 916 ret := _m.Called(channelId, offset, limit) 917 918 var r0 *model.ChannelMembers 919 if rf, ok := ret.Get(0).(func(string, int, int) *model.ChannelMembers); ok { 920 r0 = rf(channelId, offset, limit) 921 } else { 922 if ret.Get(0) != nil { 923 r0 = ret.Get(0).(*model.ChannelMembers) 924 } 925 } 926 927 var r1 error 928 if rf, ok := ret.Get(1).(func(string, int, int) error); ok { 929 r1 = rf(channelId, offset, limit) 930 } else { 931 r1 = ret.Error(1) 932 } 933 934 return r0, r1 935 } 936 937 // GetMembersByChannelIds provides a mock function with given fields: channelIds, userId 938 func (_m *ChannelStore) GetMembersByChannelIds(channelIds []string, userId string) (*model.ChannelMembers, error) { 939 ret := _m.Called(channelIds, userId) 940 941 var r0 *model.ChannelMembers 942 if rf, ok := ret.Get(0).(func([]string, string) *model.ChannelMembers); ok { 943 r0 = rf(channelIds, userId) 944 } else { 945 if ret.Get(0) != nil { 946 r0 = ret.Get(0).(*model.ChannelMembers) 947 } 948 } 949 950 var r1 error 951 if rf, ok := ret.Get(1).(func([]string, string) error); ok { 952 r1 = rf(channelIds, userId) 953 } else { 954 r1 = ret.Error(1) 955 } 956 957 return r0, r1 958 } 959 960 // GetMembersByIds provides a mock function with given fields: channelId, userIds 961 func (_m *ChannelStore) GetMembersByIds(channelId string, userIds []string) (*model.ChannelMembers, error) { 962 ret := _m.Called(channelId, userIds) 963 964 var r0 *model.ChannelMembers 965 if rf, ok := ret.Get(0).(func(string, []string) *model.ChannelMembers); ok { 966 r0 = rf(channelId, userIds) 967 } else { 968 if ret.Get(0) != nil { 969 r0 = ret.Get(0).(*model.ChannelMembers) 970 } 971 } 972 973 var r1 error 974 if rf, ok := ret.Get(1).(func(string, []string) error); ok { 975 r1 = rf(channelId, userIds) 976 } else { 977 r1 = ret.Error(1) 978 } 979 980 return r0, r1 981 } 982 983 // GetMembersForUser provides a mock function with given fields: teamId, userId 984 func (_m *ChannelStore) GetMembersForUser(teamId string, userId string) (*model.ChannelMembers, error) { 985 ret := _m.Called(teamId, userId) 986 987 var r0 *model.ChannelMembers 988 if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMembers); ok { 989 r0 = rf(teamId, userId) 990 } else { 991 if ret.Get(0) != nil { 992 r0 = ret.Get(0).(*model.ChannelMembers) 993 } 994 } 995 996 var r1 error 997 if rf, ok := ret.Get(1).(func(string, string) error); ok { 998 r1 = rf(teamId, userId) 999 } else { 1000 r1 = ret.Error(1) 1001 } 1002 1003 return r0, r1 1004 } 1005 1006 // GetMembersForUserWithPagination provides a mock function with given fields: teamId, userId, page, perPage 1007 func (_m *ChannelStore) GetMembersForUserWithPagination(teamId string, userId string, page int, perPage int) (*model.ChannelMembers, error) { 1008 ret := _m.Called(teamId, userId, page, perPage) 1009 1010 var r0 *model.ChannelMembers 1011 if rf, ok := ret.Get(0).(func(string, string, int, int) *model.ChannelMembers); ok { 1012 r0 = rf(teamId, userId, page, perPage) 1013 } else { 1014 if ret.Get(0) != nil { 1015 r0 = ret.Get(0).(*model.ChannelMembers) 1016 } 1017 } 1018 1019 var r1 error 1020 if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok { 1021 r1 = rf(teamId, userId, page, perPage) 1022 } else { 1023 r1 = ret.Error(1) 1024 } 1025 1026 return r0, r1 1027 } 1028 1029 // GetMoreChannels provides a mock function with given fields: teamId, userId, offset, limit 1030 func (_m *ChannelStore) GetMoreChannels(teamId string, userId string, offset int, limit int) (*model.ChannelList, error) { 1031 ret := _m.Called(teamId, userId, offset, limit) 1032 1033 var r0 *model.ChannelList 1034 if rf, ok := ret.Get(0).(func(string, string, int, int) *model.ChannelList); ok { 1035 r0 = rf(teamId, userId, offset, limit) 1036 } else { 1037 if ret.Get(0) != nil { 1038 r0 = ret.Get(0).(*model.ChannelList) 1039 } 1040 } 1041 1042 var r1 error 1043 if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok { 1044 r1 = rf(teamId, userId, offset, limit) 1045 } else { 1046 r1 = ret.Error(1) 1047 } 1048 1049 return r0, r1 1050 } 1051 1052 // GetPinnedPostCount provides a mock function with given fields: channelId, allowFromCache 1053 func (_m *ChannelStore) GetPinnedPostCount(channelId string, allowFromCache bool) (int64, error) { 1054 ret := _m.Called(channelId, allowFromCache) 1055 1056 var r0 int64 1057 if rf, ok := ret.Get(0).(func(string, bool) int64); ok { 1058 r0 = rf(channelId, allowFromCache) 1059 } else { 1060 r0 = ret.Get(0).(int64) 1061 } 1062 1063 var r1 error 1064 if rf, ok := ret.Get(1).(func(string, bool) error); ok { 1065 r1 = rf(channelId, allowFromCache) 1066 } else { 1067 r1 = ret.Error(1) 1068 } 1069 1070 return r0, r1 1071 } 1072 1073 // GetPinnedPosts provides a mock function with given fields: channelId 1074 func (_m *ChannelStore) GetPinnedPosts(channelId string) (*model.PostList, error) { 1075 ret := _m.Called(channelId) 1076 1077 var r0 *model.PostList 1078 if rf, ok := ret.Get(0).(func(string) *model.PostList); ok { 1079 r0 = rf(channelId) 1080 } else { 1081 if ret.Get(0) != nil { 1082 r0 = ret.Get(0).(*model.PostList) 1083 } 1084 } 1085 1086 var r1 error 1087 if rf, ok := ret.Get(1).(func(string) error); ok { 1088 r1 = rf(channelId) 1089 } else { 1090 r1 = ret.Error(1) 1091 } 1092 1093 return r0, r1 1094 } 1095 1096 // GetPrivateChannelsForTeam provides a mock function with given fields: teamId, offset, limit 1097 func (_m *ChannelStore) GetPrivateChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, error) { 1098 ret := _m.Called(teamId, offset, limit) 1099 1100 var r0 *model.ChannelList 1101 if rf, ok := ret.Get(0).(func(string, int, int) *model.ChannelList); ok { 1102 r0 = rf(teamId, offset, limit) 1103 } else { 1104 if ret.Get(0) != nil { 1105 r0 = ret.Get(0).(*model.ChannelList) 1106 } 1107 } 1108 1109 var r1 error 1110 if rf, ok := ret.Get(1).(func(string, int, int) error); ok { 1111 r1 = rf(teamId, offset, limit) 1112 } else { 1113 r1 = ret.Error(1) 1114 } 1115 1116 return r0, r1 1117 } 1118 1119 // GetPublicChannelsByIdsForTeam provides a mock function with given fields: teamId, channelIds 1120 func (_m *ChannelStore) GetPublicChannelsByIdsForTeam(teamId string, channelIds []string) (*model.ChannelList, error) { 1121 ret := _m.Called(teamId, channelIds) 1122 1123 var r0 *model.ChannelList 1124 if rf, ok := ret.Get(0).(func(string, []string) *model.ChannelList); ok { 1125 r0 = rf(teamId, channelIds) 1126 } else { 1127 if ret.Get(0) != nil { 1128 r0 = ret.Get(0).(*model.ChannelList) 1129 } 1130 } 1131 1132 var r1 error 1133 if rf, ok := ret.Get(1).(func(string, []string) error); ok { 1134 r1 = rf(teamId, channelIds) 1135 } else { 1136 r1 = ret.Error(1) 1137 } 1138 1139 return r0, r1 1140 } 1141 1142 // GetPublicChannelsForTeam provides a mock function with given fields: teamId, offset, limit 1143 func (_m *ChannelStore) GetPublicChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, error) { 1144 ret := _m.Called(teamId, offset, limit) 1145 1146 var r0 *model.ChannelList 1147 if rf, ok := ret.Get(0).(func(string, int, int) *model.ChannelList); ok { 1148 r0 = rf(teamId, offset, limit) 1149 } else { 1150 if ret.Get(0) != nil { 1151 r0 = ret.Get(0).(*model.ChannelList) 1152 } 1153 } 1154 1155 var r1 error 1156 if rf, ok := ret.Get(1).(func(string, int, int) error); ok { 1157 r1 = rf(teamId, offset, limit) 1158 } else { 1159 r1 = ret.Error(1) 1160 } 1161 1162 return r0, r1 1163 } 1164 1165 // GetSidebarCategories provides a mock function with given fields: userId, teamId 1166 func (_m *ChannelStore) GetSidebarCategories(userId string, teamId string) (*model.OrderedSidebarCategories, error) { 1167 ret := _m.Called(userId, teamId) 1168 1169 var r0 *model.OrderedSidebarCategories 1170 if rf, ok := ret.Get(0).(func(string, string) *model.OrderedSidebarCategories); ok { 1171 r0 = rf(userId, teamId) 1172 } else { 1173 if ret.Get(0) != nil { 1174 r0 = ret.Get(0).(*model.OrderedSidebarCategories) 1175 } 1176 } 1177 1178 var r1 error 1179 if rf, ok := ret.Get(1).(func(string, string) error); ok { 1180 r1 = rf(userId, teamId) 1181 } else { 1182 r1 = ret.Error(1) 1183 } 1184 1185 return r0, r1 1186 } 1187 1188 // GetSidebarCategory provides a mock function with given fields: categoryId 1189 func (_m *ChannelStore) GetSidebarCategory(categoryId string) (*model.SidebarCategoryWithChannels, error) { 1190 ret := _m.Called(categoryId) 1191 1192 var r0 *model.SidebarCategoryWithChannels 1193 if rf, ok := ret.Get(0).(func(string) *model.SidebarCategoryWithChannels); ok { 1194 r0 = rf(categoryId) 1195 } else { 1196 if ret.Get(0) != nil { 1197 r0 = ret.Get(0).(*model.SidebarCategoryWithChannels) 1198 } 1199 } 1200 1201 var r1 error 1202 if rf, ok := ret.Get(1).(func(string) error); ok { 1203 r1 = rf(categoryId) 1204 } else { 1205 r1 = ret.Error(1) 1206 } 1207 1208 return r0, r1 1209 } 1210 1211 // GetSidebarCategoryOrder provides a mock function with given fields: userId, teamId 1212 func (_m *ChannelStore) GetSidebarCategoryOrder(userId string, teamId string) ([]string, error) { 1213 ret := _m.Called(userId, teamId) 1214 1215 var r0 []string 1216 if rf, ok := ret.Get(0).(func(string, string) []string); ok { 1217 r0 = rf(userId, teamId) 1218 } else { 1219 if ret.Get(0) != nil { 1220 r0 = ret.Get(0).([]string) 1221 } 1222 } 1223 1224 var r1 error 1225 if rf, ok := ret.Get(1).(func(string, string) error); ok { 1226 r1 = rf(userId, teamId) 1227 } else { 1228 r1 = ret.Error(1) 1229 } 1230 1231 return r0, r1 1232 } 1233 1234 // GetTeamChannels provides a mock function with given fields: teamId 1235 func (_m *ChannelStore) GetTeamChannels(teamId string) (*model.ChannelList, error) { 1236 ret := _m.Called(teamId) 1237 1238 var r0 *model.ChannelList 1239 if rf, ok := ret.Get(0).(func(string) *model.ChannelList); ok { 1240 r0 = rf(teamId) 1241 } else { 1242 if ret.Get(0) != nil { 1243 r0 = ret.Get(0).(*model.ChannelList) 1244 } 1245 } 1246 1247 var r1 error 1248 if rf, ok := ret.Get(1).(func(string) error); ok { 1249 r1 = rf(teamId) 1250 } else { 1251 r1 = ret.Error(1) 1252 } 1253 1254 return r0, r1 1255 } 1256 1257 // GroupSyncedChannelCount provides a mock function with given fields: 1258 func (_m *ChannelStore) GroupSyncedChannelCount() (int64, error) { 1259 ret := _m.Called() 1260 1261 var r0 int64 1262 if rf, ok := ret.Get(0).(func() int64); ok { 1263 r0 = rf() 1264 } else { 1265 r0 = ret.Get(0).(int64) 1266 } 1267 1268 var r1 error 1269 if rf, ok := ret.Get(1).(func() error); ok { 1270 r1 = rf() 1271 } else { 1272 r1 = ret.Error(1) 1273 } 1274 1275 return r0, r1 1276 } 1277 1278 // IncrementMentionCount provides a mock function with given fields: channelId, userId, updateThreads 1279 func (_m *ChannelStore) IncrementMentionCount(channelId string, userId string, updateThreads bool) error { 1280 ret := _m.Called(channelId, userId, updateThreads) 1281 1282 var r0 error 1283 if rf, ok := ret.Get(0).(func(string, string, bool) error); ok { 1284 r0 = rf(channelId, userId, updateThreads) 1285 } else { 1286 r0 = ret.Error(0) 1287 } 1288 1289 return r0 1290 } 1291 1292 // InvalidateAllChannelMembersForUser provides a mock function with given fields: userId 1293 func (_m *ChannelStore) InvalidateAllChannelMembersForUser(userId string) { 1294 _m.Called(userId) 1295 } 1296 1297 // InvalidateCacheForChannelMembersNotifyProps provides a mock function with given fields: channelId 1298 func (_m *ChannelStore) InvalidateCacheForChannelMembersNotifyProps(channelId string) { 1299 _m.Called(channelId) 1300 } 1301 1302 // InvalidateChannel provides a mock function with given fields: id 1303 func (_m *ChannelStore) InvalidateChannel(id string) { 1304 _m.Called(id) 1305 } 1306 1307 // InvalidateChannelByName provides a mock function with given fields: teamId, name 1308 func (_m *ChannelStore) InvalidateChannelByName(teamId string, name string) { 1309 _m.Called(teamId, name) 1310 } 1311 1312 // InvalidateGuestCount provides a mock function with given fields: channelId 1313 func (_m *ChannelStore) InvalidateGuestCount(channelId string) { 1314 _m.Called(channelId) 1315 } 1316 1317 // InvalidateMemberCount provides a mock function with given fields: channelId 1318 func (_m *ChannelStore) InvalidateMemberCount(channelId string) { 1319 _m.Called(channelId) 1320 } 1321 1322 // InvalidatePinnedPostCount provides a mock function with given fields: channelId 1323 func (_m *ChannelStore) InvalidatePinnedPostCount(channelId string) { 1324 _m.Called(channelId) 1325 } 1326 1327 // IsUserInChannelUseCache provides a mock function with given fields: userId, channelId 1328 func (_m *ChannelStore) IsUserInChannelUseCache(userId string, channelId string) bool { 1329 ret := _m.Called(userId, channelId) 1330 1331 var r0 bool 1332 if rf, ok := ret.Get(0).(func(string, string) bool); ok { 1333 r0 = rf(userId, channelId) 1334 } else { 1335 r0 = ret.Get(0).(bool) 1336 } 1337 1338 return r0 1339 } 1340 1341 // MigrateChannelMembers provides a mock function with given fields: fromChannelId, fromUserId 1342 func (_m *ChannelStore) MigrateChannelMembers(fromChannelId string, fromUserId string) (map[string]string, error) { 1343 ret := _m.Called(fromChannelId, fromUserId) 1344 1345 var r0 map[string]string 1346 if rf, ok := ret.Get(0).(func(string, string) map[string]string); ok { 1347 r0 = rf(fromChannelId, fromUserId) 1348 } else { 1349 if ret.Get(0) != nil { 1350 r0 = ret.Get(0).(map[string]string) 1351 } 1352 } 1353 1354 var r1 error 1355 if rf, ok := ret.Get(1).(func(string, string) error); ok { 1356 r1 = rf(fromChannelId, fromUserId) 1357 } else { 1358 r1 = ret.Error(1) 1359 } 1360 1361 return r0, r1 1362 } 1363 1364 // MigratePublicChannels provides a mock function with given fields: 1365 func (_m *ChannelStore) MigratePublicChannels() error { 1366 ret := _m.Called() 1367 1368 var r0 error 1369 if rf, ok := ret.Get(0).(func() error); ok { 1370 r0 = rf() 1371 } else { 1372 r0 = ret.Error(0) 1373 } 1374 1375 return r0 1376 } 1377 1378 // PermanentDelete provides a mock function with given fields: channelId 1379 func (_m *ChannelStore) PermanentDelete(channelId string) error { 1380 ret := _m.Called(channelId) 1381 1382 var r0 error 1383 if rf, ok := ret.Get(0).(func(string) error); ok { 1384 r0 = rf(channelId) 1385 } else { 1386 r0 = ret.Error(0) 1387 } 1388 1389 return r0 1390 } 1391 1392 // PermanentDeleteByTeam provides a mock function with given fields: teamId 1393 func (_m *ChannelStore) PermanentDeleteByTeam(teamId string) error { 1394 ret := _m.Called(teamId) 1395 1396 var r0 error 1397 if rf, ok := ret.Get(0).(func(string) error); ok { 1398 r0 = rf(teamId) 1399 } else { 1400 r0 = ret.Error(0) 1401 } 1402 1403 return r0 1404 } 1405 1406 // PermanentDeleteMembersByChannel provides a mock function with given fields: channelId 1407 func (_m *ChannelStore) PermanentDeleteMembersByChannel(channelId string) error { 1408 ret := _m.Called(channelId) 1409 1410 var r0 error 1411 if rf, ok := ret.Get(0).(func(string) error); ok { 1412 r0 = rf(channelId) 1413 } else { 1414 r0 = ret.Error(0) 1415 } 1416 1417 return r0 1418 } 1419 1420 // PermanentDeleteMembersByUser provides a mock function with given fields: userId 1421 func (_m *ChannelStore) PermanentDeleteMembersByUser(userId string) error { 1422 ret := _m.Called(userId) 1423 1424 var r0 error 1425 if rf, ok := ret.Get(0).(func(string) error); ok { 1426 r0 = rf(userId) 1427 } else { 1428 r0 = ret.Error(0) 1429 } 1430 1431 return r0 1432 } 1433 1434 // RemoveAllDeactivatedMembers provides a mock function with given fields: channelId 1435 func (_m *ChannelStore) RemoveAllDeactivatedMembers(channelId string) error { 1436 ret := _m.Called(channelId) 1437 1438 var r0 error 1439 if rf, ok := ret.Get(0).(func(string) error); ok { 1440 r0 = rf(channelId) 1441 } else { 1442 r0 = ret.Error(0) 1443 } 1444 1445 return r0 1446 } 1447 1448 // RemoveMember provides a mock function with given fields: channelId, userId 1449 func (_m *ChannelStore) RemoveMember(channelId string, userId string) error { 1450 ret := _m.Called(channelId, userId) 1451 1452 var r0 error 1453 if rf, ok := ret.Get(0).(func(string, string) error); ok { 1454 r0 = rf(channelId, userId) 1455 } else { 1456 r0 = ret.Error(0) 1457 } 1458 1459 return r0 1460 } 1461 1462 // RemoveMembers provides a mock function with given fields: channelId, userIds 1463 func (_m *ChannelStore) RemoveMembers(channelId string, userIds []string) error { 1464 ret := _m.Called(channelId, userIds) 1465 1466 var r0 error 1467 if rf, ok := ret.Get(0).(func(string, []string) error); ok { 1468 r0 = rf(channelId, userIds) 1469 } else { 1470 r0 = ret.Error(0) 1471 } 1472 1473 return r0 1474 } 1475 1476 // ResetAllChannelSchemes provides a mock function with given fields: 1477 func (_m *ChannelStore) ResetAllChannelSchemes() error { 1478 ret := _m.Called() 1479 1480 var r0 error 1481 if rf, ok := ret.Get(0).(func() error); ok { 1482 r0 = rf() 1483 } else { 1484 r0 = ret.Error(0) 1485 } 1486 1487 return r0 1488 } 1489 1490 // Restore provides a mock function with given fields: channelId, time 1491 func (_m *ChannelStore) Restore(channelId string, time int64) error { 1492 ret := _m.Called(channelId, time) 1493 1494 var r0 error 1495 if rf, ok := ret.Get(0).(func(string, int64) error); ok { 1496 r0 = rf(channelId, time) 1497 } else { 1498 r0 = ret.Error(0) 1499 } 1500 1501 return r0 1502 } 1503 1504 // Save provides a mock function with given fields: channel, maxChannelsPerTeam 1505 func (_m *ChannelStore) Save(channel *model.Channel, maxChannelsPerTeam int64) (*model.Channel, error) { 1506 ret := _m.Called(channel, maxChannelsPerTeam) 1507 1508 var r0 *model.Channel 1509 if rf, ok := ret.Get(0).(func(*model.Channel, int64) *model.Channel); ok { 1510 r0 = rf(channel, maxChannelsPerTeam) 1511 } else { 1512 if ret.Get(0) != nil { 1513 r0 = ret.Get(0).(*model.Channel) 1514 } 1515 } 1516 1517 var r1 error 1518 if rf, ok := ret.Get(1).(func(*model.Channel, int64) error); ok { 1519 r1 = rf(channel, maxChannelsPerTeam) 1520 } else { 1521 r1 = ret.Error(1) 1522 } 1523 1524 return r0, r1 1525 } 1526 1527 // SaveDirectChannel provides a mock function with given fields: channel, member1, member2 1528 func (_m *ChannelStore) SaveDirectChannel(channel *model.Channel, member1 *model.ChannelMember, member2 *model.ChannelMember) (*model.Channel, error) { 1529 ret := _m.Called(channel, member1, member2) 1530 1531 var r0 *model.Channel 1532 if rf, ok := ret.Get(0).(func(*model.Channel, *model.ChannelMember, *model.ChannelMember) *model.Channel); ok { 1533 r0 = rf(channel, member1, member2) 1534 } else { 1535 if ret.Get(0) != nil { 1536 r0 = ret.Get(0).(*model.Channel) 1537 } 1538 } 1539 1540 var r1 error 1541 if rf, ok := ret.Get(1).(func(*model.Channel, *model.ChannelMember, *model.ChannelMember) error); ok { 1542 r1 = rf(channel, member1, member2) 1543 } else { 1544 r1 = ret.Error(1) 1545 } 1546 1547 return r0, r1 1548 } 1549 1550 // SaveMember provides a mock function with given fields: member 1551 func (_m *ChannelStore) SaveMember(member *model.ChannelMember) (*model.ChannelMember, error) { 1552 ret := _m.Called(member) 1553 1554 var r0 *model.ChannelMember 1555 if rf, ok := ret.Get(0).(func(*model.ChannelMember) *model.ChannelMember); ok { 1556 r0 = rf(member) 1557 } else { 1558 if ret.Get(0) != nil { 1559 r0 = ret.Get(0).(*model.ChannelMember) 1560 } 1561 } 1562 1563 var r1 error 1564 if rf, ok := ret.Get(1).(func(*model.ChannelMember) error); ok { 1565 r1 = rf(member) 1566 } else { 1567 r1 = ret.Error(1) 1568 } 1569 1570 return r0, r1 1571 } 1572 1573 // SaveMultipleMembers provides a mock function with given fields: members 1574 func (_m *ChannelStore) SaveMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, error) { 1575 ret := _m.Called(members) 1576 1577 var r0 []*model.ChannelMember 1578 if rf, ok := ret.Get(0).(func([]*model.ChannelMember) []*model.ChannelMember); ok { 1579 r0 = rf(members) 1580 } else { 1581 if ret.Get(0) != nil { 1582 r0 = ret.Get(0).([]*model.ChannelMember) 1583 } 1584 } 1585 1586 var r1 error 1587 if rf, ok := ret.Get(1).(func([]*model.ChannelMember) error); ok { 1588 r1 = rf(members) 1589 } else { 1590 r1 = ret.Error(1) 1591 } 1592 1593 return r0, r1 1594 } 1595 1596 // SearchAllChannels provides a mock function with given fields: term, opts 1597 func (_m *ChannelStore) SearchAllChannels(term string, opts store.ChannelSearchOpts) (*model.ChannelListWithTeamData, int64, error) { 1598 ret := _m.Called(term, opts) 1599 1600 var r0 *model.ChannelListWithTeamData 1601 if rf, ok := ret.Get(0).(func(string, store.ChannelSearchOpts) *model.ChannelListWithTeamData); ok { 1602 r0 = rf(term, opts) 1603 } else { 1604 if ret.Get(0) != nil { 1605 r0 = ret.Get(0).(*model.ChannelListWithTeamData) 1606 } 1607 } 1608 1609 var r1 int64 1610 if rf, ok := ret.Get(1).(func(string, store.ChannelSearchOpts) int64); ok { 1611 r1 = rf(term, opts) 1612 } else { 1613 r1 = ret.Get(1).(int64) 1614 } 1615 1616 var r2 error 1617 if rf, ok := ret.Get(2).(func(string, store.ChannelSearchOpts) error); ok { 1618 r2 = rf(term, opts) 1619 } else { 1620 r2 = ret.Error(2) 1621 } 1622 1623 return r0, r1, r2 1624 } 1625 1626 // SearchArchivedInTeam provides a mock function with given fields: teamId, term, userId 1627 func (_m *ChannelStore) SearchArchivedInTeam(teamId string, term string, userId string) (*model.ChannelList, error) { 1628 ret := _m.Called(teamId, term, userId) 1629 1630 var r0 *model.ChannelList 1631 if rf, ok := ret.Get(0).(func(string, string, string) *model.ChannelList); ok { 1632 r0 = rf(teamId, term, userId) 1633 } else { 1634 if ret.Get(0) != nil { 1635 r0 = ret.Get(0).(*model.ChannelList) 1636 } 1637 } 1638 1639 var r1 error 1640 if rf, ok := ret.Get(1).(func(string, string, string) error); ok { 1641 r1 = rf(teamId, term, userId) 1642 } else { 1643 r1 = ret.Error(1) 1644 } 1645 1646 return r0, r1 1647 } 1648 1649 // SearchForUserInTeam provides a mock function with given fields: userId, teamId, term, includeDeleted 1650 func (_m *ChannelStore) SearchForUserInTeam(userId string, teamId string, term string, includeDeleted bool) (*model.ChannelList, error) { 1651 ret := _m.Called(userId, teamId, term, includeDeleted) 1652 1653 var r0 *model.ChannelList 1654 if rf, ok := ret.Get(0).(func(string, string, string, bool) *model.ChannelList); ok { 1655 r0 = rf(userId, teamId, term, includeDeleted) 1656 } else { 1657 if ret.Get(0) != nil { 1658 r0 = ret.Get(0).(*model.ChannelList) 1659 } 1660 } 1661 1662 var r1 error 1663 if rf, ok := ret.Get(1).(func(string, string, string, bool) error); ok { 1664 r1 = rf(userId, teamId, term, includeDeleted) 1665 } else { 1666 r1 = ret.Error(1) 1667 } 1668 1669 return r0, r1 1670 } 1671 1672 // SearchGroupChannels provides a mock function with given fields: userId, term 1673 func (_m *ChannelStore) SearchGroupChannels(userId string, term string) (*model.ChannelList, error) { 1674 ret := _m.Called(userId, term) 1675 1676 var r0 *model.ChannelList 1677 if rf, ok := ret.Get(0).(func(string, string) *model.ChannelList); ok { 1678 r0 = rf(userId, term) 1679 } else { 1680 if ret.Get(0) != nil { 1681 r0 = ret.Get(0).(*model.ChannelList) 1682 } 1683 } 1684 1685 var r1 error 1686 if rf, ok := ret.Get(1).(func(string, string) error); ok { 1687 r1 = rf(userId, term) 1688 } else { 1689 r1 = ret.Error(1) 1690 } 1691 1692 return r0, r1 1693 } 1694 1695 // SearchInTeam provides a mock function with given fields: teamId, term, includeDeleted 1696 func (_m *ChannelStore) SearchInTeam(teamId string, term string, includeDeleted bool) (*model.ChannelList, error) { 1697 ret := _m.Called(teamId, term, includeDeleted) 1698 1699 var r0 *model.ChannelList 1700 if rf, ok := ret.Get(0).(func(string, string, bool) *model.ChannelList); ok { 1701 r0 = rf(teamId, term, includeDeleted) 1702 } else { 1703 if ret.Get(0) != nil { 1704 r0 = ret.Get(0).(*model.ChannelList) 1705 } 1706 } 1707 1708 var r1 error 1709 if rf, ok := ret.Get(1).(func(string, string, bool) error); ok { 1710 r1 = rf(teamId, term, includeDeleted) 1711 } else { 1712 r1 = ret.Error(1) 1713 } 1714 1715 return r0, r1 1716 } 1717 1718 // SearchMore provides a mock function with given fields: userId, teamId, term 1719 func (_m *ChannelStore) SearchMore(userId string, teamId string, term string) (*model.ChannelList, error) { 1720 ret := _m.Called(userId, teamId, term) 1721 1722 var r0 *model.ChannelList 1723 if rf, ok := ret.Get(0).(func(string, string, string) *model.ChannelList); ok { 1724 r0 = rf(userId, teamId, term) 1725 } else { 1726 if ret.Get(0) != nil { 1727 r0 = ret.Get(0).(*model.ChannelList) 1728 } 1729 } 1730 1731 var r1 error 1732 if rf, ok := ret.Get(1).(func(string, string, string) error); ok { 1733 r1 = rf(userId, teamId, term) 1734 } else { 1735 r1 = ret.Error(1) 1736 } 1737 1738 return r0, r1 1739 } 1740 1741 // SetDeleteAt provides a mock function with given fields: channelId, deleteAt, updateAt 1742 func (_m *ChannelStore) SetDeleteAt(channelId string, deleteAt int64, updateAt int64) error { 1743 ret := _m.Called(channelId, deleteAt, updateAt) 1744 1745 var r0 error 1746 if rf, ok := ret.Get(0).(func(string, int64, int64) error); ok { 1747 r0 = rf(channelId, deleteAt, updateAt) 1748 } else { 1749 r0 = ret.Error(0) 1750 } 1751 1752 return r0 1753 } 1754 1755 // Update provides a mock function with given fields: channel 1756 func (_m *ChannelStore) Update(channel *model.Channel) (*model.Channel, error) { 1757 ret := _m.Called(channel) 1758 1759 var r0 *model.Channel 1760 if rf, ok := ret.Get(0).(func(*model.Channel) *model.Channel); ok { 1761 r0 = rf(channel) 1762 } else { 1763 if ret.Get(0) != nil { 1764 r0 = ret.Get(0).(*model.Channel) 1765 } 1766 } 1767 1768 var r1 error 1769 if rf, ok := ret.Get(1).(func(*model.Channel) error); ok { 1770 r1 = rf(channel) 1771 } else { 1772 r1 = ret.Error(1) 1773 } 1774 1775 return r0, r1 1776 } 1777 1778 // UpdateLastViewedAt provides a mock function with given fields: channelIds, userId, updateThreads 1779 func (_m *ChannelStore) UpdateLastViewedAt(channelIds []string, userId string, updateThreads bool) (map[string]int64, error) { 1780 ret := _m.Called(channelIds, userId, updateThreads) 1781 1782 var r0 map[string]int64 1783 if rf, ok := ret.Get(0).(func([]string, string, bool) map[string]int64); ok { 1784 r0 = rf(channelIds, userId, updateThreads) 1785 } else { 1786 if ret.Get(0) != nil { 1787 r0 = ret.Get(0).(map[string]int64) 1788 } 1789 } 1790 1791 var r1 error 1792 if rf, ok := ret.Get(1).(func([]string, string, bool) error); ok { 1793 r1 = rf(channelIds, userId, updateThreads) 1794 } else { 1795 r1 = ret.Error(1) 1796 } 1797 1798 return r0, r1 1799 } 1800 1801 // UpdateLastViewedAtPost provides a mock function with given fields: unreadPost, userID, mentionCount, updateThreads 1802 func (_m *ChannelStore) UpdateLastViewedAtPost(unreadPost *model.Post, userID string, mentionCount int, updateThreads bool) (*model.ChannelUnreadAt, error) { 1803 ret := _m.Called(unreadPost, userID, mentionCount, updateThreads) 1804 1805 var r0 *model.ChannelUnreadAt 1806 if rf, ok := ret.Get(0).(func(*model.Post, string, int, bool) *model.ChannelUnreadAt); ok { 1807 r0 = rf(unreadPost, userID, mentionCount, updateThreads) 1808 } else { 1809 if ret.Get(0) != nil { 1810 r0 = ret.Get(0).(*model.ChannelUnreadAt) 1811 } 1812 } 1813 1814 var r1 error 1815 if rf, ok := ret.Get(1).(func(*model.Post, string, int, bool) error); ok { 1816 r1 = rf(unreadPost, userID, mentionCount, updateThreads) 1817 } else { 1818 r1 = ret.Error(1) 1819 } 1820 1821 return r0, r1 1822 } 1823 1824 // UpdateMember provides a mock function with given fields: member 1825 func (_m *ChannelStore) UpdateMember(member *model.ChannelMember) (*model.ChannelMember, error) { 1826 ret := _m.Called(member) 1827 1828 var r0 *model.ChannelMember 1829 if rf, ok := ret.Get(0).(func(*model.ChannelMember) *model.ChannelMember); ok { 1830 r0 = rf(member) 1831 } else { 1832 if ret.Get(0) != nil { 1833 r0 = ret.Get(0).(*model.ChannelMember) 1834 } 1835 } 1836 1837 var r1 error 1838 if rf, ok := ret.Get(1).(func(*model.ChannelMember) error); ok { 1839 r1 = rf(member) 1840 } else { 1841 r1 = ret.Error(1) 1842 } 1843 1844 return r0, r1 1845 } 1846 1847 // UpdateMembersRole provides a mock function with given fields: channelID, userIDs 1848 func (_m *ChannelStore) UpdateMembersRole(channelID string, userIDs []string) error { 1849 ret := _m.Called(channelID, userIDs) 1850 1851 var r0 error 1852 if rf, ok := ret.Get(0).(func(string, []string) error); ok { 1853 r0 = rf(channelID, userIDs) 1854 } else { 1855 r0 = ret.Error(0) 1856 } 1857 1858 return r0 1859 } 1860 1861 // UpdateMultipleMembers provides a mock function with given fields: members 1862 func (_m *ChannelStore) UpdateMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, error) { 1863 ret := _m.Called(members) 1864 1865 var r0 []*model.ChannelMember 1866 if rf, ok := ret.Get(0).(func([]*model.ChannelMember) []*model.ChannelMember); ok { 1867 r0 = rf(members) 1868 } else { 1869 if ret.Get(0) != nil { 1870 r0 = ret.Get(0).([]*model.ChannelMember) 1871 } 1872 } 1873 1874 var r1 error 1875 if rf, ok := ret.Get(1).(func([]*model.ChannelMember) error); ok { 1876 r1 = rf(members) 1877 } else { 1878 r1 = ret.Error(1) 1879 } 1880 1881 return r0, r1 1882 } 1883 1884 // UpdateSidebarCategories provides a mock function with given fields: userId, teamId, categories 1885 func (_m *ChannelStore) UpdateSidebarCategories(userId string, teamId string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, []*model.SidebarCategoryWithChannels, error) { 1886 ret := _m.Called(userId, teamId, categories) 1887 1888 var r0 []*model.SidebarCategoryWithChannels 1889 if rf, ok := ret.Get(0).(func(string, string, []*model.SidebarCategoryWithChannels) []*model.SidebarCategoryWithChannels); ok { 1890 r0 = rf(userId, teamId, categories) 1891 } else { 1892 if ret.Get(0) != nil { 1893 r0 = ret.Get(0).([]*model.SidebarCategoryWithChannels) 1894 } 1895 } 1896 1897 var r1 []*model.SidebarCategoryWithChannels 1898 if rf, ok := ret.Get(1).(func(string, string, []*model.SidebarCategoryWithChannels) []*model.SidebarCategoryWithChannels); ok { 1899 r1 = rf(userId, teamId, categories) 1900 } else { 1901 if ret.Get(1) != nil { 1902 r1 = ret.Get(1).([]*model.SidebarCategoryWithChannels) 1903 } 1904 } 1905 1906 var r2 error 1907 if rf, ok := ret.Get(2).(func(string, string, []*model.SidebarCategoryWithChannels) error); ok { 1908 r2 = rf(userId, teamId, categories) 1909 } else { 1910 r2 = ret.Error(2) 1911 } 1912 1913 return r0, r1, r2 1914 } 1915 1916 // UpdateSidebarCategoryOrder provides a mock function with given fields: userId, teamId, categoryOrder 1917 func (_m *ChannelStore) UpdateSidebarCategoryOrder(userId string, teamId string, categoryOrder []string) error { 1918 ret := _m.Called(userId, teamId, categoryOrder) 1919 1920 var r0 error 1921 if rf, ok := ret.Get(0).(func(string, string, []string) error); ok { 1922 r0 = rf(userId, teamId, categoryOrder) 1923 } else { 1924 r0 = ret.Error(0) 1925 } 1926 1927 return r0 1928 } 1929 1930 // UpdateSidebarChannelCategoryOnMove provides a mock function with given fields: channel, newTeamId 1931 func (_m *ChannelStore) UpdateSidebarChannelCategoryOnMove(channel *model.Channel, newTeamId string) error { 1932 ret := _m.Called(channel, newTeamId) 1933 1934 var r0 error 1935 if rf, ok := ret.Get(0).(func(*model.Channel, string) error); ok { 1936 r0 = rf(channel, newTeamId) 1937 } else { 1938 r0 = ret.Error(0) 1939 } 1940 1941 return r0 1942 } 1943 1944 // UpdateSidebarChannelsByPreferences provides a mock function with given fields: preferences 1945 func (_m *ChannelStore) UpdateSidebarChannelsByPreferences(preferences *model.Preferences) error { 1946 ret := _m.Called(preferences) 1947 1948 var r0 error 1949 if rf, ok := ret.Get(0).(func(*model.Preferences) error); ok { 1950 r0 = rf(preferences) 1951 } else { 1952 r0 = ret.Error(0) 1953 } 1954 1955 return r0 1956 } 1957 1958 // UserBelongsToChannels provides a mock function with given fields: userId, channelIds 1959 func (_m *ChannelStore) UserBelongsToChannels(userId string, channelIds []string) (bool, error) { 1960 ret := _m.Called(userId, channelIds) 1961 1962 var r0 bool 1963 if rf, ok := ret.Get(0).(func(string, []string) bool); ok { 1964 r0 = rf(userId, channelIds) 1965 } else { 1966 r0 = ret.Get(0).(bool) 1967 } 1968 1969 var r1 error 1970 if rf, ok := ret.Get(1).(func(string, []string) error); ok { 1971 r1 = rf(userId, channelIds) 1972 } else { 1973 r1 = ret.Error(1) 1974 } 1975 1976 return r0, r1 1977 }