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