github.com/xzl8028/xenia-server@v0.0.0-20190809101854-18450a97da63/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 mock "github.com/stretchr/testify/mock" 8 import model "github.com/xzl8028/xenia-server/model" 9 import store "github.com/xzl8028/xenia-server/store" 10 11 // UserStore is an autogenerated mock type for the UserStore type 12 type UserStore struct { 13 mock.Mock 14 } 15 16 // AnalyticsActiveCount provides a mock function with given fields: time 17 func (_m *UserStore) AnalyticsActiveCount(time int64) store.StoreChannel { 18 ret := _m.Called(time) 19 20 var r0 store.StoreChannel 21 if rf, ok := ret.Get(0).(func(int64) store.StoreChannel); ok { 22 r0 = rf(time) 23 } else { 24 if ret.Get(0) != nil { 25 r0 = ret.Get(0).(store.StoreChannel) 26 } 27 } 28 29 return r0 30 } 31 32 // AnalyticsGetInactiveUsersCount provides a mock function with given fields: 33 func (_m *UserStore) AnalyticsGetInactiveUsersCount() (int64, *model.AppError) { 34 ret := _m.Called() 35 36 var r0 int64 37 if rf, ok := ret.Get(0).(func() int64); ok { 38 r0 = rf() 39 } else { 40 r0 = ret.Get(0).(int64) 41 } 42 43 var r1 *model.AppError 44 if rf, ok := ret.Get(1).(func() *model.AppError); ok { 45 r1 = rf() 46 } else { 47 if ret.Get(1) != nil { 48 r1 = ret.Get(1).(*model.AppError) 49 } 50 } 51 52 return r0, r1 53 } 54 55 // AnalyticsGetSystemAdminCount provides a mock function with given fields: 56 func (_m *UserStore) AnalyticsGetSystemAdminCount() store.StoreChannel { 57 ret := _m.Called() 58 59 var r0 store.StoreChannel 60 if rf, ok := ret.Get(0).(func() store.StoreChannel); ok { 61 r0 = rf() 62 } else { 63 if ret.Get(0) != nil { 64 r0 = ret.Get(0).(store.StoreChannel) 65 } 66 } 67 68 return r0 69 } 70 71 // ClearAllCustomRoleAssignments provides a mock function with given fields: 72 func (_m *UserStore) ClearAllCustomRoleAssignments() store.StoreChannel { 73 ret := _m.Called() 74 75 var r0 store.StoreChannel 76 if rf, ok := ret.Get(0).(func() store.StoreChannel); ok { 77 r0 = rf() 78 } else { 79 if ret.Get(0) != nil { 80 r0 = ret.Get(0).(store.StoreChannel) 81 } 82 } 83 84 return r0 85 } 86 87 // ClearCaches provides a mock function with given fields: 88 func (_m *UserStore) ClearCaches() { 89 _m.Called() 90 } 91 92 // Count provides a mock function with given fields: options 93 func (_m *UserStore) Count(options model.UserCountOptions) (int64, *model.AppError) { 94 ret := _m.Called(options) 95 96 var r0 int64 97 if rf, ok := ret.Get(0).(func(model.UserCountOptions) int64); ok { 98 r0 = rf(options) 99 } else { 100 r0 = ret.Get(0).(int64) 101 } 102 103 var r1 *model.AppError 104 if rf, ok := ret.Get(1).(func(model.UserCountOptions) *model.AppError); ok { 105 r1 = rf(options) 106 } else { 107 if ret.Get(1) != nil { 108 r1 = ret.Get(1).(*model.AppError) 109 } 110 } 111 112 return r0, r1 113 } 114 115 // Get provides a mock function with given fields: id 116 func (_m *UserStore) Get(id string) (*model.User, *model.AppError) { 117 ret := _m.Called(id) 118 119 var r0 *model.User 120 if rf, ok := ret.Get(0).(func(string) *model.User); ok { 121 r0 = rf(id) 122 } else { 123 if ret.Get(0) != nil { 124 r0 = ret.Get(0).(*model.User) 125 } 126 } 127 128 var r1 *model.AppError 129 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 130 r1 = rf(id) 131 } else { 132 if ret.Get(1) != nil { 133 r1 = ret.Get(1).(*model.AppError) 134 } 135 } 136 137 return r0, r1 138 } 139 140 // GetAll provides a mock function with given fields: 141 func (_m *UserStore) GetAll() store.StoreChannel { 142 ret := _m.Called() 143 144 var r0 store.StoreChannel 145 if rf, ok := ret.Get(0).(func() store.StoreChannel); ok { 146 r0 = rf() 147 } else { 148 if ret.Get(0) != nil { 149 r0 = ret.Get(0).(store.StoreChannel) 150 } 151 } 152 153 return r0 154 } 155 156 // GetAllAfter provides a mock function with given fields: limit, afterId 157 func (_m *UserStore) GetAllAfter(limit int, afterId string) ([]*model.User, *model.AppError) { 158 ret := _m.Called(limit, afterId) 159 160 var r0 []*model.User 161 if rf, ok := ret.Get(0).(func(int, string) []*model.User); ok { 162 r0 = rf(limit, afterId) 163 } else { 164 if ret.Get(0) != nil { 165 r0 = ret.Get(0).([]*model.User) 166 } 167 } 168 169 var r1 *model.AppError 170 if rf, ok := ret.Get(1).(func(int, string) *model.AppError); ok { 171 r1 = rf(limit, afterId) 172 } else { 173 if ret.Get(1) != nil { 174 r1 = ret.Get(1).(*model.AppError) 175 } 176 } 177 178 return r0, r1 179 } 180 181 // GetAllProfiles provides a mock function with given fields: options 182 func (_m *UserStore) GetAllProfiles(options *model.UserGetOptions) store.StoreChannel { 183 ret := _m.Called(options) 184 185 var r0 store.StoreChannel 186 if rf, ok := ret.Get(0).(func(*model.UserGetOptions) store.StoreChannel); ok { 187 r0 = rf(options) 188 } else { 189 if ret.Get(0) != nil { 190 r0 = ret.Get(0).(store.StoreChannel) 191 } 192 } 193 194 return r0 195 } 196 197 // GetAllProfilesInChannel provides a mock function with given fields: channelId, allowFromCache 198 func (_m *UserStore) GetAllProfilesInChannel(channelId string, allowFromCache bool) store.StoreChannel { 199 ret := _m.Called(channelId, allowFromCache) 200 201 var r0 store.StoreChannel 202 if rf, ok := ret.Get(0).(func(string, bool) store.StoreChannel); ok { 203 r0 = rf(channelId, allowFromCache) 204 } else { 205 if ret.Get(0) != nil { 206 r0 = ret.Get(0).(store.StoreChannel) 207 } 208 } 209 210 return r0 211 } 212 213 // GetAllUsingAuthService provides a mock function with given fields: authService 214 func (_m *UserStore) GetAllUsingAuthService(authService string) ([]*model.User, *model.AppError) { 215 ret := _m.Called(authService) 216 217 var r0 []*model.User 218 if rf, ok := ret.Get(0).(func(string) []*model.User); ok { 219 r0 = rf(authService) 220 } else { 221 if ret.Get(0) != nil { 222 r0 = ret.Get(0).([]*model.User) 223 } 224 } 225 226 var r1 *model.AppError 227 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 228 r1 = rf(authService) 229 } else { 230 if ret.Get(1) != nil { 231 r1 = ret.Get(1).(*model.AppError) 232 } 233 } 234 235 return r0, r1 236 } 237 238 // GetAnyUnreadPostCountForChannel provides a mock function with given fields: userId, channelId 239 func (_m *UserStore) GetAnyUnreadPostCountForChannel(userId string, channelId string) (int64, *model.AppError) { 240 ret := _m.Called(userId, channelId) 241 242 var r0 int64 243 if rf, ok := ret.Get(0).(func(string, string) int64); ok { 244 r0 = rf(userId, channelId) 245 } else { 246 r0 = ret.Get(0).(int64) 247 } 248 249 var r1 *model.AppError 250 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 251 r1 = rf(userId, channelId) 252 } else { 253 if ret.Get(1) != nil { 254 r1 = ret.Get(1).(*model.AppError) 255 } 256 } 257 258 return r0, r1 259 } 260 261 // GetByAuth provides a mock function with given fields: authData, authService 262 func (_m *UserStore) GetByAuth(authData *string, authService string) (*model.User, *model.AppError) { 263 ret := _m.Called(authData, authService) 264 265 var r0 *model.User 266 if rf, ok := ret.Get(0).(func(*string, string) *model.User); ok { 267 r0 = rf(authData, authService) 268 } else { 269 if ret.Get(0) != nil { 270 r0 = ret.Get(0).(*model.User) 271 } 272 } 273 274 var r1 *model.AppError 275 if rf, ok := ret.Get(1).(func(*string, string) *model.AppError); ok { 276 r1 = rf(authData, authService) 277 } else { 278 if ret.Get(1) != nil { 279 r1 = ret.Get(1).(*model.AppError) 280 } 281 } 282 283 return r0, r1 284 } 285 286 // GetByEmail provides a mock function with given fields: email 287 func (_m *UserStore) GetByEmail(email string) (*model.User, *model.AppError) { 288 ret := _m.Called(email) 289 290 var r0 *model.User 291 if rf, ok := ret.Get(0).(func(string) *model.User); ok { 292 r0 = rf(email) 293 } else { 294 if ret.Get(0) != nil { 295 r0 = ret.Get(0).(*model.User) 296 } 297 } 298 299 var r1 *model.AppError 300 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 301 r1 = rf(email) 302 } else { 303 if ret.Get(1) != nil { 304 r1 = ret.Get(1).(*model.AppError) 305 } 306 } 307 308 return r0, r1 309 } 310 311 // GetByUsername provides a mock function with given fields: username 312 func (_m *UserStore) GetByUsername(username string) store.StoreChannel { 313 ret := _m.Called(username) 314 315 var r0 store.StoreChannel 316 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 317 r0 = rf(username) 318 } else { 319 if ret.Get(0) != nil { 320 r0 = ret.Get(0).(store.StoreChannel) 321 } 322 } 323 324 return r0 325 } 326 327 // GetChannelGroupUsers provides a mock function with given fields: channelID 328 func (_m *UserStore) GetChannelGroupUsers(channelID string) ([]*model.User, *model.AppError) { 329 ret := _m.Called(channelID) 330 331 var r0 []*model.User 332 if rf, ok := ret.Get(0).(func(string) []*model.User); ok { 333 r0 = rf(channelID) 334 } else { 335 if ret.Get(0) != nil { 336 r0 = ret.Get(0).([]*model.User) 337 } 338 } 339 340 var r1 *model.AppError 341 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 342 r1 = rf(channelID) 343 } else { 344 if ret.Get(1) != nil { 345 r1 = ret.Get(1).(*model.AppError) 346 } 347 } 348 349 return r0, r1 350 } 351 352 // GetEtagForAllProfiles provides a mock function with given fields: 353 func (_m *UserStore) GetEtagForAllProfiles() store.StoreChannel { 354 ret := _m.Called() 355 356 var r0 store.StoreChannel 357 if rf, ok := ret.Get(0).(func() store.StoreChannel); ok { 358 r0 = rf() 359 } else { 360 if ret.Get(0) != nil { 361 r0 = ret.Get(0).(store.StoreChannel) 362 } 363 } 364 365 return r0 366 } 367 368 // GetEtagForProfiles provides a mock function with given fields: teamId 369 func (_m *UserStore) GetEtagForProfiles(teamId string) store.StoreChannel { 370 ret := _m.Called(teamId) 371 372 var r0 store.StoreChannel 373 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 374 r0 = rf(teamId) 375 } else { 376 if ret.Get(0) != nil { 377 r0 = ret.Get(0).(store.StoreChannel) 378 } 379 } 380 381 return r0 382 } 383 384 // GetEtagForProfilesNotInTeam provides a mock function with given fields: teamId 385 func (_m *UserStore) GetEtagForProfilesNotInTeam(teamId string) store.StoreChannel { 386 ret := _m.Called(teamId) 387 388 var r0 store.StoreChannel 389 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 390 r0 = rf(teamId) 391 } else { 392 if ret.Get(0) != nil { 393 r0 = ret.Get(0).(store.StoreChannel) 394 } 395 } 396 397 return r0 398 } 399 400 // GetForLogin provides a mock function with given fields: loginId, allowSignInWithUsername, allowSignInWithEmail 401 func (_m *UserStore) GetForLogin(loginId string, allowSignInWithUsername bool, allowSignInWithEmail bool) store.StoreChannel { 402 ret := _m.Called(loginId, allowSignInWithUsername, allowSignInWithEmail) 403 404 var r0 store.StoreChannel 405 if rf, ok := ret.Get(0).(func(string, bool, bool) store.StoreChannel); ok { 406 r0 = rf(loginId, allowSignInWithUsername, allowSignInWithEmail) 407 } else { 408 if ret.Get(0) != nil { 409 r0 = ret.Get(0).(store.StoreChannel) 410 } 411 } 412 413 return r0 414 } 415 416 // GetNewUsersForTeam provides a mock function with given fields: teamId, offset, limit, viewRestrictions 417 func (_m *UserStore) GetNewUsersForTeam(teamId string, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError) { 418 ret := _m.Called(teamId, offset, limit, viewRestrictions) 419 420 var r0 []*model.User 421 if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions) []*model.User); ok { 422 r0 = rf(teamId, offset, limit, viewRestrictions) 423 } else { 424 if ret.Get(0) != nil { 425 r0 = ret.Get(0).([]*model.User) 426 } 427 } 428 429 var r1 *model.AppError 430 if rf, ok := ret.Get(1).(func(string, int, int, *model.ViewUsersRestrictions) *model.AppError); ok { 431 r1 = rf(teamId, offset, limit, viewRestrictions) 432 } else { 433 if ret.Get(1) != nil { 434 r1 = ret.Get(1).(*model.AppError) 435 } 436 } 437 438 return r0, r1 439 } 440 441 // GetProfileByGroupChannelIdsForUser provides a mock function with given fields: userId, channelIds 442 func (_m *UserStore) GetProfileByGroupChannelIdsForUser(userId string, channelIds []string) (map[string][]*model.User, *model.AppError) { 443 ret := _m.Called(userId, channelIds) 444 445 var r0 map[string][]*model.User 446 if rf, ok := ret.Get(0).(func(string, []string) map[string][]*model.User); ok { 447 r0 = rf(userId, channelIds) 448 } else { 449 if ret.Get(0) != nil { 450 r0 = ret.Get(0).(map[string][]*model.User) 451 } 452 } 453 454 var r1 *model.AppError 455 if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok { 456 r1 = rf(userId, channelIds) 457 } else { 458 if ret.Get(1) != nil { 459 r1 = ret.Get(1).(*model.AppError) 460 } 461 } 462 463 return r0, r1 464 } 465 466 // GetProfileByIds provides a mock function with given fields: userIds, options, allowFromCache 467 func (_m *UserStore) GetProfileByIds(userIds []string, options *store.UserGetByIdsOpts, allowFromCache bool) store.StoreChannel { 468 ret := _m.Called(userIds, options, allowFromCache) 469 470 var r0 store.StoreChannel 471 if rf, ok := ret.Get(0).(func([]string, *store.UserGetByIdsOpts, bool) store.StoreChannel); ok { 472 r0 = rf(userIds, options, allowFromCache) 473 } else { 474 if ret.Get(0) != nil { 475 r0 = ret.Get(0).(store.StoreChannel) 476 } 477 } 478 479 return r0 480 } 481 482 // GetProfiles provides a mock function with given fields: options 483 func (_m *UserStore) GetProfiles(options *model.UserGetOptions) store.StoreChannel { 484 ret := _m.Called(options) 485 486 var r0 store.StoreChannel 487 if rf, ok := ret.Get(0).(func(*model.UserGetOptions) store.StoreChannel); ok { 488 r0 = rf(options) 489 } else { 490 if ret.Get(0) != nil { 491 r0 = ret.Get(0).(store.StoreChannel) 492 } 493 } 494 495 return r0 496 } 497 498 // GetProfilesByUsernames provides a mock function with given fields: usernames, viewRestrictions 499 func (_m *UserStore) GetProfilesByUsernames(usernames []string, viewRestrictions *model.ViewUsersRestrictions) store.StoreChannel { 500 ret := _m.Called(usernames, viewRestrictions) 501 502 var r0 store.StoreChannel 503 if rf, ok := ret.Get(0).(func([]string, *model.ViewUsersRestrictions) store.StoreChannel); ok { 504 r0 = rf(usernames, viewRestrictions) 505 } else { 506 if ret.Get(0) != nil { 507 r0 = ret.Get(0).(store.StoreChannel) 508 } 509 } 510 511 return r0 512 } 513 514 // GetProfilesInChannel provides a mock function with given fields: channelId, offset, limit 515 func (_m *UserStore) GetProfilesInChannel(channelId string, offset int, limit int) store.StoreChannel { 516 ret := _m.Called(channelId, offset, limit) 517 518 var r0 store.StoreChannel 519 if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok { 520 r0 = rf(channelId, offset, limit) 521 } else { 522 if ret.Get(0) != nil { 523 r0 = ret.Get(0).(store.StoreChannel) 524 } 525 } 526 527 return r0 528 } 529 530 // GetProfilesInChannelByStatus provides a mock function with given fields: channelId, offset, limit 531 func (_m *UserStore) GetProfilesInChannelByStatus(channelId string, offset int, limit int) store.StoreChannel { 532 ret := _m.Called(channelId, offset, limit) 533 534 var r0 store.StoreChannel 535 if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok { 536 r0 = rf(channelId, offset, limit) 537 } else { 538 if ret.Get(0) != nil { 539 r0 = ret.Get(0).(store.StoreChannel) 540 } 541 } 542 543 return r0 544 } 545 546 // GetProfilesNotInChannel provides a mock function with given fields: teamId, channelId, groupConstrained, offset, limit, viewRestrictions 547 func (_m *UserStore) GetProfilesNotInChannel(teamId string, channelId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) store.StoreChannel { 548 ret := _m.Called(teamId, channelId, groupConstrained, offset, limit, viewRestrictions) 549 550 var r0 store.StoreChannel 551 if rf, ok := ret.Get(0).(func(string, string, bool, int, int, *model.ViewUsersRestrictions) store.StoreChannel); ok { 552 r0 = rf(teamId, channelId, groupConstrained, offset, limit, viewRestrictions) 553 } else { 554 if ret.Get(0) != nil { 555 r0 = ret.Get(0).(store.StoreChannel) 556 } 557 } 558 559 return r0 560 } 561 562 // GetProfilesNotInTeam provides a mock function with given fields: teamId, groupConstrained, offset, limit, viewRestrictions 563 func (_m *UserStore) GetProfilesNotInTeam(teamId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) store.StoreChannel { 564 ret := _m.Called(teamId, groupConstrained, offset, limit, viewRestrictions) 565 566 var r0 store.StoreChannel 567 if rf, ok := ret.Get(0).(func(string, bool, int, int, *model.ViewUsersRestrictions) store.StoreChannel); ok { 568 r0 = rf(teamId, groupConstrained, offset, limit, viewRestrictions) 569 } else { 570 if ret.Get(0) != nil { 571 r0 = ret.Get(0).(store.StoreChannel) 572 } 573 } 574 575 return r0 576 } 577 578 // GetProfilesWithoutTeam provides a mock function with given fields: offset, limit, viewRestrictions 579 func (_m *UserStore) GetProfilesWithoutTeam(offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) store.StoreChannel { 580 ret := _m.Called(offset, limit, viewRestrictions) 581 582 var r0 store.StoreChannel 583 if rf, ok := ret.Get(0).(func(int, int, *model.ViewUsersRestrictions) store.StoreChannel); ok { 584 r0 = rf(offset, limit, viewRestrictions) 585 } else { 586 if ret.Get(0) != nil { 587 r0 = ret.Get(0).(store.StoreChannel) 588 } 589 } 590 591 return r0 592 } 593 594 // GetRecentlyActiveUsersForTeam provides a mock function with given fields: teamId, offset, limit, viewRestrictions 595 func (_m *UserStore) GetRecentlyActiveUsersForTeam(teamId string, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError) { 596 ret := _m.Called(teamId, offset, limit, viewRestrictions) 597 598 var r0 []*model.User 599 if rf, ok := ret.Get(0).(func(string, int, int, *model.ViewUsersRestrictions) []*model.User); ok { 600 r0 = rf(teamId, offset, limit, viewRestrictions) 601 } else { 602 if ret.Get(0) != nil { 603 r0 = ret.Get(0).([]*model.User) 604 } 605 } 606 607 var r1 *model.AppError 608 if rf, ok := ret.Get(1).(func(string, int, int, *model.ViewUsersRestrictions) *model.AppError); ok { 609 r1 = rf(teamId, offset, limit, viewRestrictions) 610 } else { 611 if ret.Get(1) != nil { 612 r1 = ret.Get(1).(*model.AppError) 613 } 614 } 615 616 return r0, r1 617 } 618 619 // GetSystemAdminProfiles provides a mock function with given fields: 620 func (_m *UserStore) GetSystemAdminProfiles() store.StoreChannel { 621 ret := _m.Called() 622 623 var r0 store.StoreChannel 624 if rf, ok := ret.Get(0).(func() store.StoreChannel); ok { 625 r0 = rf() 626 } else { 627 if ret.Get(0) != nil { 628 r0 = ret.Get(0).(store.StoreChannel) 629 } 630 } 631 632 return r0 633 } 634 635 // GetTeamGroupUsers provides a mock function with given fields: teamID 636 func (_m *UserStore) GetTeamGroupUsers(teamID string) ([]*model.User, *model.AppError) { 637 ret := _m.Called(teamID) 638 639 var r0 []*model.User 640 if rf, ok := ret.Get(0).(func(string) []*model.User); ok { 641 r0 = rf(teamID) 642 } else { 643 if ret.Get(0) != nil { 644 r0 = ret.Get(0).([]*model.User) 645 } 646 } 647 648 var r1 *model.AppError 649 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 650 r1 = rf(teamID) 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 // GetUnreadCount provides a mock function with given fields: userId 661 func (_m *UserStore) GetUnreadCount(userId string) (int64, error) { 662 ret := _m.Called(userId) 663 664 var r0 int64 665 if rf, ok := ret.Get(0).(func(string) int64); ok { 666 r0 = rf(userId) 667 } else { 668 r0 = ret.Get(0).(int64) 669 } 670 671 var r1 error 672 if rf, ok := ret.Get(1).(func(string) error); ok { 673 r1 = rf(userId) 674 } else { 675 r1 = ret.Error(1) 676 } 677 678 return r0, r1 679 } 680 681 // GetUnreadCountForChannel provides a mock function with given fields: userId, channelId 682 func (_m *UserStore) GetUnreadCountForChannel(userId string, channelId string) store.StoreChannel { 683 ret := _m.Called(userId, channelId) 684 685 var r0 store.StoreChannel 686 if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { 687 r0 = rf(userId, channelId) 688 } else { 689 if ret.Get(0) != nil { 690 r0 = ret.Get(0).(store.StoreChannel) 691 } 692 } 693 694 return r0 695 } 696 697 // GetUsersBatchForIndexing provides a mock function with given fields: startTime, endTime, limit 698 func (_m *UserStore) GetUsersBatchForIndexing(startTime int64, endTime int64, limit int) ([]*model.UserForIndexing, *model.AppError) { 699 ret := _m.Called(startTime, endTime, limit) 700 701 var r0 []*model.UserForIndexing 702 if rf, ok := ret.Get(0).(func(int64, int64, int) []*model.UserForIndexing); ok { 703 r0 = rf(startTime, endTime, limit) 704 } else { 705 if ret.Get(0) != nil { 706 r0 = ret.Get(0).([]*model.UserForIndexing) 707 } 708 } 709 710 var r1 *model.AppError 711 if rf, ok := ret.Get(1).(func(int64, int64, int) *model.AppError); ok { 712 r1 = rf(startTime, endTime, limit) 713 } else { 714 if ret.Get(1) != nil { 715 r1 = ret.Get(1).(*model.AppError) 716 } 717 } 718 719 return r0, r1 720 } 721 722 // InferSystemInstallDate provides a mock function with given fields: 723 func (_m *UserStore) InferSystemInstallDate() store.StoreChannel { 724 ret := _m.Called() 725 726 var r0 store.StoreChannel 727 if rf, ok := ret.Get(0).(func() store.StoreChannel); ok { 728 r0 = rf() 729 } else { 730 if ret.Get(0) != nil { 731 r0 = ret.Get(0).(store.StoreChannel) 732 } 733 } 734 735 return r0 736 } 737 738 // InvalidatProfileCacheForUser provides a mock function with given fields: userId 739 func (_m *UserStore) InvalidatProfileCacheForUser(userId string) { 740 _m.Called(userId) 741 } 742 743 // InvalidateProfilesInChannelCache provides a mock function with given fields: channelId 744 func (_m *UserStore) InvalidateProfilesInChannelCache(channelId string) { 745 _m.Called(channelId) 746 } 747 748 // InvalidateProfilesInChannelCacheByUser provides a mock function with given fields: userId 749 func (_m *UserStore) InvalidateProfilesInChannelCacheByUser(userId string) { 750 _m.Called(userId) 751 } 752 753 // PermanentDelete provides a mock function with given fields: userId 754 func (_m *UserStore) PermanentDelete(userId string) *model.AppError { 755 ret := _m.Called(userId) 756 757 var r0 *model.AppError 758 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 759 r0 = rf(userId) 760 } else { 761 if ret.Get(0) != nil { 762 r0 = ret.Get(0).(*model.AppError) 763 } 764 } 765 766 return r0 767 } 768 769 // ResetLastPictureUpdate provides a mock function with given fields: userId 770 func (_m *UserStore) ResetLastPictureUpdate(userId string) *model.AppError { 771 ret := _m.Called(userId) 772 773 var r0 *model.AppError 774 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 775 r0 = rf(userId) 776 } else { 777 if ret.Get(0) != nil { 778 r0 = ret.Get(0).(*model.AppError) 779 } 780 } 781 782 return r0 783 } 784 785 // Save provides a mock function with given fields: user 786 func (_m *UserStore) Save(user *model.User) store.StoreChannel { 787 ret := _m.Called(user) 788 789 var r0 store.StoreChannel 790 if rf, ok := ret.Get(0).(func(*model.User) store.StoreChannel); ok { 791 r0 = rf(user) 792 } else { 793 if ret.Get(0) != nil { 794 r0 = ret.Get(0).(store.StoreChannel) 795 } 796 } 797 798 return r0 799 } 800 801 // Search provides a mock function with given fields: teamId, term, options 802 func (_m *UserStore) Search(teamId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) { 803 ret := _m.Called(teamId, term, options) 804 805 var r0 []*model.User 806 if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) []*model.User); ok { 807 r0 = rf(teamId, term, options) 808 } else { 809 if ret.Get(0) != nil { 810 r0 = ret.Get(0).([]*model.User) 811 } 812 } 813 814 var r1 *model.AppError 815 if rf, ok := ret.Get(1).(func(string, string, *model.UserSearchOptions) *model.AppError); ok { 816 r1 = rf(teamId, term, options) 817 } else { 818 if ret.Get(1) != nil { 819 r1 = ret.Get(1).(*model.AppError) 820 } 821 } 822 823 return r0, r1 824 } 825 826 // SearchInChannel provides a mock function with given fields: channelId, term, options 827 func (_m *UserStore) SearchInChannel(channelId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) { 828 ret := _m.Called(channelId, term, options) 829 830 var r0 []*model.User 831 if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) []*model.User); ok { 832 r0 = rf(channelId, term, options) 833 } else { 834 if ret.Get(0) != nil { 835 r0 = ret.Get(0).([]*model.User) 836 } 837 } 838 839 var r1 *model.AppError 840 if rf, ok := ret.Get(1).(func(string, string, *model.UserSearchOptions) *model.AppError); ok { 841 r1 = rf(channelId, term, options) 842 } else { 843 if ret.Get(1) != nil { 844 r1 = ret.Get(1).(*model.AppError) 845 } 846 } 847 848 return r0, r1 849 } 850 851 // SearchNotInChannel provides a mock function with given fields: teamId, channelId, term, options 852 func (_m *UserStore) SearchNotInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) store.StoreChannel { 853 ret := _m.Called(teamId, channelId, term, options) 854 855 var r0 store.StoreChannel 856 if rf, ok := ret.Get(0).(func(string, string, string, *model.UserSearchOptions) store.StoreChannel); ok { 857 r0 = rf(teamId, channelId, term, options) 858 } else { 859 if ret.Get(0) != nil { 860 r0 = ret.Get(0).(store.StoreChannel) 861 } 862 } 863 864 return r0 865 } 866 867 // SearchNotInTeam provides a mock function with given fields: notInTeamId, term, options 868 func (_m *UserStore) SearchNotInTeam(notInTeamId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) { 869 ret := _m.Called(notInTeamId, term, options) 870 871 var r0 []*model.User 872 if rf, ok := ret.Get(0).(func(string, string, *model.UserSearchOptions) []*model.User); ok { 873 r0 = rf(notInTeamId, term, options) 874 } else { 875 if ret.Get(0) != nil { 876 r0 = ret.Get(0).([]*model.User) 877 } 878 } 879 880 var r1 *model.AppError 881 if rf, ok := ret.Get(1).(func(string, string, *model.UserSearchOptions) *model.AppError); ok { 882 r1 = rf(notInTeamId, term, options) 883 } else { 884 if ret.Get(1) != nil { 885 r1 = ret.Get(1).(*model.AppError) 886 } 887 } 888 889 return r0, r1 890 } 891 892 // SearchWithoutTeam provides a mock function with given fields: term, options 893 func (_m *UserStore) SearchWithoutTeam(term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) { 894 ret := _m.Called(term, options) 895 896 var r0 []*model.User 897 if rf, ok := ret.Get(0).(func(string, *model.UserSearchOptions) []*model.User); ok { 898 r0 = rf(term, options) 899 } else { 900 if ret.Get(0) != nil { 901 r0 = ret.Get(0).([]*model.User) 902 } 903 } 904 905 var r1 *model.AppError 906 if rf, ok := ret.Get(1).(func(string, *model.UserSearchOptions) *model.AppError); ok { 907 r1 = rf(term, options) 908 } else { 909 if ret.Get(1) != nil { 910 r1 = ret.Get(1).(*model.AppError) 911 } 912 } 913 914 return r0, r1 915 } 916 917 // Update provides a mock function with given fields: user, allowRoleUpdate 918 func (_m *UserStore) Update(user *model.User, allowRoleUpdate bool) (*model.UserUpdate, *model.AppError) { 919 ret := _m.Called(user, allowRoleUpdate) 920 921 var r0 *model.UserUpdate 922 if rf, ok := ret.Get(0).(func(*model.User, bool) *model.UserUpdate); ok { 923 r0 = rf(user, allowRoleUpdate) 924 } else { 925 if ret.Get(0) != nil { 926 r0 = ret.Get(0).(*model.UserUpdate) 927 } 928 } 929 930 var r1 *model.AppError 931 if rf, ok := ret.Get(1).(func(*model.User, bool) *model.AppError); ok { 932 r1 = rf(user, allowRoleUpdate) 933 } else { 934 if ret.Get(1) != nil { 935 r1 = ret.Get(1).(*model.AppError) 936 } 937 } 938 939 return r0, r1 940 } 941 942 // UpdateAuthData provides a mock function with given fields: userId, service, authData, email, resetMfa 943 func (_m *UserStore) UpdateAuthData(userId string, service string, authData *string, email string, resetMfa bool) (string, *model.AppError) { 944 ret := _m.Called(userId, service, authData, email, resetMfa) 945 946 var r0 string 947 if rf, ok := ret.Get(0).(func(string, string, *string, string, bool) string); ok { 948 r0 = rf(userId, service, authData, email, resetMfa) 949 } else { 950 r0 = ret.Get(0).(string) 951 } 952 953 var r1 *model.AppError 954 if rf, ok := ret.Get(1).(func(string, string, *string, string, bool) *model.AppError); ok { 955 r1 = rf(userId, service, authData, email, resetMfa) 956 } else { 957 if ret.Get(1) != nil { 958 r1 = ret.Get(1).(*model.AppError) 959 } 960 } 961 962 return r0, r1 963 } 964 965 // UpdateFailedPasswordAttempts provides a mock function with given fields: userId, attempts 966 func (_m *UserStore) UpdateFailedPasswordAttempts(userId string, attempts int) store.StoreChannel { 967 ret := _m.Called(userId, attempts) 968 969 var r0 store.StoreChannel 970 if rf, ok := ret.Get(0).(func(string, int) store.StoreChannel); ok { 971 r0 = rf(userId, attempts) 972 } else { 973 if ret.Get(0) != nil { 974 r0 = ret.Get(0).(store.StoreChannel) 975 } 976 } 977 978 return r0 979 } 980 981 // UpdateLastPictureUpdate provides a mock function with given fields: userId 982 func (_m *UserStore) UpdateLastPictureUpdate(userId string) store.StoreChannel { 983 ret := _m.Called(userId) 984 985 var r0 store.StoreChannel 986 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 987 r0 = rf(userId) 988 } else { 989 if ret.Get(0) != nil { 990 r0 = ret.Get(0).(store.StoreChannel) 991 } 992 } 993 994 return r0 995 } 996 997 // UpdateMfaActive provides a mock function with given fields: userId, active 998 func (_m *UserStore) UpdateMfaActive(userId string, active bool) store.StoreChannel { 999 ret := _m.Called(userId, active) 1000 1001 var r0 store.StoreChannel 1002 if rf, ok := ret.Get(0).(func(string, bool) store.StoreChannel); ok { 1003 r0 = rf(userId, active) 1004 } else { 1005 if ret.Get(0) != nil { 1006 r0 = ret.Get(0).(store.StoreChannel) 1007 } 1008 } 1009 1010 return r0 1011 } 1012 1013 // UpdateMfaSecret provides a mock function with given fields: userId, secret 1014 func (_m *UserStore) UpdateMfaSecret(userId string, secret string) store.StoreChannel { 1015 ret := _m.Called(userId, secret) 1016 1017 var r0 store.StoreChannel 1018 if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { 1019 r0 = rf(userId, secret) 1020 } else { 1021 if ret.Get(0) != nil { 1022 r0 = ret.Get(0).(store.StoreChannel) 1023 } 1024 } 1025 1026 return r0 1027 } 1028 1029 // UpdatePassword provides a mock function with given fields: userId, newPassword 1030 func (_m *UserStore) UpdatePassword(userId string, newPassword string) store.StoreChannel { 1031 ret := _m.Called(userId, newPassword) 1032 1033 var r0 store.StoreChannel 1034 if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { 1035 r0 = rf(userId, newPassword) 1036 } else { 1037 if ret.Get(0) != nil { 1038 r0 = ret.Get(0).(store.StoreChannel) 1039 } 1040 } 1041 1042 return r0 1043 } 1044 1045 // UpdateUpdateAt provides a mock function with given fields: userId 1046 func (_m *UserStore) UpdateUpdateAt(userId string) store.StoreChannel { 1047 ret := _m.Called(userId) 1048 1049 var r0 store.StoreChannel 1050 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 1051 r0 = rf(userId) 1052 } else { 1053 if ret.Get(0) != nil { 1054 r0 = ret.Get(0).(store.StoreChannel) 1055 } 1056 } 1057 1058 return r0 1059 } 1060 1061 // VerifyEmail provides a mock function with given fields: userId, email 1062 func (_m *UserStore) VerifyEmail(userId string, email string) (string, *model.AppError) { 1063 ret := _m.Called(userId, email) 1064 1065 var r0 string 1066 if rf, ok := ret.Get(0).(func(string, string) string); ok { 1067 r0 = rf(userId, email) 1068 } else { 1069 r0 = ret.Get(0).(string) 1070 } 1071 1072 var r1 *model.AppError 1073 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 1074 r1 = rf(userId, email) 1075 } else { 1076 if ret.Get(1) != nil { 1077 r1 = ret.Get(1).(*model.AppError) 1078 } 1079 } 1080 1081 return r0, r1 1082 }