github.com/haalcala/mattermost-server-change-repo/v5@v5.33.2/store/storetest/mocks/UserStore.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 context "context" 9 10 model "github.com/mattermost/mattermost-server/v5/model" 11 mock "github.com/stretchr/testify/mock" 12 13 store "github.com/mattermost/mattermost-server/v5/store" 14 ) 15 16 // UserStore is an autogenerated mock type for the UserStore type 17 type UserStore struct { 18 mock.Mock 19 } 20 21 // AnalyticsActiveCount provides a mock function with given fields: time, options 22 func (_m *UserStore) AnalyticsActiveCount(time int64, options model.UserCountOptions) (int64, error) { 23 ret := _m.Called(time, options) 24 25 var r0 int64 26 if rf, ok := ret.Get(0).(func(int64, model.UserCountOptions) int64); ok { 27 r0 = rf(time, options) 28 } else { 29 r0 = ret.Get(0).(int64) 30 } 31 32 var r1 error 33 if rf, ok := ret.Get(1).(func(int64, model.UserCountOptions) error); ok { 34 r1 = rf(time, options) 35 } else { 36 r1 = ret.Error(1) 37 } 38 39 return r0, r1 40 } 41 42 // AnalyticsActiveCountForPeriod provides a mock function with given fields: startTime, endTime, options 43 func (_m *UserStore) AnalyticsActiveCountForPeriod(startTime int64, endTime int64, options model.UserCountOptions) (int64, error) { 44 ret := _m.Called(startTime, endTime, options) 45 46 var r0 int64 47 if rf, ok := ret.Get(0).(func(int64, int64, model.UserCountOptions) int64); ok { 48 r0 = rf(startTime, endTime, options) 49 } else { 50 r0 = ret.Get(0).(int64) 51 } 52 53 var r1 error 54 if rf, ok := ret.Get(1).(func(int64, int64, model.UserCountOptions) error); ok { 55 r1 = rf(startTime, endTime, options) 56 } else { 57 r1 = ret.Error(1) 58 } 59 60 return r0, r1 61 } 62 63 // AnalyticsGetExternalUsers provides a mock function with given fields: hostDomain 64 func (_m *UserStore) AnalyticsGetExternalUsers(hostDomain string) (bool, error) { 65 ret := _m.Called(hostDomain) 66 67 var r0 bool 68 if rf, ok := ret.Get(0).(func(string) bool); ok { 69 r0 = rf(hostDomain) 70 } else { 71 r0 = ret.Get(0).(bool) 72 } 73 74 var r1 error 75 if rf, ok := ret.Get(1).(func(string) error); ok { 76 r1 = rf(hostDomain) 77 } else { 78 r1 = ret.Error(1) 79 } 80 81 return r0, r1 82 } 83 84 // AnalyticsGetGuestCount provides a mock function with given fields: 85 func (_m *UserStore) AnalyticsGetGuestCount() (int64, error) { 86 ret := _m.Called() 87 88 var r0 int64 89 if rf, ok := ret.Get(0).(func() int64); ok { 90 r0 = rf() 91 } else { 92 r0 = ret.Get(0).(int64) 93 } 94 95 var r1 error 96 if rf, ok := ret.Get(1).(func() error); ok { 97 r1 = rf() 98 } else { 99 r1 = ret.Error(1) 100 } 101 102 return r0, r1 103 } 104 105 // AnalyticsGetInactiveUsersCount provides a mock function with given fields: 106 func (_m *UserStore) AnalyticsGetInactiveUsersCount() (int64, error) { 107 ret := _m.Called() 108 109 var r0 int64 110 if rf, ok := ret.Get(0).(func() int64); ok { 111 r0 = rf() 112 } else { 113 r0 = ret.Get(0).(int64) 114 } 115 116 var r1 error 117 if rf, ok := ret.Get(1).(func() error); ok { 118 r1 = rf() 119 } else { 120 r1 = ret.Error(1) 121 } 122 123 return r0, r1 124 } 125 126 // AnalyticsGetSystemAdminCount provides a mock function with given fields: 127 func (_m *UserStore) AnalyticsGetSystemAdminCount() (int64, error) { 128 ret := _m.Called() 129 130 var r0 int64 131 if rf, ok := ret.Get(0).(func() int64); ok { 132 r0 = rf() 133 } else { 134 r0 = ret.Get(0).(int64) 135 } 136 137 var r1 error 138 if rf, ok := ret.Get(1).(func() error); ok { 139 r1 = rf() 140 } else { 141 r1 = ret.Error(1) 142 } 143 144 return r0, r1 145 } 146 147 // AutocompleteUsersInChannel provides a mock function with given fields: teamId, channelId, term, options 148 func (_m *UserStore) AutocompleteUsersInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInChannel, error) { 149 ret := _m.Called(teamId, channelId, term, options) 150 151 var r0 *model.UserAutocompleteInChannel 152 if rf, ok := ret.Get(0).(func(string, string, string, *model.UserSearchOptions) *model.UserAutocompleteInChannel); ok { 153 r0 = rf(teamId, channelId, term, options) 154 } else { 155 if ret.Get(0) != nil { 156 r0 = ret.Get(0).(*model.UserAutocompleteInChannel) 157 } 158 } 159 160 var r1 error 161 if rf, ok := ret.Get(1).(func(string, string, string, *model.UserSearchOptions) error); ok { 162 r1 = rf(teamId, channelId, term, options) 163 } else { 164 r1 = ret.Error(1) 165 } 166 167 return r0, r1 168 } 169 170 // ClearAllCustomRoleAssignments provides a mock function with given fields: 171 func (_m *UserStore) ClearAllCustomRoleAssignments() error { 172 ret := _m.Called() 173 174 var r0 error 175 if rf, ok := ret.Get(0).(func() error); ok { 176 r0 = rf() 177 } else { 178 r0 = ret.Error(0) 179 } 180 181 return r0 182 } 183 184 // ClearCaches provides a mock function with given fields: 185 func (_m *UserStore) ClearCaches() { 186 _m.Called() 187 } 188 189 // Count provides a mock function with given fields: options 190 func (_m *UserStore) Count(options model.UserCountOptions) (int64, error) { 191 ret := _m.Called(options) 192 193 var r0 int64 194 if rf, ok := ret.Get(0).(func(model.UserCountOptions) int64); ok { 195 r0 = rf(options) 196 } else { 197 r0 = ret.Get(0).(int64) 198 } 199 200 var r1 error 201 if rf, ok := ret.Get(1).(func(model.UserCountOptions) error); ok { 202 r1 = rf(options) 203 } else { 204 r1 = ret.Error(1) 205 } 206 207 return r0, r1 208 } 209 210 // DeactivateGuests provides a mock function with given fields: 211 func (_m *UserStore) DeactivateGuests() ([]string, error) { 212 ret := _m.Called() 213 214 var r0 []string 215 if rf, ok := ret.Get(0).(func() []string); ok { 216 r0 = rf() 217 } else { 218 if ret.Get(0) != nil { 219 r0 = ret.Get(0).([]string) 220 } 221 } 222 223 var r1 error 224 if rf, ok := ret.Get(1).(func() error); ok { 225 r1 = rf() 226 } else { 227 r1 = ret.Error(1) 228 } 229 230 return r0, r1 231 } 232 233 // DemoteUserToGuest provides a mock function with given fields: userID 234 func (_m *UserStore) DemoteUserToGuest(userID string) (*model.User, error) { 235 ret := _m.Called(userID) 236 237 var r0 *model.User 238 if rf, ok := ret.Get(0).(func(string) *model.User); ok { 239 r0 = rf(userID) 240 } else { 241 if ret.Get(0) != nil { 242 r0 = ret.Get(0).(*model.User) 243 } 244 } 245 246 var r1 error 247 if rf, ok := ret.Get(1).(func(string) error); ok { 248 r1 = rf(userID) 249 } else { 250 r1 = ret.Error(1) 251 } 252 253 return r0, r1 254 } 255 256 // Get provides a mock function with given fields: ctx, id 257 func (_m *UserStore) Get(ctx context.Context, id string) (*model.User, error) { 258 ret := _m.Called(ctx, id) 259 260 var r0 *model.User 261 if rf, ok := ret.Get(0).(func(context.Context, string) *model.User); ok { 262 r0 = rf(ctx, id) 263 } else { 264 if ret.Get(0) != nil { 265 r0 = ret.Get(0).(*model.User) 266 } 267 } 268 269 var r1 error 270 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 271 r1 = rf(ctx, id) 272 } else { 273 r1 = ret.Error(1) 274 } 275 276 return r0, r1 277 } 278 279 // GetAll provides a mock function with given fields: 280 func (_m *UserStore) GetAll() ([]*model.User, error) { 281 ret := _m.Called() 282 283 var r0 []*model.User 284 if rf, ok := ret.Get(0).(func() []*model.User); ok { 285 r0 = rf() 286 } else { 287 if ret.Get(0) != nil { 288 r0 = ret.Get(0).([]*model.User) 289 } 290 } 291 292 var r1 error 293 if rf, ok := ret.Get(1).(func() error); ok { 294 r1 = rf() 295 } else { 296 r1 = ret.Error(1) 297 } 298 299 return r0, r1 300 } 301 302 // GetAllAfter provides a mock function with given fields: limit, afterId 303 func (_m *UserStore) GetAllAfter(limit int, afterId string) ([]*model.User, error) { 304 ret := _m.Called(limit, afterId) 305 306 var r0 []*model.User 307 if rf, ok := ret.Get(0).(func(int, string) []*model.User); ok { 308 r0 = rf(limit, afterId) 309 } else { 310 if ret.Get(0) != nil { 311 r0 = ret.Get(0).([]*model.User) 312 } 313 } 314 315 var r1 error 316 if rf, ok := ret.Get(1).(func(int, string) error); ok { 317 r1 = rf(limit, afterId) 318 } else { 319 r1 = ret.Error(1) 320 } 321 322 return r0, r1 323 } 324 325 // GetAllNotInAuthService provides a mock function with given fields: authServices 326 func (_m *UserStore) GetAllNotInAuthService(authServices []string) ([]*model.User, error) { 327 ret := _m.Called(authServices) 328 329 var r0 []*model.User 330 if rf, ok := ret.Get(0).(func([]string) []*model.User); ok { 331 r0 = rf(authServices) 332 } else { 333 if ret.Get(0) != nil { 334 r0 = ret.Get(0).([]*model.User) 335 } 336 } 337 338 var r1 error 339 if rf, ok := ret.Get(1).(func([]string) error); ok { 340 r1 = rf(authServices) 341 } else { 342 r1 = ret.Error(1) 343 } 344 345 return r0, r1 346 } 347 348 // GetAllProfiles provides a mock function with given fields: options 349 func (_m *UserStore) GetAllProfiles(options *model.UserGetOptions) ([]*model.User, error) { 350 ret := _m.Called(options) 351 352 var r0 []*model.User 353 if rf, ok := ret.Get(0).(func(*model.UserGetOptions) []*model.User); ok { 354 r0 = rf(options) 355 } else { 356 if ret.Get(0) != nil { 357 r0 = ret.Get(0).([]*model.User) 358 } 359 } 360 361 var r1 error 362 if rf, ok := ret.Get(1).(func(*model.UserGetOptions) error); ok { 363 r1 = rf(options) 364 } else { 365 r1 = ret.Error(1) 366 } 367 368 return r0, r1 369 } 370 371 // GetAllProfilesInChannel provides a mock function with given fields: ctx, channelId, allowFromCache 372 func (_m *UserStore) GetAllProfilesInChannel(ctx context.Context, channelId string, allowFromCache bool) (map[string]*model.User, error) { 373 ret := _m.Called(ctx, channelId, allowFromCache) 374 375 var r0 map[string]*model.User 376 if rf, ok := ret.Get(0).(func(context.Context, string, bool) map[string]*model.User); ok { 377 r0 = rf(ctx, channelId, allowFromCache) 378 } else { 379 if ret.Get(0) != nil { 380 r0 = ret.Get(0).(map[string]*model.User) 381 } 382 } 383 384 var r1 error 385 if rf, ok := ret.Get(1).(func(context.Context, string, bool) error); ok { 386 r1 = rf(ctx, channelId, allowFromCache) 387 } else { 388 r1 = ret.Error(1) 389 } 390 391 return r0, r1 392 } 393 394 // GetAllUsingAuthService provides a mock function with given fields: authService 395 func (_m *UserStore) GetAllUsingAuthService(authService string) ([]*model.User, error) { 396 ret := _m.Called(authService) 397 398 var r0 []*model.User 399 if rf, ok := ret.Get(0).(func(string) []*model.User); ok { 400 r0 = rf(authService) 401 } else { 402 if ret.Get(0) != nil { 403 r0 = ret.Get(0).([]*model.User) 404 } 405 } 406 407 var r1 error 408 if rf, ok := ret.Get(1).(func(string) error); ok { 409 r1 = rf(authService) 410 } else { 411 r1 = ret.Error(1) 412 } 413 414 return r0, r1 415 } 416 417 // GetAnyUnreadPostCountForChannel provides a mock function with given fields: userId, channelId 418 func (_m *UserStore) GetAnyUnreadPostCountForChannel(userId string, channelId string) (int64, error) { 419 ret := _m.Called(userId, channelId) 420 421 var r0 int64 422 if rf, ok := ret.Get(0).(func(string, string) int64); ok { 423 r0 = rf(userId, channelId) 424 } else { 425 r0 = ret.Get(0).(int64) 426 } 427 428 var r1 error 429 if rf, ok := ret.Get(1).(func(string, string) error); ok { 430 r1 = rf(userId, channelId) 431 } else { 432 r1 = ret.Error(1) 433 } 434 435 return r0, r1 436 } 437 438 // GetByAuth provides a mock function with given fields: authData, authService 439 func (_m *UserStore) GetByAuth(authData *string, authService string) (*model.User, error) { 440 ret := _m.Called(authData, authService) 441 442 var r0 *model.User 443 if rf, ok := ret.Get(0).(func(*string, string) *model.User); ok { 444 r0 = rf(authData, authService) 445 } else { 446 if ret.Get(0) != nil { 447 r0 = ret.Get(0).(*model.User) 448 } 449 } 450 451 var r1 error 452 if rf, ok := ret.Get(1).(func(*string, string) error); ok { 453 r1 = rf(authData, authService) 454 } else { 455 r1 = ret.Error(1) 456 } 457 458 return r0, r1 459 } 460 461 // GetByEmail provides a mock function with given fields: email 462 func (_m *UserStore) GetByEmail(email string) (*model.User, error) { 463 ret := _m.Called(email) 464 465 var r0 *model.User 466 if rf, ok := ret.Get(0).(func(string) *model.User); ok { 467 r0 = rf(email) 468 } else { 469 if ret.Get(0) != nil { 470 r0 = ret.Get(0).(*model.User) 471 } 472 } 473 474 var r1 error 475 if rf, ok := ret.Get(1).(func(string) error); ok { 476 r1 = rf(email) 477 } else { 478 r1 = ret.Error(1) 479 } 480 481 return r0, r1 482 } 483 484 // GetByUsername provides a mock function with given fields: username 485 func (_m *UserStore) GetByUsername(username string) (*model.User, error) { 486 ret := _m.Called(username) 487 488 var r0 *model.User 489 if rf, ok := ret.Get(0).(func(string) *model.User); ok { 490 r0 = rf(username) 491 } else { 492 if ret.Get(0) != nil { 493 r0 = ret.Get(0).(*model.User) 494 } 495 } 496 497 var r1 error 498 if rf, ok := ret.Get(1).(func(string) error); ok { 499 r1 = rf(username) 500 } else { 501 r1 = ret.Error(1) 502 } 503 504 return r0, r1 505 } 506 507 // GetChannelGroupUsers provides a mock function with given fields: channelID 508 func (_m *UserStore) GetChannelGroupUsers(channelID string) ([]*model.User, error) { 509 ret := _m.Called(channelID) 510 511 var r0 []*model.User 512 if rf, ok := ret.Get(0).(func(string) []*model.User); ok { 513 r0 = rf(channelID) 514 } else { 515 if ret.Get(0) != nil { 516 r0 = ret.Get(0).([]*model.User) 517 } 518 } 519 520 var r1 error 521 if rf, ok := ret.Get(1).(func(string) error); ok { 522 r1 = rf(channelID) 523 } else { 524 r1 = ret.Error(1) 525 } 526 527 return r0, r1 528 } 529 530 // GetEtagForAllProfiles provides a mock function with given fields: 531 func (_m *UserStore) GetEtagForAllProfiles() string { 532 ret := _m.Called() 533 534 var r0 string 535 if rf, ok := ret.Get(0).(func() string); ok { 536 r0 = rf() 537 } else { 538 r0 = ret.Get(0).(string) 539 } 540 541 return r0 542 } 543 544 // GetEtagForProfiles provides a mock function with given fields: teamId 545 func (_m *UserStore) GetEtagForProfiles(teamId string) string { 546 ret := _m.Called(teamId) 547 548 var r0 string 549 if rf, ok := ret.Get(0).(func(string) string); ok { 550 r0 = rf(teamId) 551 } else { 552 r0 = ret.Get(0).(string) 553 } 554 555 return r0 556 } 557 558 // GetEtagForProfilesNotInTeam provides a mock function with given fields: teamId 559 func (_m *UserStore) GetEtagForProfilesNotInTeam(teamId string) string { 560 ret := _m.Called(teamId) 561 562 var r0 string 563 if rf, ok := ret.Get(0).(func(string) string); ok { 564 r0 = rf(teamId) 565 } else { 566 r0 = ret.Get(0).(string) 567 } 568 569 return r0 570 } 571 572 // GetForLogin provides a mock function with given fields: loginId, allowSignInWithUsername, allowSignInWithEmail 573 func (_m *UserStore) GetForLogin(loginId string, allowSignInWithUsername bool, allowSignInWithEmail bool) (*model.User, error) { 574 ret := _m.Called(loginId, allowSignInWithUsername, allowSignInWithEmail) 575 576 var r0 *model.User 577 if rf, ok := ret.Get(0).(func(string, bool, bool) *model.User); ok { 578 r0 = rf(loginId, allowSignInWithUsername, allowSignInWithEmail) 579 } else { 580 if ret.Get(0) != nil { 581 r0 = ret.Get(0).(*model.User) 582 } 583 } 584 585 var r1 error 586 if rf, ok := ret.Get(1).(func(string, bool, bool) error); ok { 587 r1 = rf(loginId, allowSignInWithUsername, allowSignInWithEmail) 588 } else { 589 r1 = ret.Error(1) 590 } 591 592 return r0, r1 593 } 594 595 // GetKnownUsers provides a mock function with given fields: userID 596 func (_m *UserStore) GetKnownUsers(userID string) ([]string, error) { 597 ret := _m.Called(userID) 598 599 var r0 []string 600 if rf, ok := ret.Get(0).(func(string) []string); ok { 601 r0 = rf(userID) 602 } else { 603 if ret.Get(0) != nil { 604 r0 = ret.Get(0).([]string) 605 } 606 } 607 608 var r1 error 609 if rf, ok := ret.Get(1).(func(string) error); ok { 610 r1 = rf(userID) 611 } else { 612 r1 = ret.Error(1) 613 } 614 615 return r0, r1 616 } 617 618 // GetMany provides a mock function with given fields: ctx, ids 619 func (_m *UserStore) GetMany(ctx context.Context, ids []string) ([]*model.User, error) { 620 ret := _m.Called(ctx, ids) 621 622 var r0 []*model.User 623 if rf, ok := ret.Get(0).(func(context.Context, []string) []*model.User); ok { 624 r0 = rf(ctx, ids) 625 } else { 626 if ret.Get(0) != nil { 627 r0 = ret.Get(0).([]*model.User) 628 } 629 } 630 631 var r1 error 632 if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok { 633 r1 = rf(ctx, ids) 634 } else { 635 r1 = ret.Error(1) 636 } 637 638 return r0, r1 639 } 640 641 // GetNewUsersForTeam provides a mock function with given fields: teamId, offset, limit, viewRestrictions 642 func (_m *UserStore) GetNewUsersForTeam(teamId string, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) { 643 ret := _m.Called(teamId, offset, limit, viewRestrictions) 644 645 var r0 []*model.User 646 if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions) []*model.User); ok { 647 r0 = rf(teamId, offset, limit, viewRestrictions) 648 } else { 649 if ret.Get(0) != nil { 650 r0 = ret.Get(0).([]*model.User) 651 } 652 } 653 654 var r1 error 655 if rf, ok := ret.Get(1).(func(string, int, int, *model.ViewUsersRestrictions) error); ok { 656 r1 = rf(teamId, offset, limit, viewRestrictions) 657 } else { 658 r1 = ret.Error(1) 659 } 660 661 return r0, r1 662 } 663 664 // GetProfileByGroupChannelIdsForUser provides a mock function with given fields: userId, channelIds 665 func (_m *UserStore) GetProfileByGroupChannelIdsForUser(userId string, channelIds []string) (map[string][]*model.User, error) { 666 ret := _m.Called(userId, channelIds) 667 668 var r0 map[string][]*model.User 669 if rf, ok := ret.Get(0).(func(string, []string) map[string][]*model.User); ok { 670 r0 = rf(userId, channelIds) 671 } else { 672 if ret.Get(0) != nil { 673 r0 = ret.Get(0).(map[string][]*model.User) 674 } 675 } 676 677 var r1 error 678 if rf, ok := ret.Get(1).(func(string, []string) error); ok { 679 r1 = rf(userId, channelIds) 680 } else { 681 r1 = ret.Error(1) 682 } 683 684 return r0, r1 685 } 686 687 // GetProfileByIds provides a mock function with given fields: ctx, userIds, options, allowFromCache 688 func (_m *UserStore) GetProfileByIds(ctx context.Context, userIds []string, options *store.UserGetByIdsOpts, allowFromCache bool) ([]*model.User, error) { 689 ret := _m.Called(ctx, userIds, options, allowFromCache) 690 691 var r0 []*model.User 692 if rf, ok := ret.Get(0).(func(context.Context, []string, *store.UserGetByIdsOpts, bool) []*model.User); ok { 693 r0 = rf(ctx, userIds, options, allowFromCache) 694 } else { 695 if ret.Get(0) != nil { 696 r0 = ret.Get(0).([]*model.User) 697 } 698 } 699 700 var r1 error 701 if rf, ok := ret.Get(1).(func(context.Context, []string, *store.UserGetByIdsOpts, bool) error); ok { 702 r1 = rf(ctx, userIds, options, allowFromCache) 703 } else { 704 r1 = ret.Error(1) 705 } 706 707 return r0, r1 708 } 709 710 // GetProfiles provides a mock function with given fields: options 711 func (_m *UserStore) GetProfiles(options *model.UserGetOptions) ([]*model.User, error) { 712 ret := _m.Called(options) 713 714 var r0 []*model.User 715 if rf, ok := ret.Get(0).(func(*model.UserGetOptions) []*model.User); ok { 716 r0 = rf(options) 717 } else { 718 if ret.Get(0) != nil { 719 r0 = ret.Get(0).([]*model.User) 720 } 721 } 722 723 var r1 error 724 if rf, ok := ret.Get(1).(func(*model.UserGetOptions) error); ok { 725 r1 = rf(options) 726 } else { 727 r1 = ret.Error(1) 728 } 729 730 return r0, r1 731 } 732 733 // GetProfilesByUsernames provides a mock function with given fields: usernames, viewRestrictions 734 func (_m *UserStore) GetProfilesByUsernames(usernames []string, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) { 735 ret := _m.Called(usernames, viewRestrictions) 736 737 var r0 []*model.User 738 if rf, ok := ret.Get(0).(func([]string, *model.ViewUsersRestrictions) []*model.User); ok { 739 r0 = rf(usernames, viewRestrictions) 740 } else { 741 if ret.Get(0) != nil { 742 r0 = ret.Get(0).([]*model.User) 743 } 744 } 745 746 var r1 error 747 if rf, ok := ret.Get(1).(func([]string, *model.ViewUsersRestrictions) error); ok { 748 r1 = rf(usernames, viewRestrictions) 749 } else { 750 r1 = ret.Error(1) 751 } 752 753 return r0, r1 754 } 755 756 // GetProfilesInChannel provides a mock function with given fields: options 757 func (_m *UserStore) GetProfilesInChannel(options *model.UserGetOptions) ([]*model.User, error) { 758 ret := _m.Called(options) 759 760 var r0 []*model.User 761 if rf, ok := ret.Get(0).(func(*model.UserGetOptions) []*model.User); ok { 762 r0 = rf(options) 763 } else { 764 if ret.Get(0) != nil { 765 r0 = ret.Get(0).([]*model.User) 766 } 767 } 768 769 var r1 error 770 if rf, ok := ret.Get(1).(func(*model.UserGetOptions) error); ok { 771 r1 = rf(options) 772 } else { 773 r1 = ret.Error(1) 774 } 775 776 return r0, r1 777 } 778 779 // GetProfilesInChannelByStatus provides a mock function with given fields: options 780 func (_m *UserStore) GetProfilesInChannelByStatus(options *model.UserGetOptions) ([]*model.User, error) { 781 ret := _m.Called(options) 782 783 var r0 []*model.User 784 if rf, ok := ret.Get(0).(func(*model.UserGetOptions) []*model.User); ok { 785 r0 = rf(options) 786 } else { 787 if ret.Get(0) != nil { 788 r0 = ret.Get(0).([]*model.User) 789 } 790 } 791 792 var r1 error 793 if rf, ok := ret.Get(1).(func(*model.UserGetOptions) error); ok { 794 r1 = rf(options) 795 } else { 796 r1 = ret.Error(1) 797 } 798 799 return r0, r1 800 } 801 802 // GetProfilesNotInChannel provides a mock function with given fields: teamId, channelId, groupConstrained, offset, limit, viewRestrictions 803 func (_m *UserStore) GetProfilesNotInChannel(teamId string, channelId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) { 804 ret := _m.Called(teamId, channelId, groupConstrained, offset, limit, viewRestrictions) 805 806 var r0 []*model.User 807 if rf, ok := ret.Get(0).(func(string, string, bool, int, int, *model.ViewUsersRestrictions) []*model.User); ok { 808 r0 = rf(teamId, channelId, groupConstrained, offset, limit, viewRestrictions) 809 } else { 810 if ret.Get(0) != nil { 811 r0 = ret.Get(0).([]*model.User) 812 } 813 } 814 815 var r1 error 816 if rf, ok := ret.Get(1).(func(string, string, bool, int, int, *model.ViewUsersRestrictions) error); ok { 817 r1 = rf(teamId, channelId, groupConstrained, offset, limit, viewRestrictions) 818 } else { 819 r1 = ret.Error(1) 820 } 821 822 return r0, r1 823 } 824 825 // GetProfilesNotInTeam provides a mock function with given fields: teamId, groupConstrained, offset, limit, viewRestrictions 826 func (_m *UserStore) GetProfilesNotInTeam(teamId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) { 827 ret := _m.Called(teamId, groupConstrained, offset, limit, viewRestrictions) 828 829 var r0 []*model.User 830 if rf, ok := ret.Get(0).(func(string, bool, int, int, *model.ViewUsersRestrictions) []*model.User); ok { 831 r0 = rf(teamId, groupConstrained, offset, limit, viewRestrictions) 832 } else { 833 if ret.Get(0) != nil { 834 r0 = ret.Get(0).([]*model.User) 835 } 836 } 837 838 var r1 error 839 if rf, ok := ret.Get(1).(func(string, bool, int, int, *model.ViewUsersRestrictions) error); ok { 840 r1 = rf(teamId, groupConstrained, offset, limit, viewRestrictions) 841 } else { 842 r1 = ret.Error(1) 843 } 844 845 return r0, r1 846 } 847 848 // GetProfilesWithoutTeam provides a mock function with given fields: options 849 func (_m *UserStore) GetProfilesWithoutTeam(options *model.UserGetOptions) ([]*model.User, error) { 850 ret := _m.Called(options) 851 852 var r0 []*model.User 853 if rf, ok := ret.Get(0).(func(*model.UserGetOptions) []*model.User); ok { 854 r0 = rf(options) 855 } else { 856 if ret.Get(0) != nil { 857 r0 = ret.Get(0).([]*model.User) 858 } 859 } 860 861 var r1 error 862 if rf, ok := ret.Get(1).(func(*model.UserGetOptions) error); ok { 863 r1 = rf(options) 864 } else { 865 r1 = ret.Error(1) 866 } 867 868 return r0, r1 869 } 870 871 // GetRecentlyActiveUsersForTeam provides a mock function with given fields: teamId, offset, limit, viewRestrictions 872 func (_m *UserStore) GetRecentlyActiveUsersForTeam(teamId string, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, error) { 873 ret := _m.Called(teamId, offset, limit, viewRestrictions) 874 875 var r0 []*model.User 876 if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions) []*model.User); ok { 877 r0 = rf(teamId, offset, limit, viewRestrictions) 878 } else { 879 if ret.Get(0) != nil { 880 r0 = ret.Get(0).([]*model.User) 881 } 882 } 883 884 var r1 error 885 if rf, ok := ret.Get(1).(func(string, int, int, *model.ViewUsersRestrictions) error); ok { 886 r1 = rf(teamId, offset, limit, viewRestrictions) 887 } else { 888 r1 = ret.Error(1) 889 } 890 891 return r0, r1 892 } 893 894 // GetSystemAdminProfiles provides a mock function with given fields: 895 func (_m *UserStore) GetSystemAdminProfiles() (map[string]*model.User, error) { 896 ret := _m.Called() 897 898 var r0 map[string]*model.User 899 if rf, ok := ret.Get(0).(func() map[string]*model.User); ok { 900 r0 = rf() 901 } else { 902 if ret.Get(0) != nil { 903 r0 = ret.Get(0).(map[string]*model.User) 904 } 905 } 906 907 var r1 error 908 if rf, ok := ret.Get(1).(func() error); ok { 909 r1 = rf() 910 } else { 911 r1 = ret.Error(1) 912 } 913 914 return r0, r1 915 } 916 917 // GetTeamGroupUsers provides a mock function with given fields: teamID 918 func (_m *UserStore) GetTeamGroupUsers(teamID string) ([]*model.User, error) { 919 ret := _m.Called(teamID) 920 921 var r0 []*model.User 922 if rf, ok := ret.Get(0).(func(string) []*model.User); ok { 923 r0 = rf(teamID) 924 } else { 925 if ret.Get(0) != nil { 926 r0 = ret.Get(0).([]*model.User) 927 } 928 } 929 930 var r1 error 931 if rf, ok := ret.Get(1).(func(string) error); ok { 932 r1 = rf(teamID) 933 } else { 934 r1 = ret.Error(1) 935 } 936 937 return r0, r1 938 } 939 940 // GetUnreadCount provides a mock function with given fields: userId 941 func (_m *UserStore) GetUnreadCount(userId string) (int64, error) { 942 ret := _m.Called(userId) 943 944 var r0 int64 945 if rf, ok := ret.Get(0).(func(string) int64); ok { 946 r0 = rf(userId) 947 } else { 948 r0 = ret.Get(0).(int64) 949 } 950 951 var r1 error 952 if rf, ok := ret.Get(1).(func(string) error); ok { 953 r1 = rf(userId) 954 } else { 955 r1 = ret.Error(1) 956 } 957 958 return r0, r1 959 } 960 961 // GetUnreadCountForChannel provides a mock function with given fields: userId, channelId 962 func (_m *UserStore) GetUnreadCountForChannel(userId string, channelId string) (int64, error) { 963 ret := _m.Called(userId, channelId) 964 965 var r0 int64 966 if rf, ok := ret.Get(0).(func(string, string) int64); ok { 967 r0 = rf(userId, channelId) 968 } else { 969 r0 = ret.Get(0).(int64) 970 } 971 972 var r1 error 973 if rf, ok := ret.Get(1).(func(string, string) error); ok { 974 r1 = rf(userId, channelId) 975 } else { 976 r1 = ret.Error(1) 977 } 978 979 return r0, r1 980 } 981 982 // GetUsersBatchForIndexing provides a mock function with given fields: startTime, endTime, limit 983 func (_m *UserStore) GetUsersBatchForIndexing(startTime int64, endTime int64, limit int) ([]*model.UserForIndexing, error) { 984 ret := _m.Called(startTime, endTime, limit) 985 986 var r0 []*model.UserForIndexing 987 if rf, ok := ret.Get(0).(func(int64, int64, int) []*model.UserForIndexing); ok { 988 r0 = rf(startTime, endTime, limit) 989 } else { 990 if ret.Get(0) != nil { 991 r0 = ret.Get(0).([]*model.UserForIndexing) 992 } 993 } 994 995 var r1 error 996 if rf, ok := ret.Get(1).(func(int64, int64, int) error); ok { 997 r1 = rf(startTime, endTime, limit) 998 } else { 999 r1 = ret.Error(1) 1000 } 1001 1002 return r0, r1 1003 } 1004 1005 // InferSystemInstallDate provides a mock function with given fields: 1006 func (_m *UserStore) InferSystemInstallDate() (int64, error) { 1007 ret := _m.Called() 1008 1009 var r0 int64 1010 if rf, ok := ret.Get(0).(func() int64); ok { 1011 r0 = rf() 1012 } else { 1013 r0 = ret.Get(0).(int64) 1014 } 1015 1016 var r1 error 1017 if rf, ok := ret.Get(1).(func() error); ok { 1018 r1 = rf() 1019 } else { 1020 r1 = ret.Error(1) 1021 } 1022 1023 return r0, r1 1024 } 1025 1026 // InvalidateProfileCacheForUser provides a mock function with given fields: userId 1027 func (_m *UserStore) InvalidateProfileCacheForUser(userId string) { 1028 _m.Called(userId) 1029 } 1030 1031 // InvalidateProfilesInChannelCache provides a mock function with given fields: channelId 1032 func (_m *UserStore) InvalidateProfilesInChannelCache(channelId string) { 1033 _m.Called(channelId) 1034 } 1035 1036 // InvalidateProfilesInChannelCacheByUser provides a mock function with given fields: userId 1037 func (_m *UserStore) InvalidateProfilesInChannelCacheByUser(userId string) { 1038 _m.Called(userId) 1039 } 1040 1041 // PermanentDelete provides a mock function with given fields: userId 1042 func (_m *UserStore) PermanentDelete(userId string) error { 1043 ret := _m.Called(userId) 1044 1045 var r0 error 1046 if rf, ok := ret.Get(0).(func(string) error); ok { 1047 r0 = rf(userId) 1048 } else { 1049 r0 = ret.Error(0) 1050 } 1051 1052 return r0 1053 } 1054 1055 // PromoteGuestToUser provides a mock function with given fields: userID 1056 func (_m *UserStore) PromoteGuestToUser(userID string) error { 1057 ret := _m.Called(userID) 1058 1059 var r0 error 1060 if rf, ok := ret.Get(0).(func(string) error); ok { 1061 r0 = rf(userID) 1062 } else { 1063 r0 = ret.Error(0) 1064 } 1065 1066 return r0 1067 } 1068 1069 // ResetLastPictureUpdate provides a mock function with given fields: userId 1070 func (_m *UserStore) ResetLastPictureUpdate(userId string) error { 1071 ret := _m.Called(userId) 1072 1073 var r0 error 1074 if rf, ok := ret.Get(0).(func(string) error); ok { 1075 r0 = rf(userId) 1076 } else { 1077 r0 = ret.Error(0) 1078 } 1079 1080 return r0 1081 } 1082 1083 // Save provides a mock function with given fields: user 1084 func (_m *UserStore) Save(user *model.User) (*model.User, error) { 1085 ret := _m.Called(user) 1086 1087 var r0 *model.User 1088 if rf, ok := ret.Get(0).(func(*model.User) *model.User); ok { 1089 r0 = rf(user) 1090 } else { 1091 if ret.Get(0) != nil { 1092 r0 = ret.Get(0).(*model.User) 1093 } 1094 } 1095 1096 var r1 error 1097 if rf, ok := ret.Get(1).(func(*model.User) error); ok { 1098 r1 = rf(user) 1099 } else { 1100 r1 = ret.Error(1) 1101 } 1102 1103 return r0, r1 1104 } 1105 1106 // Search provides a mock function with given fields: teamId, term, options 1107 func (_m *UserStore) Search(teamId string, term string, options *model.UserSearchOptions) ([]*model.User, error) { 1108 ret := _m.Called(teamId, term, options) 1109 1110 var r0 []*model.User 1111 if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) []*model.User); ok { 1112 r0 = rf(teamId, term, options) 1113 } else { 1114 if ret.Get(0) != nil { 1115 r0 = ret.Get(0).([]*model.User) 1116 } 1117 } 1118 1119 var r1 error 1120 if rf, ok := ret.Get(1).(func(string, string, *model.UserSearchOptions) error); ok { 1121 r1 = rf(teamId, term, options) 1122 } else { 1123 r1 = ret.Error(1) 1124 } 1125 1126 return r0, r1 1127 } 1128 1129 // SearchInChannel provides a mock function with given fields: channelId, term, options 1130 func (_m *UserStore) SearchInChannel(channelId string, term string, options *model.UserSearchOptions) ([]*model.User, error) { 1131 ret := _m.Called(channelId, term, options) 1132 1133 var r0 []*model.User 1134 if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) []*model.User); ok { 1135 r0 = rf(channelId, term, options) 1136 } else { 1137 if ret.Get(0) != nil { 1138 r0 = ret.Get(0).([]*model.User) 1139 } 1140 } 1141 1142 var r1 error 1143 if rf, ok := ret.Get(1).(func(string, string, *model.UserSearchOptions) error); ok { 1144 r1 = rf(channelId, term, options) 1145 } else { 1146 r1 = ret.Error(1) 1147 } 1148 1149 return r0, r1 1150 } 1151 1152 // SearchInGroup provides a mock function with given fields: groupID, term, options 1153 func (_m *UserStore) SearchInGroup(groupID string, term string, options *model.UserSearchOptions) ([]*model.User, error) { 1154 ret := _m.Called(groupID, term, options) 1155 1156 var r0 []*model.User 1157 if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) []*model.User); ok { 1158 r0 = rf(groupID, term, options) 1159 } else { 1160 if ret.Get(0) != nil { 1161 r0 = ret.Get(0).([]*model.User) 1162 } 1163 } 1164 1165 var r1 error 1166 if rf, ok := ret.Get(1).(func(string, string, *model.UserSearchOptions) error); ok { 1167 r1 = rf(groupID, term, options) 1168 } else { 1169 r1 = ret.Error(1) 1170 } 1171 1172 return r0, r1 1173 } 1174 1175 // SearchNotInChannel provides a mock function with given fields: teamId, channelId, term, options 1176 func (_m *UserStore) SearchNotInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) ([]*model.User, error) { 1177 ret := _m.Called(teamId, channelId, term, options) 1178 1179 var r0 []*model.User 1180 if rf, ok := ret.Get(0).(func(string, string, string, *model.UserSearchOptions) []*model.User); ok { 1181 r0 = rf(teamId, channelId, term, options) 1182 } else { 1183 if ret.Get(0) != nil { 1184 r0 = ret.Get(0).([]*model.User) 1185 } 1186 } 1187 1188 var r1 error 1189 if rf, ok := ret.Get(1).(func(string, string, string, *model.UserSearchOptions) error); ok { 1190 r1 = rf(teamId, channelId, term, options) 1191 } else { 1192 r1 = ret.Error(1) 1193 } 1194 1195 return r0, r1 1196 } 1197 1198 // SearchNotInTeam provides a mock function with given fields: notInTeamId, term, options 1199 func (_m *UserStore) SearchNotInTeam(notInTeamId string, term string, options *model.UserSearchOptions) ([]*model.User, error) { 1200 ret := _m.Called(notInTeamId, term, options) 1201 1202 var r0 []*model.User 1203 if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) []*model.User); ok { 1204 r0 = rf(notInTeamId, term, options) 1205 } else { 1206 if ret.Get(0) != nil { 1207 r0 = ret.Get(0).([]*model.User) 1208 } 1209 } 1210 1211 var r1 error 1212 if rf, ok := ret.Get(1).(func(string, string, *model.UserSearchOptions) error); ok { 1213 r1 = rf(notInTeamId, term, options) 1214 } else { 1215 r1 = ret.Error(1) 1216 } 1217 1218 return r0, r1 1219 } 1220 1221 // SearchWithoutTeam provides a mock function with given fields: term, options 1222 func (_m *UserStore) SearchWithoutTeam(term string, options *model.UserSearchOptions) ([]*model.User, error) { 1223 ret := _m.Called(term, options) 1224 1225 var r0 []*model.User 1226 if rf, ok := ret.Get(0).(func(string, *model.UserSearchOptions) []*model.User); ok { 1227 r0 = rf(term, options) 1228 } else { 1229 if ret.Get(0) != nil { 1230 r0 = ret.Get(0).([]*model.User) 1231 } 1232 } 1233 1234 var r1 error 1235 if rf, ok := ret.Get(1).(func(string, *model.UserSearchOptions) error); ok { 1236 r1 = rf(term, options) 1237 } else { 1238 r1 = ret.Error(1) 1239 } 1240 1241 return r0, r1 1242 } 1243 1244 // Update provides a mock function with given fields: user, allowRoleUpdate 1245 func (_m *UserStore) Update(user *model.User, allowRoleUpdate bool) (*model.UserUpdate, error) { 1246 ret := _m.Called(user, allowRoleUpdate) 1247 1248 var r0 *model.UserUpdate 1249 if rf, ok := ret.Get(0).(func(*model.User, bool) *model.UserUpdate); ok { 1250 r0 = rf(user, allowRoleUpdate) 1251 } else { 1252 if ret.Get(0) != nil { 1253 r0 = ret.Get(0).(*model.UserUpdate) 1254 } 1255 } 1256 1257 var r1 error 1258 if rf, ok := ret.Get(1).(func(*model.User, bool) error); ok { 1259 r1 = rf(user, allowRoleUpdate) 1260 } else { 1261 r1 = ret.Error(1) 1262 } 1263 1264 return r0, r1 1265 } 1266 1267 // UpdateAuthData provides a mock function with given fields: userId, service, authData, email, resetMfa 1268 func (_m *UserStore) UpdateAuthData(userId string, service string, authData *string, email string, resetMfa bool) (string, error) { 1269 ret := _m.Called(userId, service, authData, email, resetMfa) 1270 1271 var r0 string 1272 if rf, ok := ret.Get(0).(func(string, string, *string, string, bool) string); ok { 1273 r0 = rf(userId, service, authData, email, resetMfa) 1274 } else { 1275 r0 = ret.Get(0).(string) 1276 } 1277 1278 var r1 error 1279 if rf, ok := ret.Get(1).(func(string, string, *string, string, bool) error); ok { 1280 r1 = rf(userId, service, authData, email, resetMfa) 1281 } else { 1282 r1 = ret.Error(1) 1283 } 1284 1285 return r0, r1 1286 } 1287 1288 // UpdateFailedPasswordAttempts provides a mock function with given fields: userId, attempts 1289 func (_m *UserStore) UpdateFailedPasswordAttempts(userId string, attempts int) error { 1290 ret := _m.Called(userId, attempts) 1291 1292 var r0 error 1293 if rf, ok := ret.Get(0).(func(string, int) error); ok { 1294 r0 = rf(userId, attempts) 1295 } else { 1296 r0 = ret.Error(0) 1297 } 1298 1299 return r0 1300 } 1301 1302 // UpdateLastPictureUpdate provides a mock function with given fields: userId 1303 func (_m *UserStore) UpdateLastPictureUpdate(userId string) error { 1304 ret := _m.Called(userId) 1305 1306 var r0 error 1307 if rf, ok := ret.Get(0).(func(string) error); ok { 1308 r0 = rf(userId) 1309 } else { 1310 r0 = ret.Error(0) 1311 } 1312 1313 return r0 1314 } 1315 1316 // UpdateMfaActive provides a mock function with given fields: userId, active 1317 func (_m *UserStore) UpdateMfaActive(userId string, active bool) error { 1318 ret := _m.Called(userId, active) 1319 1320 var r0 error 1321 if rf, ok := ret.Get(0).(func(string, bool) error); ok { 1322 r0 = rf(userId, active) 1323 } else { 1324 r0 = ret.Error(0) 1325 } 1326 1327 return r0 1328 } 1329 1330 // UpdateMfaSecret provides a mock function with given fields: userId, secret 1331 func (_m *UserStore) UpdateMfaSecret(userId string, secret string) error { 1332 ret := _m.Called(userId, secret) 1333 1334 var r0 error 1335 if rf, ok := ret.Get(0).(func(string, string) error); ok { 1336 r0 = rf(userId, secret) 1337 } else { 1338 r0 = ret.Error(0) 1339 } 1340 1341 return r0 1342 } 1343 1344 // UpdatePassword provides a mock function with given fields: userId, newPassword 1345 func (_m *UserStore) UpdatePassword(userId string, newPassword string) error { 1346 ret := _m.Called(userId, newPassword) 1347 1348 var r0 error 1349 if rf, ok := ret.Get(0).(func(string, string) error); ok { 1350 r0 = rf(userId, newPassword) 1351 } else { 1352 r0 = ret.Error(0) 1353 } 1354 1355 return r0 1356 } 1357 1358 // UpdateUpdateAt provides a mock function with given fields: userId 1359 func (_m *UserStore) UpdateUpdateAt(userId string) (int64, error) { 1360 ret := _m.Called(userId) 1361 1362 var r0 int64 1363 if rf, ok := ret.Get(0).(func(string) int64); ok { 1364 r0 = rf(userId) 1365 } else { 1366 r0 = ret.Get(0).(int64) 1367 } 1368 1369 var r1 error 1370 if rf, ok := ret.Get(1).(func(string) error); ok { 1371 r1 = rf(userId) 1372 } else { 1373 r1 = ret.Error(1) 1374 } 1375 1376 return r0, r1 1377 } 1378 1379 // VerifyEmail provides a mock function with given fields: userId, email 1380 func (_m *UserStore) VerifyEmail(userId string, email string) (string, error) { 1381 ret := _m.Called(userId, email) 1382 1383 var r0 string 1384 if rf, ok := ret.Get(0).(func(string, string) string); ok { 1385 r0 = rf(userId, email) 1386 } else { 1387 r0 = ret.Get(0).(string) 1388 } 1389 1390 var r1 error 1391 if rf, ok := ret.Get(1).(func(string, string) error); ok { 1392 r1 = rf(userId, email) 1393 } else { 1394 r1 = ret.Error(1) 1395 } 1396 1397 return r0, r1 1398 }