github.com/mad-app/mattermost-server@v5.11.1+incompatible/store/storetest/mocks/TeamStore.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 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 // TeamStore is an autogenerated mock type for the TeamStore type 12 type TeamStore struct { 13 mock.Mock 14 } 15 16 // AnalyticsGetTeamCountForScheme provides a mock function with given fields: schemeId 17 func (_m *TeamStore) AnalyticsGetTeamCountForScheme(schemeId string) store.StoreChannel { 18 ret := _m.Called(schemeId) 19 20 var r0 store.StoreChannel 21 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 22 r0 = rf(schemeId) 23 } else { 24 if ret.Get(0) != nil { 25 r0 = ret.Get(0).(store.StoreChannel) 26 } 27 } 28 29 return r0 30 } 31 32 // AnalyticsTeamCount provides a mock function with given fields: 33 func (_m *TeamStore) AnalyticsTeamCount() store.StoreChannel { 34 ret := _m.Called() 35 36 var r0 store.StoreChannel 37 if rf, ok := ret.Get(0).(func() store.StoreChannel); ok { 38 r0 = rf() 39 } else { 40 if ret.Get(0) != nil { 41 r0 = ret.Get(0).(store.StoreChannel) 42 } 43 } 44 45 return r0 46 } 47 48 // ClearAllCustomRoleAssignments provides a mock function with given fields: 49 func (_m *TeamStore) ClearAllCustomRoleAssignments() store.StoreChannel { 50 ret := _m.Called() 51 52 var r0 store.StoreChannel 53 if rf, ok := ret.Get(0).(func() store.StoreChannel); ok { 54 r0 = rf() 55 } else { 56 if ret.Get(0) != nil { 57 r0 = ret.Get(0).(store.StoreChannel) 58 } 59 } 60 61 return r0 62 } 63 64 // Get provides a mock function with given fields: id 65 func (_m *TeamStore) Get(id string) store.StoreChannel { 66 ret := _m.Called(id) 67 68 var r0 store.StoreChannel 69 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 70 r0 = rf(id) 71 } else { 72 if ret.Get(0) != nil { 73 r0 = ret.Get(0).(store.StoreChannel) 74 } 75 } 76 77 return r0 78 } 79 80 // GetActiveMemberCount provides a mock function with given fields: teamId 81 func (_m *TeamStore) GetActiveMemberCount(teamId string) store.StoreChannel { 82 ret := _m.Called(teamId) 83 84 var r0 store.StoreChannel 85 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 86 r0 = rf(teamId) 87 } else { 88 if ret.Get(0) != nil { 89 r0 = ret.Get(0).(store.StoreChannel) 90 } 91 } 92 93 return r0 94 } 95 96 // GetAll provides a mock function with given fields: 97 func (_m *TeamStore) GetAll() store.StoreChannel { 98 ret := _m.Called() 99 100 var r0 store.StoreChannel 101 if rf, ok := ret.Get(0).(func() store.StoreChannel); ok { 102 r0 = rf() 103 } else { 104 if ret.Get(0) != nil { 105 r0 = ret.Get(0).(store.StoreChannel) 106 } 107 } 108 109 return r0 110 } 111 112 // GetAllForExportAfter provides a mock function with given fields: limit, afterId 113 func (_m *TeamStore) GetAllForExportAfter(limit int, afterId string) store.StoreChannel { 114 ret := _m.Called(limit, afterId) 115 116 var r0 store.StoreChannel 117 if rf, ok := ret.Get(0).(func(int, string) store.StoreChannel); ok { 118 r0 = rf(limit, afterId) 119 } else { 120 if ret.Get(0) != nil { 121 r0 = ret.Get(0).(store.StoreChannel) 122 } 123 } 124 125 return r0 126 } 127 128 // GetAllPage provides a mock function with given fields: offset, limit 129 func (_m *TeamStore) GetAllPage(offset int, limit int) store.StoreChannel { 130 ret := _m.Called(offset, limit) 131 132 var r0 store.StoreChannel 133 if rf, ok := ret.Get(0).(func(int, int) store.StoreChannel); ok { 134 r0 = rf(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 // GetAllPrivateTeamListing provides a mock function with given fields: 145 func (_m *TeamStore) GetAllPrivateTeamListing() store.StoreChannel { 146 ret := _m.Called() 147 148 var r0 store.StoreChannel 149 if rf, ok := ret.Get(0).(func() store.StoreChannel); ok { 150 r0 = rf() 151 } else { 152 if ret.Get(0) != nil { 153 r0 = ret.Get(0).(store.StoreChannel) 154 } 155 } 156 157 return r0 158 } 159 160 // GetAllPrivateTeamPageListing provides a mock function with given fields: offset, limit 161 func (_m *TeamStore) GetAllPrivateTeamPageListing(offset int, limit int) store.StoreChannel { 162 ret := _m.Called(offset, limit) 163 164 var r0 store.StoreChannel 165 if rf, ok := ret.Get(0).(func(int, int) store.StoreChannel); ok { 166 r0 = rf(offset, limit) 167 } else { 168 if ret.Get(0) != nil { 169 r0 = ret.Get(0).(store.StoreChannel) 170 } 171 } 172 173 return r0 174 } 175 176 // GetAllTeamListing provides a mock function with given fields: 177 func (_m *TeamStore) GetAllTeamListing() store.StoreChannel { 178 ret := _m.Called() 179 180 var r0 store.StoreChannel 181 if rf, ok := ret.Get(0).(func() store.StoreChannel); ok { 182 r0 = rf() 183 } else { 184 if ret.Get(0) != nil { 185 r0 = ret.Get(0).(store.StoreChannel) 186 } 187 } 188 189 return r0 190 } 191 192 // GetAllTeamPageListing provides a mock function with given fields: offset, limit 193 func (_m *TeamStore) GetAllTeamPageListing(offset int, limit int) store.StoreChannel { 194 ret := _m.Called(offset, limit) 195 196 var r0 store.StoreChannel 197 if rf, ok := ret.Get(0).(func(int, int) store.StoreChannel); ok { 198 r0 = rf(offset, limit) 199 } else { 200 if ret.Get(0) != nil { 201 r0 = ret.Get(0).(store.StoreChannel) 202 } 203 } 204 205 return r0 206 } 207 208 // GetByInviteId provides a mock function with given fields: inviteId 209 func (_m *TeamStore) GetByInviteId(inviteId string) store.StoreChannel { 210 ret := _m.Called(inviteId) 211 212 var r0 store.StoreChannel 213 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 214 r0 = rf(inviteId) 215 } else { 216 if ret.Get(0) != nil { 217 r0 = ret.Get(0).(store.StoreChannel) 218 } 219 } 220 221 return r0 222 } 223 224 // GetByName provides a mock function with given fields: name 225 func (_m *TeamStore) GetByName(name string) store.StoreChannel { 226 ret := _m.Called(name) 227 228 var r0 store.StoreChannel 229 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 230 r0 = rf(name) 231 } else { 232 if ret.Get(0) != nil { 233 r0 = ret.Get(0).(store.StoreChannel) 234 } 235 } 236 237 return r0 238 } 239 240 // GetChannelUnreadsForAllTeams provides a mock function with given fields: excludeTeamId, userId 241 func (_m *TeamStore) GetChannelUnreadsForAllTeams(excludeTeamId string, userId string) store.StoreChannel { 242 ret := _m.Called(excludeTeamId, userId) 243 244 var r0 store.StoreChannel 245 if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { 246 r0 = rf(excludeTeamId, userId) 247 } else { 248 if ret.Get(0) != nil { 249 r0 = ret.Get(0).(store.StoreChannel) 250 } 251 } 252 253 return r0 254 } 255 256 // GetChannelUnreadsForTeam provides a mock function with given fields: teamId, userId 257 func (_m *TeamStore) GetChannelUnreadsForTeam(teamId string, userId string) store.StoreChannel { 258 ret := _m.Called(teamId, userId) 259 260 var r0 store.StoreChannel 261 if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { 262 r0 = rf(teamId, userId) 263 } else { 264 if ret.Get(0) != nil { 265 r0 = ret.Get(0).(store.StoreChannel) 266 } 267 } 268 269 return r0 270 } 271 272 // GetMember provides a mock function with given fields: teamId, userId 273 func (_m *TeamStore) GetMember(teamId string, userId string) store.StoreChannel { 274 ret := _m.Called(teamId, userId) 275 276 var r0 store.StoreChannel 277 if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { 278 r0 = rf(teamId, userId) 279 } else { 280 if ret.Get(0) != nil { 281 r0 = ret.Get(0).(store.StoreChannel) 282 } 283 } 284 285 return r0 286 } 287 288 // GetMembers provides a mock function with given fields: teamId, offset, limit 289 func (_m *TeamStore) GetMembers(teamId string, offset int, limit int) store.StoreChannel { 290 ret := _m.Called(teamId, offset, limit) 291 292 var r0 store.StoreChannel 293 if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok { 294 r0 = rf(teamId, offset, limit) 295 } else { 296 if ret.Get(0) != nil { 297 r0 = ret.Get(0).(store.StoreChannel) 298 } 299 } 300 301 return r0 302 } 303 304 // GetMembersByIds provides a mock function with given fields: teamId, userIds 305 func (_m *TeamStore) GetMembersByIds(teamId string, userIds []string) store.StoreChannel { 306 ret := _m.Called(teamId, userIds) 307 308 var r0 store.StoreChannel 309 if rf, ok := ret.Get(0).(func(string, []string) store.StoreChannel); ok { 310 r0 = rf(teamId, userIds) 311 } else { 312 if ret.Get(0) != nil { 313 r0 = ret.Get(0).(store.StoreChannel) 314 } 315 } 316 317 return r0 318 } 319 320 // GetTeamMembersForExport provides a mock function with given fields: userId 321 func (_m *TeamStore) GetTeamMembersForExport(userId string) store.StoreChannel { 322 ret := _m.Called(userId) 323 324 var r0 store.StoreChannel 325 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 326 r0 = rf(userId) 327 } else { 328 if ret.Get(0) != nil { 329 r0 = ret.Get(0).(store.StoreChannel) 330 } 331 } 332 333 return r0 334 } 335 336 // GetTeamsByScheme provides a mock function with given fields: schemeId, offset, limit 337 func (_m *TeamStore) GetTeamsByScheme(schemeId string, offset int, limit int) store.StoreChannel { 338 ret := _m.Called(schemeId, offset, limit) 339 340 var r0 store.StoreChannel 341 if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok { 342 r0 = rf(schemeId, offset, limit) 343 } else { 344 if ret.Get(0) != nil { 345 r0 = ret.Get(0).(store.StoreChannel) 346 } 347 } 348 349 return r0 350 } 351 352 // GetTeamsByUserId provides a mock function with given fields: userId 353 func (_m *TeamStore) GetTeamsByUserId(userId string) store.StoreChannel { 354 ret := _m.Called(userId) 355 356 var r0 store.StoreChannel 357 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 358 r0 = rf(userId) 359 } else { 360 if ret.Get(0) != nil { 361 r0 = ret.Get(0).(store.StoreChannel) 362 } 363 } 364 365 return r0 366 } 367 368 // GetTeamsForUser provides a mock function with given fields: userId 369 func (_m *TeamStore) GetTeamsForUser(userId string) store.StoreChannel { 370 ret := _m.Called(userId) 371 372 var r0 store.StoreChannel 373 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 374 r0 = rf(userId) 375 } else { 376 if ret.Get(0) != nil { 377 r0 = ret.Get(0).(store.StoreChannel) 378 } 379 } 380 381 return r0 382 } 383 384 // GetTeamsForUserWithPagination provides a mock function with given fields: userId, page, perPage 385 func (_m *TeamStore) GetTeamsForUserWithPagination(userId string, page int, perPage int) store.StoreChannel { 386 ret := _m.Called(userId, page, perPage) 387 388 var r0 store.StoreChannel 389 if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok { 390 r0 = rf(userId, page, perPage) 391 } else { 392 if ret.Get(0) != nil { 393 r0 = ret.Get(0).(store.StoreChannel) 394 } 395 } 396 397 return r0 398 } 399 400 // GetTotalMemberCount provides a mock function with given fields: teamId 401 func (_m *TeamStore) GetTotalMemberCount(teamId string) store.StoreChannel { 402 ret := _m.Called(teamId) 403 404 var r0 store.StoreChannel 405 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 406 r0 = rf(teamId) 407 } else { 408 if ret.Get(0) != nil { 409 r0 = ret.Get(0).(store.StoreChannel) 410 } 411 } 412 413 return r0 414 } 415 416 // MigrateTeamMembers provides a mock function with given fields: fromTeamId, fromUserId 417 func (_m *TeamStore) MigrateTeamMembers(fromTeamId string, fromUserId string) store.StoreChannel { 418 ret := _m.Called(fromTeamId, fromUserId) 419 420 var r0 store.StoreChannel 421 if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { 422 r0 = rf(fromTeamId, fromUserId) 423 } else { 424 if ret.Get(0) != nil { 425 r0 = ret.Get(0).(store.StoreChannel) 426 } 427 } 428 429 return r0 430 } 431 432 // PermanentDelete provides a mock function with given fields: teamId 433 func (_m *TeamStore) PermanentDelete(teamId string) store.StoreChannel { 434 ret := _m.Called(teamId) 435 436 var r0 store.StoreChannel 437 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 438 r0 = rf(teamId) 439 } else { 440 if ret.Get(0) != nil { 441 r0 = ret.Get(0).(store.StoreChannel) 442 } 443 } 444 445 return r0 446 } 447 448 // RemoveAllMembersByTeam provides a mock function with given fields: teamId 449 func (_m *TeamStore) RemoveAllMembersByTeam(teamId string) store.StoreChannel { 450 ret := _m.Called(teamId) 451 452 var r0 store.StoreChannel 453 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 454 r0 = rf(teamId) 455 } else { 456 if ret.Get(0) != nil { 457 r0 = ret.Get(0).(store.StoreChannel) 458 } 459 } 460 461 return r0 462 } 463 464 // RemoveAllMembersByUser provides a mock function with given fields: userId 465 func (_m *TeamStore) RemoveAllMembersByUser(userId string) store.StoreChannel { 466 ret := _m.Called(userId) 467 468 var r0 store.StoreChannel 469 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 470 r0 = rf(userId) 471 } else { 472 if ret.Get(0) != nil { 473 r0 = ret.Get(0).(store.StoreChannel) 474 } 475 } 476 477 return r0 478 } 479 480 // RemoveMember provides a mock function with given fields: teamId, userId 481 func (_m *TeamStore) RemoveMember(teamId string, userId string) store.StoreChannel { 482 ret := _m.Called(teamId, userId) 483 484 var r0 store.StoreChannel 485 if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { 486 r0 = rf(teamId, userId) 487 } else { 488 if ret.Get(0) != nil { 489 r0 = ret.Get(0).(store.StoreChannel) 490 } 491 } 492 493 return r0 494 } 495 496 // ResetAllTeamSchemes provides a mock function with given fields: 497 func (_m *TeamStore) ResetAllTeamSchemes() store.StoreChannel { 498 ret := _m.Called() 499 500 var r0 store.StoreChannel 501 if rf, ok := ret.Get(0).(func() store.StoreChannel); ok { 502 r0 = rf() 503 } else { 504 if ret.Get(0) != nil { 505 r0 = ret.Get(0).(store.StoreChannel) 506 } 507 } 508 509 return r0 510 } 511 512 // Save provides a mock function with given fields: team 513 func (_m *TeamStore) Save(team *model.Team) store.StoreChannel { 514 ret := _m.Called(team) 515 516 var r0 store.StoreChannel 517 if rf, ok := ret.Get(0).(func(*model.Team) store.StoreChannel); ok { 518 r0 = rf(team) 519 } else { 520 if ret.Get(0) != nil { 521 r0 = ret.Get(0).(store.StoreChannel) 522 } 523 } 524 525 return r0 526 } 527 528 // SaveMember provides a mock function with given fields: member, maxUsersPerTeam 529 func (_m *TeamStore) SaveMember(member *model.TeamMember, maxUsersPerTeam int) store.StoreChannel { 530 ret := _m.Called(member, maxUsersPerTeam) 531 532 var r0 store.StoreChannel 533 if rf, ok := ret.Get(0).(func(*model.TeamMember, int) store.StoreChannel); ok { 534 r0 = rf(member, maxUsersPerTeam) 535 } else { 536 if ret.Get(0) != nil { 537 r0 = ret.Get(0).(store.StoreChannel) 538 } 539 } 540 541 return r0 542 } 543 544 // SearchAll provides a mock function with given fields: term 545 func (_m *TeamStore) SearchAll(term string) store.StoreChannel { 546 ret := _m.Called(term) 547 548 var r0 store.StoreChannel 549 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 550 r0 = rf(term) 551 } else { 552 if ret.Get(0) != nil { 553 r0 = ret.Get(0).(store.StoreChannel) 554 } 555 } 556 557 return r0 558 } 559 560 // SearchByName provides a mock function with given fields: name 561 func (_m *TeamStore) SearchByName(name string) store.StoreChannel { 562 ret := _m.Called(name) 563 564 var r0 store.StoreChannel 565 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 566 r0 = rf(name) 567 } else { 568 if ret.Get(0) != nil { 569 r0 = ret.Get(0).(store.StoreChannel) 570 } 571 } 572 573 return r0 574 } 575 576 // SearchOpen provides a mock function with given fields: term 577 func (_m *TeamStore) SearchOpen(term string) store.StoreChannel { 578 ret := _m.Called(term) 579 580 var r0 store.StoreChannel 581 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 582 r0 = rf(term) 583 } else { 584 if ret.Get(0) != nil { 585 r0 = ret.Get(0).(store.StoreChannel) 586 } 587 } 588 589 return r0 590 } 591 592 // SearchPrivate provides a mock function with given fields: term 593 func (_m *TeamStore) SearchPrivate(term string) store.StoreChannel { 594 ret := _m.Called(term) 595 596 var r0 store.StoreChannel 597 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 598 r0 = rf(term) 599 } else { 600 if ret.Get(0) != nil { 601 r0 = ret.Get(0).(store.StoreChannel) 602 } 603 } 604 605 return r0 606 } 607 608 // Update provides a mock function with given fields: team 609 func (_m *TeamStore) Update(team *model.Team) store.StoreChannel { 610 ret := _m.Called(team) 611 612 var r0 store.StoreChannel 613 if rf, ok := ret.Get(0).(func(*model.Team) store.StoreChannel); ok { 614 r0 = rf(team) 615 } else { 616 if ret.Get(0) != nil { 617 r0 = ret.Get(0).(store.StoreChannel) 618 } 619 } 620 621 return r0 622 } 623 624 // UpdateDisplayName provides a mock function with given fields: name, teamId 625 func (_m *TeamStore) UpdateDisplayName(name string, teamId string) store.StoreChannel { 626 ret := _m.Called(name, teamId) 627 628 var r0 store.StoreChannel 629 if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { 630 r0 = rf(name, teamId) 631 } else { 632 if ret.Get(0) != nil { 633 r0 = ret.Get(0).(store.StoreChannel) 634 } 635 } 636 637 return r0 638 } 639 640 // UpdateLastTeamIconUpdate provides a mock function with given fields: teamId, curTime 641 func (_m *TeamStore) UpdateLastTeamIconUpdate(teamId string, curTime int64) store.StoreChannel { 642 ret := _m.Called(teamId, curTime) 643 644 var r0 store.StoreChannel 645 if rf, ok := ret.Get(0).(func(string, int64) store.StoreChannel); ok { 646 r0 = rf(teamId, curTime) 647 } else { 648 if ret.Get(0) != nil { 649 r0 = ret.Get(0).(store.StoreChannel) 650 } 651 } 652 653 return r0 654 } 655 656 // UpdateMember provides a mock function with given fields: member 657 func (_m *TeamStore) UpdateMember(member *model.TeamMember) store.StoreChannel { 658 ret := _m.Called(member) 659 660 var r0 store.StoreChannel 661 if rf, ok := ret.Get(0).(func(*model.TeamMember) store.StoreChannel); ok { 662 r0 = rf(member) 663 } else { 664 if ret.Get(0) != nil { 665 r0 = ret.Get(0).(store.StoreChannel) 666 } 667 } 668 669 return r0 670 }