github.com/masterhung0112/hk_server/v5@v5.0.0-20220302090640-ec71aef15e1c/store/storetest/mocks/UserStore.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 // 'Regenerate 4 5 package mocks 6 7 import ( 8 context "context" 9 10 model "github.com/masterhung0112/hk_server/v5/model" 11 mock "github.com/stretchr/testify/mock" 12 13 store "github.com/masterhung0112/hk_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 // ResetAuthDataToEmailForUsers provides a mock function with given fields: service, userIDs, includeDeleted, dryRun 1070 func (_m *UserStore) ResetAuthDataToEmailForUsers(service string, userIDs []string, includeDeleted bool, dryRun bool) (int, error) { 1071 ret := _m.Called(service, userIDs, includeDeleted, dryRun) 1072 1073 var r0 int 1074 if rf, ok := ret.Get(0).(func(string, []string, bool, bool) int); ok { 1075 r0 = rf(service, userIDs, includeDeleted, dryRun) 1076 } else { 1077 r0 = ret.Get(0).(int) 1078 } 1079 1080 var r1 error 1081 if rf, ok := ret.Get(1).(func(string, []string, bool, bool) error); ok { 1082 r1 = rf(service, userIDs, includeDeleted, dryRun) 1083 } else { 1084 r1 = ret.Error(1) 1085 } 1086 1087 return r0, r1 1088 } 1089 1090 // ResetLastPictureUpdate provides a mock function with given fields: userID 1091 func (_m *UserStore) ResetLastPictureUpdate(userID string) error { 1092 ret := _m.Called(userID) 1093 1094 var r0 error 1095 if rf, ok := ret.Get(0).(func(string) error); ok { 1096 r0 = rf(userID) 1097 } else { 1098 r0 = ret.Error(0) 1099 } 1100 1101 return r0 1102 } 1103 1104 // Save provides a mock function with given fields: user 1105 func (_m *UserStore) Save(user *model.User) (*model.User, error) { 1106 ret := _m.Called(user) 1107 1108 var r0 *model.User 1109 if rf, ok := ret.Get(0).(func(*model.User) *model.User); ok { 1110 r0 = rf(user) 1111 } else { 1112 if ret.Get(0) != nil { 1113 r0 = ret.Get(0).(*model.User) 1114 } 1115 } 1116 1117 var r1 error 1118 if rf, ok := ret.Get(1).(func(*model.User) error); ok { 1119 r1 = rf(user) 1120 } else { 1121 r1 = ret.Error(1) 1122 } 1123 1124 return r0, r1 1125 } 1126 1127 // Search provides a mock function with given fields: teamID, term, options 1128 func (_m *UserStore) Search(teamID string, term string, options *model.UserSearchOptions) ([]*model.User, error) { 1129 ret := _m.Called(teamID, term, options) 1130 1131 var r0 []*model.User 1132 if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) []*model.User); ok { 1133 r0 = rf(teamID, term, options) 1134 } else { 1135 if ret.Get(0) != nil { 1136 r0 = ret.Get(0).([]*model.User) 1137 } 1138 } 1139 1140 var r1 error 1141 if rf, ok := ret.Get(1).(func(string, string, *model.UserSearchOptions) error); ok { 1142 r1 = rf(teamID, term, options) 1143 } else { 1144 r1 = ret.Error(1) 1145 } 1146 1147 return r0, r1 1148 } 1149 1150 // SearchInChannel provides a mock function with given fields: channelID, term, options 1151 func (_m *UserStore) SearchInChannel(channelID string, term string, options *model.UserSearchOptions) ([]*model.User, error) { 1152 ret := _m.Called(channelID, term, options) 1153 1154 var r0 []*model.User 1155 if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) []*model.User); ok { 1156 r0 = rf(channelID, term, options) 1157 } else { 1158 if ret.Get(0) != nil { 1159 r0 = ret.Get(0).([]*model.User) 1160 } 1161 } 1162 1163 var r1 error 1164 if rf, ok := ret.Get(1).(func(string, string, *model.UserSearchOptions) error); ok { 1165 r1 = rf(channelID, term, options) 1166 } else { 1167 r1 = ret.Error(1) 1168 } 1169 1170 return r0, r1 1171 } 1172 1173 // SearchInGroup provides a mock function with given fields: groupID, term, options 1174 func (_m *UserStore) SearchInGroup(groupID string, term string, options *model.UserSearchOptions) ([]*model.User, error) { 1175 ret := _m.Called(groupID, term, options) 1176 1177 var r0 []*model.User 1178 if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) []*model.User); ok { 1179 r0 = rf(groupID, term, options) 1180 } else { 1181 if ret.Get(0) != nil { 1182 r0 = ret.Get(0).([]*model.User) 1183 } 1184 } 1185 1186 var r1 error 1187 if rf, ok := ret.Get(1).(func(string, string, *model.UserSearchOptions) error); ok { 1188 r1 = rf(groupID, term, options) 1189 } else { 1190 r1 = ret.Error(1) 1191 } 1192 1193 return r0, r1 1194 } 1195 1196 // SearchNotInChannel provides a mock function with given fields: teamID, channelID, term, options 1197 func (_m *UserStore) SearchNotInChannel(teamID string, channelID string, term string, options *model.UserSearchOptions) ([]*model.User, error) { 1198 ret := _m.Called(teamID, channelID, term, options) 1199 1200 var r0 []*model.User 1201 if rf, ok := ret.Get(0).(func(string, string, string, *model.UserSearchOptions) []*model.User); ok { 1202 r0 = rf(teamID, channelID, term, options) 1203 } else { 1204 if ret.Get(0) != nil { 1205 r0 = ret.Get(0).([]*model.User) 1206 } 1207 } 1208 1209 var r1 error 1210 if rf, ok := ret.Get(1).(func(string, string, string, *model.UserSearchOptions) error); ok { 1211 r1 = rf(teamID, channelID, term, options) 1212 } else { 1213 r1 = ret.Error(1) 1214 } 1215 1216 return r0, r1 1217 } 1218 1219 // SearchNotInTeam provides a mock function with given fields: notInTeamID, term, options 1220 func (_m *UserStore) SearchNotInTeam(notInTeamID string, term string, options *model.UserSearchOptions) ([]*model.User, error) { 1221 ret := _m.Called(notInTeamID, term, options) 1222 1223 var r0 []*model.User 1224 if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) []*model.User); ok { 1225 r0 = rf(notInTeamID, term, options) 1226 } else { 1227 if ret.Get(0) != nil { 1228 r0 = ret.Get(0).([]*model.User) 1229 } 1230 } 1231 1232 var r1 error 1233 if rf, ok := ret.Get(1).(func(string, string, *model.UserSearchOptions) error); ok { 1234 r1 = rf(notInTeamID, term, options) 1235 } else { 1236 r1 = ret.Error(1) 1237 } 1238 1239 return r0, r1 1240 } 1241 1242 // SearchWithoutTeam provides a mock function with given fields: term, options 1243 func (_m *UserStore) SearchWithoutTeam(term string, options *model.UserSearchOptions) ([]*model.User, error) { 1244 ret := _m.Called(term, options) 1245 1246 var r0 []*model.User 1247 if rf, ok := ret.Get(0).(func(string, *model.UserSearchOptions) []*model.User); ok { 1248 r0 = rf(term, options) 1249 } else { 1250 if ret.Get(0) != nil { 1251 r0 = ret.Get(0).([]*model.User) 1252 } 1253 } 1254 1255 var r1 error 1256 if rf, ok := ret.Get(1).(func(string, *model.UserSearchOptions) error); ok { 1257 r1 = rf(term, options) 1258 } else { 1259 r1 = ret.Error(1) 1260 } 1261 1262 return r0, r1 1263 } 1264 1265 // Update provides a mock function with given fields: user, allowRoleUpdate 1266 func (_m *UserStore) Update(user *model.User, allowRoleUpdate bool) (*model.UserUpdate, error) { 1267 ret := _m.Called(user, allowRoleUpdate) 1268 1269 var r0 *model.UserUpdate 1270 if rf, ok := ret.Get(0).(func(*model.User, bool) *model.UserUpdate); ok { 1271 r0 = rf(user, allowRoleUpdate) 1272 } else { 1273 if ret.Get(0) != nil { 1274 r0 = ret.Get(0).(*model.UserUpdate) 1275 } 1276 } 1277 1278 var r1 error 1279 if rf, ok := ret.Get(1).(func(*model.User, bool) error); ok { 1280 r1 = rf(user, allowRoleUpdate) 1281 } else { 1282 r1 = ret.Error(1) 1283 } 1284 1285 return r0, r1 1286 } 1287 1288 // UpdateAuthData provides a mock function with given fields: userID, service, authData, email, resetMfa 1289 func (_m *UserStore) UpdateAuthData(userID string, service string, authData *string, email string, resetMfa bool) (string, error) { 1290 ret := _m.Called(userID, service, authData, email, resetMfa) 1291 1292 var r0 string 1293 if rf, ok := ret.Get(0).(func(string, string, *string, string, bool) string); ok { 1294 r0 = rf(userID, service, authData, email, resetMfa) 1295 } else { 1296 r0 = ret.Get(0).(string) 1297 } 1298 1299 var r1 error 1300 if rf, ok := ret.Get(1).(func(string, string, *string, string, bool) error); ok { 1301 r1 = rf(userID, service, authData, email, resetMfa) 1302 } else { 1303 r1 = ret.Error(1) 1304 } 1305 1306 return r0, r1 1307 } 1308 1309 // UpdateFailedPasswordAttempts provides a mock function with given fields: userID, attempts 1310 func (_m *UserStore) UpdateFailedPasswordAttempts(userID string, attempts int) error { 1311 ret := _m.Called(userID, attempts) 1312 1313 var r0 error 1314 if rf, ok := ret.Get(0).(func(string, int) error); ok { 1315 r0 = rf(userID, attempts) 1316 } else { 1317 r0 = ret.Error(0) 1318 } 1319 1320 return r0 1321 } 1322 1323 // UpdateLastPictureUpdate provides a mock function with given fields: userID 1324 func (_m *UserStore) UpdateLastPictureUpdate(userID string) error { 1325 ret := _m.Called(userID) 1326 1327 var r0 error 1328 if rf, ok := ret.Get(0).(func(string) error); ok { 1329 r0 = rf(userID) 1330 } else { 1331 r0 = ret.Error(0) 1332 } 1333 1334 return r0 1335 } 1336 1337 // UpdateMfaActive provides a mock function with given fields: userID, active 1338 func (_m *UserStore) UpdateMfaActive(userID string, active bool) error { 1339 ret := _m.Called(userID, active) 1340 1341 var r0 error 1342 if rf, ok := ret.Get(0).(func(string, bool) error); ok { 1343 r0 = rf(userID, active) 1344 } else { 1345 r0 = ret.Error(0) 1346 } 1347 1348 return r0 1349 } 1350 1351 // UpdateMfaSecret provides a mock function with given fields: userID, secret 1352 func (_m *UserStore) UpdateMfaSecret(userID string, secret string) error { 1353 ret := _m.Called(userID, secret) 1354 1355 var r0 error 1356 if rf, ok := ret.Get(0).(func(string, string) error); ok { 1357 r0 = rf(userID, secret) 1358 } else { 1359 r0 = ret.Error(0) 1360 } 1361 1362 return r0 1363 } 1364 1365 // UpdatePassword provides a mock function with given fields: userID, newPassword 1366 func (_m *UserStore) UpdatePassword(userID string, newPassword string) error { 1367 ret := _m.Called(userID, newPassword) 1368 1369 var r0 error 1370 if rf, ok := ret.Get(0).(func(string, string) error); ok { 1371 r0 = rf(userID, newPassword) 1372 } else { 1373 r0 = ret.Error(0) 1374 } 1375 1376 return r0 1377 } 1378 1379 // UpdateUpdateAt provides a mock function with given fields: userID 1380 func (_m *UserStore) UpdateUpdateAt(userID string) (int64, error) { 1381 ret := _m.Called(userID) 1382 1383 var r0 int64 1384 if rf, ok := ret.Get(0).(func(string) int64); ok { 1385 r0 = rf(userID) 1386 } else { 1387 r0 = ret.Get(0).(int64) 1388 } 1389 1390 var r1 error 1391 if rf, ok := ret.Get(1).(func(string) error); ok { 1392 r1 = rf(userID) 1393 } else { 1394 r1 = ret.Error(1) 1395 } 1396 1397 return r0, r1 1398 } 1399 1400 // VerifyEmail provides a mock function with given fields: userID, email 1401 func (_m *UserStore) VerifyEmail(userID string, email string) (string, error) { 1402 ret := _m.Called(userID, email) 1403 1404 var r0 string 1405 if rf, ok := ret.Get(0).(func(string, string) string); ok { 1406 r0 = rf(userID, email) 1407 } else { 1408 r0 = ret.Get(0).(string) 1409 } 1410 1411 var r1 error 1412 if rf, ok := ret.Get(1).(func(string, string) error); ok { 1413 r1 = rf(userID, email) 1414 } else { 1415 r1 = ret.Error(1) 1416 } 1417 1418 return r0, r1 1419 }