github.com/xzl8028/xenia-server@v0.0.0-20190809101854-18450a97da63/store/storetest/mocks/ChannelStore.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 // ChannelStore is an autogenerated mock type for the ChannelStore type 12 type ChannelStore struct { 13 mock.Mock 14 } 15 16 // AnalyticsDeletedTypeCount provides a mock function with given fields: teamId, channelType 17 func (_m *ChannelStore) AnalyticsDeletedTypeCount(teamId string, channelType string) (int64, *model.AppError) { 18 ret := _m.Called(teamId, channelType) 19 20 var r0 int64 21 if rf, ok := ret.Get(0).(func(string, string) int64); ok { 22 r0 = rf(teamId, channelType) 23 } else { 24 r0 = ret.Get(0).(int64) 25 } 26 27 var r1 *model.AppError 28 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 29 r1 = rf(teamId, channelType) 30 } else { 31 if ret.Get(1) != nil { 32 r1 = ret.Get(1).(*model.AppError) 33 } 34 } 35 36 return r0, r1 37 } 38 39 // AnalyticsTypeCount provides a mock function with given fields: teamId, channelType 40 func (_m *ChannelStore) AnalyticsTypeCount(teamId string, channelType string) (int64, *model.AppError) { 41 ret := _m.Called(teamId, channelType) 42 43 var r0 int64 44 if rf, ok := ret.Get(0).(func(string, string) int64); ok { 45 r0 = rf(teamId, channelType) 46 } else { 47 r0 = ret.Get(0).(int64) 48 } 49 50 var r1 *model.AppError 51 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 52 r1 = rf(teamId, channelType) 53 } else { 54 if ret.Get(1) != nil { 55 r1 = ret.Get(1).(*model.AppError) 56 } 57 } 58 59 return r0, r1 60 } 61 62 // AutocompleteInTeam provides a mock function with given fields: teamId, term, includeDeleted 63 func (_m *ChannelStore) AutocompleteInTeam(teamId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) { 64 ret := _m.Called(teamId, term, includeDeleted) 65 66 var r0 *model.ChannelList 67 if rf, ok := ret.Get(0).(func(string, string, bool) *model.ChannelList); ok { 68 r0 = rf(teamId, term, includeDeleted) 69 } else { 70 if ret.Get(0) != nil { 71 r0 = ret.Get(0).(*model.ChannelList) 72 } 73 } 74 75 var r1 *model.AppError 76 if rf, ok := ret.Get(1).(func(string, string, bool) *model.AppError); ok { 77 r1 = rf(teamId, term, includeDeleted) 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 // AutocompleteInTeamForSearch provides a mock function with given fields: teamId, userId, term, includeDeleted 88 func (_m *ChannelStore) AutocompleteInTeamForSearch(teamId string, userId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) { 89 ret := _m.Called(teamId, userId, term, includeDeleted) 90 91 var r0 *model.ChannelList 92 if rf, ok := ret.Get(0).(func(string, string, string, bool) *model.ChannelList); ok { 93 r0 = rf(teamId, userId, term, includeDeleted) 94 } else { 95 if ret.Get(0) != nil { 96 r0 = ret.Get(0).(*model.ChannelList) 97 } 98 } 99 100 var r1 *model.AppError 101 if rf, ok := ret.Get(1).(func(string, string, string, bool) *model.AppError); ok { 102 r1 = rf(teamId, userId, term, includeDeleted) 103 } else { 104 if ret.Get(1) != nil { 105 r1 = ret.Get(1).(*model.AppError) 106 } 107 } 108 109 return r0, r1 110 } 111 112 // ClearAllCustomRoleAssignments provides a mock function with given fields: 113 func (_m *ChannelStore) ClearAllCustomRoleAssignments() *model.AppError { 114 ret := _m.Called() 115 116 var r0 *model.AppError 117 if rf, ok := ret.Get(0).(func() *model.AppError); ok { 118 r0 = rf() 119 } else { 120 if ret.Get(0) != nil { 121 r0 = ret.Get(0).(*model.AppError) 122 } 123 } 124 125 return r0 126 } 127 128 // ClearCaches provides a mock function with given fields: 129 func (_m *ChannelStore) ClearCaches() { 130 _m.Called() 131 } 132 133 // CreateDirectChannel provides a mock function with given fields: userId, otherUserId 134 func (_m *ChannelStore) CreateDirectChannel(userId string, otherUserId string) (*model.Channel, *model.AppError) { 135 ret := _m.Called(userId, otherUserId) 136 137 var r0 *model.Channel 138 if rf, ok := ret.Get(0).(func(string, string) *model.Channel); ok { 139 r0 = rf(userId, otherUserId) 140 } else { 141 if ret.Get(0) != nil { 142 r0 = ret.Get(0).(*model.Channel) 143 } 144 } 145 146 var r1 *model.AppError 147 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 148 r1 = rf(userId, otherUserId) 149 } else { 150 if ret.Get(1) != nil { 151 r1 = ret.Get(1).(*model.AppError) 152 } 153 } 154 155 return r0, r1 156 } 157 158 // Delete provides a mock function with given fields: channelId, time 159 func (_m *ChannelStore) Delete(channelId string, time int64) *model.AppError { 160 ret := _m.Called(channelId, time) 161 162 var r0 *model.AppError 163 if rf, ok := ret.Get(0).(func(string, int64) *model.AppError); ok { 164 r0 = rf(channelId, time) 165 } else { 166 if ret.Get(0) != nil { 167 r0 = ret.Get(0).(*model.AppError) 168 } 169 } 170 171 return r0 172 } 173 174 // Get provides a mock function with given fields: id, allowFromCache 175 func (_m *ChannelStore) Get(id string, allowFromCache bool) (*model.Channel, *model.AppError) { 176 ret := _m.Called(id, allowFromCache) 177 178 var r0 *model.Channel 179 if rf, ok := ret.Get(0).(func(string, bool) *model.Channel); ok { 180 r0 = rf(id, allowFromCache) 181 } else { 182 if ret.Get(0) != nil { 183 r0 = ret.Get(0).(*model.Channel) 184 } 185 } 186 187 var r1 *model.AppError 188 if rf, ok := ret.Get(1).(func(string, bool) *model.AppError); ok { 189 r1 = rf(id, allowFromCache) 190 } else { 191 if ret.Get(1) != nil { 192 r1 = ret.Get(1).(*model.AppError) 193 } 194 } 195 196 return r0, r1 197 } 198 199 // GetAll provides a mock function with given fields: teamId 200 func (_m *ChannelStore) GetAll(teamId string) ([]*model.Channel, *model.AppError) { 201 ret := _m.Called(teamId) 202 203 var r0 []*model.Channel 204 if rf, ok := ret.Get(0).(func(string) []*model.Channel); ok { 205 r0 = rf(teamId) 206 } else { 207 if ret.Get(0) != nil { 208 r0 = ret.Get(0).([]*model.Channel) 209 } 210 } 211 212 var r1 *model.AppError 213 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 214 r1 = rf(teamId) 215 } else { 216 if ret.Get(1) != nil { 217 r1 = ret.Get(1).(*model.AppError) 218 } 219 } 220 221 return r0, r1 222 } 223 224 // GetAllChannelMembersForUser provides a mock function with given fields: userId, allowFromCache, includeDeleted 225 func (_m *ChannelStore) GetAllChannelMembersForUser(userId string, allowFromCache bool, includeDeleted bool) (map[string]string, *model.AppError) { 226 ret := _m.Called(userId, allowFromCache, includeDeleted) 227 228 var r0 map[string]string 229 if rf, ok := ret.Get(0).(func(string, bool, bool) map[string]string); ok { 230 r0 = rf(userId, allowFromCache, includeDeleted) 231 } else { 232 if ret.Get(0) != nil { 233 r0 = ret.Get(0).(map[string]string) 234 } 235 } 236 237 var r1 *model.AppError 238 if rf, ok := ret.Get(1).(func(string, bool, bool) *model.AppError); ok { 239 r1 = rf(userId, allowFromCache, includeDeleted) 240 } else { 241 if ret.Get(1) != nil { 242 r1 = ret.Get(1).(*model.AppError) 243 } 244 } 245 246 return r0, r1 247 } 248 249 // GetAllChannelMembersNotifyPropsForChannel provides a mock function with given fields: channelId, allowFromCache 250 func (_m *ChannelStore) GetAllChannelMembersNotifyPropsForChannel(channelId string, allowFromCache bool) (map[string]model.StringMap, *model.AppError) { 251 ret := _m.Called(channelId, allowFromCache) 252 253 var r0 map[string]model.StringMap 254 if rf, ok := ret.Get(0).(func(string, bool) map[string]model.StringMap); ok { 255 r0 = rf(channelId, allowFromCache) 256 } else { 257 if ret.Get(0) != nil { 258 r0 = ret.Get(0).(map[string]model.StringMap) 259 } 260 } 261 262 var r1 *model.AppError 263 if rf, ok := ret.Get(1).(func(string, bool) *model.AppError); ok { 264 r1 = rf(channelId, allowFromCache) 265 } else { 266 if ret.Get(1) != nil { 267 r1 = ret.Get(1).(*model.AppError) 268 } 269 } 270 271 return r0, r1 272 } 273 274 // GetAllChannels provides a mock function with given fields: page, perPage, opts 275 func (_m *ChannelStore) GetAllChannels(page int, perPage int, opts store.ChannelSearchOpts) (*model.ChannelListWithTeamData, *model.AppError) { 276 ret := _m.Called(page, perPage, opts) 277 278 var r0 *model.ChannelListWithTeamData 279 if rf, ok := ret.Get(0).(func(int, int, store.ChannelSearchOpts) *model.ChannelListWithTeamData); ok { 280 r0 = rf(page, perPage, opts) 281 } else { 282 if ret.Get(0) != nil { 283 r0 = ret.Get(0).(*model.ChannelListWithTeamData) 284 } 285 } 286 287 var r1 *model.AppError 288 if rf, ok := ret.Get(1).(func(int, int, store.ChannelSearchOpts) *model.AppError); ok { 289 r1 = rf(page, perPage, opts) 290 } else { 291 if ret.Get(1) != nil { 292 r1 = ret.Get(1).(*model.AppError) 293 } 294 } 295 296 return r0, r1 297 } 298 299 // GetAllChannelsCount provides a mock function with given fields: opts 300 func (_m *ChannelStore) GetAllChannelsCount(opts store.ChannelSearchOpts) (int64, *model.AppError) { 301 ret := _m.Called(opts) 302 303 var r0 int64 304 if rf, ok := ret.Get(0).(func(store.ChannelSearchOpts) int64); ok { 305 r0 = rf(opts) 306 } else { 307 r0 = ret.Get(0).(int64) 308 } 309 310 var r1 *model.AppError 311 if rf, ok := ret.Get(1).(func(store.ChannelSearchOpts) *model.AppError); ok { 312 r1 = rf(opts) 313 } else { 314 if ret.Get(1) != nil { 315 r1 = ret.Get(1).(*model.AppError) 316 } 317 } 318 319 return r0, r1 320 } 321 322 // GetAllChannelsForExportAfter provides a mock function with given fields: limit, afterId 323 func (_m *ChannelStore) GetAllChannelsForExportAfter(limit int, afterId string) ([]*model.ChannelForExport, *model.AppError) { 324 ret := _m.Called(limit, afterId) 325 326 var r0 []*model.ChannelForExport 327 if rf, ok := ret.Get(0).(func(int, string) []*model.ChannelForExport); ok { 328 r0 = rf(limit, afterId) 329 } else { 330 if ret.Get(0) != nil { 331 r0 = ret.Get(0).([]*model.ChannelForExport) 332 } 333 } 334 335 var r1 *model.AppError 336 if rf, ok := ret.Get(1).(func(int, string) *model.AppError); ok { 337 r1 = rf(limit, afterId) 338 } else { 339 if ret.Get(1) != nil { 340 r1 = ret.Get(1).(*model.AppError) 341 } 342 } 343 344 return r0, r1 345 } 346 347 // GetAllDirectChannelsForExportAfter provides a mock function with given fields: limit, afterId 348 func (_m *ChannelStore) GetAllDirectChannelsForExportAfter(limit int, afterId string) ([]*model.DirectChannelForExport, *model.AppError) { 349 ret := _m.Called(limit, afterId) 350 351 var r0 []*model.DirectChannelForExport 352 if rf, ok := ret.Get(0).(func(int, string) []*model.DirectChannelForExport); ok { 353 r0 = rf(limit, afterId) 354 } else { 355 if ret.Get(0) != nil { 356 r0 = ret.Get(0).([]*model.DirectChannelForExport) 357 } 358 } 359 360 var r1 *model.AppError 361 if rf, ok := ret.Get(1).(func(int, string) *model.AppError); ok { 362 r1 = rf(limit, afterId) 363 } else { 364 if ret.Get(1) != nil { 365 r1 = ret.Get(1).(*model.AppError) 366 } 367 } 368 369 return r0, r1 370 } 371 372 // GetByName provides a mock function with given fields: team_id, name, allowFromCache 373 func (_m *ChannelStore) GetByName(team_id string, name string, allowFromCache bool) (*model.Channel, *model.AppError) { 374 ret := _m.Called(team_id, name, allowFromCache) 375 376 var r0 *model.Channel 377 if rf, ok := ret.Get(0).(func(string, string, bool) *model.Channel); ok { 378 r0 = rf(team_id, name, allowFromCache) 379 } else { 380 if ret.Get(0) != nil { 381 r0 = ret.Get(0).(*model.Channel) 382 } 383 } 384 385 var r1 *model.AppError 386 if rf, ok := ret.Get(1).(func(string, string, bool) *model.AppError); ok { 387 r1 = rf(team_id, name, allowFromCache) 388 } else { 389 if ret.Get(1) != nil { 390 r1 = ret.Get(1).(*model.AppError) 391 } 392 } 393 394 return r0, r1 395 } 396 397 // GetByNameIncludeDeleted provides a mock function with given fields: team_id, name, allowFromCache 398 func (_m *ChannelStore) GetByNameIncludeDeleted(team_id string, name string, allowFromCache bool) (*model.Channel, *model.AppError) { 399 ret := _m.Called(team_id, name, allowFromCache) 400 401 var r0 *model.Channel 402 if rf, ok := ret.Get(0).(func(string, string, bool) *model.Channel); ok { 403 r0 = rf(team_id, name, allowFromCache) 404 } else { 405 if ret.Get(0) != nil { 406 r0 = ret.Get(0).(*model.Channel) 407 } 408 } 409 410 var r1 *model.AppError 411 if rf, ok := ret.Get(1).(func(string, string, bool) *model.AppError); ok { 412 r1 = rf(team_id, name, allowFromCache) 413 } else { 414 if ret.Get(1) != nil { 415 r1 = ret.Get(1).(*model.AppError) 416 } 417 } 418 419 return r0, r1 420 } 421 422 // GetByNames provides a mock function with given fields: team_id, names, allowFromCache 423 func (_m *ChannelStore) GetByNames(team_id string, names []string, allowFromCache bool) ([]*model.Channel, *model.AppError) { 424 ret := _m.Called(team_id, names, allowFromCache) 425 426 var r0 []*model.Channel 427 if rf, ok := ret.Get(0).(func(string, []string, bool) []*model.Channel); ok { 428 r0 = rf(team_id, names, allowFromCache) 429 } else { 430 if ret.Get(0) != nil { 431 r0 = ret.Get(0).([]*model.Channel) 432 } 433 } 434 435 var r1 *model.AppError 436 if rf, ok := ret.Get(1).(func(string, []string, bool) *model.AppError); ok { 437 r1 = rf(team_id, names, allowFromCache) 438 } else { 439 if ret.Get(1) != nil { 440 r1 = ret.Get(1).(*model.AppError) 441 } 442 } 443 444 return r0, r1 445 } 446 447 // GetChannelCounts provides a mock function with given fields: teamId, userId 448 func (_m *ChannelStore) GetChannelCounts(teamId string, userId string) (*model.ChannelCounts, *model.AppError) { 449 ret := _m.Called(teamId, userId) 450 451 var r0 *model.ChannelCounts 452 if rf, ok := ret.Get(0).(func(string, string) *model.ChannelCounts); ok { 453 r0 = rf(teamId, userId) 454 } else { 455 if ret.Get(0) != nil { 456 r0 = ret.Get(0).(*model.ChannelCounts) 457 } 458 } 459 460 var r1 *model.AppError 461 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 462 r1 = rf(teamId, userId) 463 } else { 464 if ret.Get(1) != nil { 465 r1 = ret.Get(1).(*model.AppError) 466 } 467 } 468 469 return r0, r1 470 } 471 472 // GetChannelMembersForExport provides a mock function with given fields: userId, teamId 473 func (_m *ChannelStore) GetChannelMembersForExport(userId string, teamId string) ([]*model.ChannelMemberForExport, *model.AppError) { 474 ret := _m.Called(userId, teamId) 475 476 var r0 []*model.ChannelMemberForExport 477 if rf, ok := ret.Get(0).(func(string, string) []*model.ChannelMemberForExport); ok { 478 r0 = rf(userId, teamId) 479 } else { 480 if ret.Get(0) != nil { 481 r0 = ret.Get(0).([]*model.ChannelMemberForExport) 482 } 483 } 484 485 var r1 *model.AppError 486 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 487 r1 = rf(userId, teamId) 488 } else { 489 if ret.Get(1) != nil { 490 r1 = ret.Get(1).(*model.AppError) 491 } 492 } 493 494 return r0, r1 495 } 496 497 // GetChannelMembersTimezones provides a mock function with given fields: channelId 498 func (_m *ChannelStore) GetChannelMembersTimezones(channelId string) ([]model.StringMap, *model.AppError) { 499 ret := _m.Called(channelId) 500 501 var r0 []model.StringMap 502 if rf, ok := ret.Get(0).(func(string) []model.StringMap); ok { 503 r0 = rf(channelId) 504 } else { 505 if ret.Get(0) != nil { 506 r0 = ret.Get(0).([]model.StringMap) 507 } 508 } 509 510 var r1 *model.AppError 511 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 512 r1 = rf(channelId) 513 } else { 514 if ret.Get(1) != nil { 515 r1 = ret.Get(1).(*model.AppError) 516 } 517 } 518 519 return r0, r1 520 } 521 522 // GetChannelUnread provides a mock function with given fields: channelId, userId 523 func (_m *ChannelStore) GetChannelUnread(channelId string, userId string) (*model.ChannelUnread, *model.AppError) { 524 ret := _m.Called(channelId, userId) 525 526 var r0 *model.ChannelUnread 527 if rf, ok := ret.Get(0).(func(string, string) *model.ChannelUnread); ok { 528 r0 = rf(channelId, userId) 529 } else { 530 if ret.Get(0) != nil { 531 r0 = ret.Get(0).(*model.ChannelUnread) 532 } 533 } 534 535 var r1 *model.AppError 536 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 537 r1 = rf(channelId, userId) 538 } else { 539 if ret.Get(1) != nil { 540 r1 = ret.Get(1).(*model.AppError) 541 } 542 } 543 544 return r0, r1 545 } 546 547 // GetChannels provides a mock function with given fields: teamId, userId, includeDeleted 548 func (_m *ChannelStore) GetChannels(teamId string, userId string, includeDeleted bool) (*model.ChannelList, *model.AppError) { 549 ret := _m.Called(teamId, userId, includeDeleted) 550 551 var r0 *model.ChannelList 552 if rf, ok := ret.Get(0).(func(string, string, bool) *model.ChannelList); ok { 553 r0 = rf(teamId, userId, includeDeleted) 554 } else { 555 if ret.Get(0) != nil { 556 r0 = ret.Get(0).(*model.ChannelList) 557 } 558 } 559 560 var r1 *model.AppError 561 if rf, ok := ret.Get(1).(func(string, string, bool) *model.AppError); ok { 562 r1 = rf(teamId, userId, includeDeleted) 563 } else { 564 if ret.Get(1) != nil { 565 r1 = ret.Get(1).(*model.AppError) 566 } 567 } 568 569 return r0, r1 570 } 571 572 // GetChannelsBatchForIndexing provides a mock function with given fields: startTime, endTime, limit 573 func (_m *ChannelStore) GetChannelsBatchForIndexing(startTime int64, endTime int64, limit int) ([]*model.Channel, *model.AppError) { 574 ret := _m.Called(startTime, endTime, limit) 575 576 var r0 []*model.Channel 577 if rf, ok := ret.Get(0).(func(int64, int64, int) []*model.Channel); ok { 578 r0 = rf(startTime, endTime, limit) 579 } else { 580 if ret.Get(0) != nil { 581 r0 = ret.Get(0).([]*model.Channel) 582 } 583 } 584 585 var r1 *model.AppError 586 if rf, ok := ret.Get(1).(func(int64, int64, int) *model.AppError); ok { 587 r1 = rf(startTime, endTime, limit) 588 } else { 589 if ret.Get(1) != nil { 590 r1 = ret.Get(1).(*model.AppError) 591 } 592 } 593 594 return r0, r1 595 } 596 597 // GetChannelsByIds provides a mock function with given fields: channelIds 598 func (_m *ChannelStore) GetChannelsByIds(channelIds []string) ([]*model.Channel, *model.AppError) { 599 ret := _m.Called(channelIds) 600 601 var r0 []*model.Channel 602 if rf, ok := ret.Get(0).(func([]string) []*model.Channel); ok { 603 r0 = rf(channelIds) 604 } else { 605 if ret.Get(0) != nil { 606 r0 = ret.Get(0).([]*model.Channel) 607 } 608 } 609 610 var r1 *model.AppError 611 if rf, ok := ret.Get(1).(func([]string) *model.AppError); ok { 612 r1 = rf(channelIds) 613 } else { 614 if ret.Get(1) != nil { 615 r1 = ret.Get(1).(*model.AppError) 616 } 617 } 618 619 return r0, r1 620 } 621 622 // GetChannelsByScheme provides a mock function with given fields: schemeId, offset, limit 623 func (_m *ChannelStore) GetChannelsByScheme(schemeId string, offset int, limit int) store.StoreChannel { 624 ret := _m.Called(schemeId, offset, limit) 625 626 var r0 store.StoreChannel 627 if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok { 628 r0 = rf(schemeId, offset, limit) 629 } else { 630 if ret.Get(0) != nil { 631 r0 = ret.Get(0).(store.StoreChannel) 632 } 633 } 634 635 return r0 636 } 637 638 // GetDeleted provides a mock function with given fields: team_id, offset, limit 639 func (_m *ChannelStore) GetDeleted(team_id string, offset int, limit int) (*model.ChannelList, *model.AppError) { 640 ret := _m.Called(team_id, offset, limit) 641 642 var r0 *model.ChannelList 643 if rf, ok := ret.Get(0).(func(string, int, int) *model.ChannelList); ok { 644 r0 = rf(team_id, offset, limit) 645 } else { 646 if ret.Get(0) != nil { 647 r0 = ret.Get(0).(*model.ChannelList) 648 } 649 } 650 651 var r1 *model.AppError 652 if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { 653 r1 = rf(team_id, offset, limit) 654 } else { 655 if ret.Get(1) != nil { 656 r1 = ret.Get(1).(*model.AppError) 657 } 658 } 659 660 return r0, r1 661 } 662 663 // GetDeletedByName provides a mock function with given fields: team_id, name 664 func (_m *ChannelStore) GetDeletedByName(team_id string, name string) (*model.Channel, *model.AppError) { 665 ret := _m.Called(team_id, name) 666 667 var r0 *model.Channel 668 if rf, ok := ret.Get(0).(func(string, string) *model.Channel); ok { 669 r0 = rf(team_id, name) 670 } else { 671 if ret.Get(0) != nil { 672 r0 = ret.Get(0).(*model.Channel) 673 } 674 } 675 676 var r1 *model.AppError 677 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 678 r1 = rf(team_id, name) 679 } else { 680 if ret.Get(1) != nil { 681 r1 = ret.Get(1).(*model.AppError) 682 } 683 } 684 685 return r0, r1 686 } 687 688 func (_m *ChannelStore) GetByDisplayName(team_id string, display_name string) (*model.Channel, *model.AppError) { 689 ret := _m.Called(team_id, display_name) 690 691 var r0 *model.Channel 692 if rf, ok := ret.Get(0).(func(string, string) *model.Channel); ok { 693 r0 = rf(team_id, display_name) 694 } else { 695 if ret.Get(0) != nil { 696 r0 = ret.Get(0).(*model.Channel) 697 } 698 } 699 700 var r1 *model.AppError 701 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 702 r1 = rf(team_id, display_name) 703 } else { 704 if ret.Get(1) != nil { 705 r1 = ret.Get(1).(*model.AppError) 706 } 707 } 708 709 return r0, r1 710 } 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 // GetForPost provides a mock function with given fields: postId 731 func (_m *ChannelStore) GetForPost(postId string) (*model.Channel, *model.AppError) { 732 ret := _m.Called(postId) 733 734 var r0 *model.Channel 735 if rf, ok := ret.Get(0).(func(string) *model.Channel); ok { 736 r0 = rf(postId) 737 } else { 738 if ret.Get(0) != nil { 739 r0 = ret.Get(0).(*model.Channel) 740 } 741 } 742 743 var r1 *model.AppError 744 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 745 r1 = rf(postId) 746 } else { 747 if ret.Get(1) != nil { 748 r1 = ret.Get(1).(*model.AppError) 749 } 750 } 751 752 return r0, r1 753 } 754 755 // GetFromMaster provides a mock function with given fields: id 756 func (_m *ChannelStore) GetFromMaster(id string) (*model.Channel, *model.AppError) { 757 ret := _m.Called(id) 758 759 var r0 *model.Channel 760 if rf, ok := ret.Get(0).(func(string) *model.Channel); ok { 761 r0 = rf(id) 762 } else { 763 if ret.Get(0) != nil { 764 r0 = ret.Get(0).(*model.Channel) 765 } 766 } 767 768 var r1 *model.AppError 769 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 770 r1 = rf(id) 771 } else { 772 if ret.Get(1) != nil { 773 r1 = ret.Get(1).(*model.AppError) 774 } 775 } 776 777 return r0, r1 778 } 779 780 // GetMember provides a mock function with given fields: channelId, userId 781 func (_m *ChannelStore) GetMember(channelId string, userId string) (*model.ChannelMember, *model.AppError) { 782 ret := _m.Called(channelId, userId) 783 784 var r0 *model.ChannelMember 785 if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMember); ok { 786 r0 = rf(channelId, userId) 787 } else { 788 if ret.Get(0) != nil { 789 r0 = ret.Get(0).(*model.ChannelMember) 790 } 791 } 792 793 var r1 *model.AppError 794 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 795 r1 = rf(channelId, userId) 796 } else { 797 if ret.Get(1) != nil { 798 r1 = ret.Get(1).(*model.AppError) 799 } 800 } 801 802 return r0, r1 803 } 804 805 // GetMemberCount provides a mock function with given fields: channelId, allowFromCache 806 func (_m *ChannelStore) GetMemberCount(channelId string, allowFromCache bool) (int64, *model.AppError) { 807 ret := _m.Called(channelId, allowFromCache) 808 809 var r0 int64 810 if rf, ok := ret.Get(0).(func(string, bool) int64); ok { 811 r0 = rf(channelId, allowFromCache) 812 } else { 813 r0 = ret.Get(0).(int64) 814 } 815 816 var r1 *model.AppError 817 if rf, ok := ret.Get(1).(func(string, bool) *model.AppError); ok { 818 r1 = rf(channelId, allowFromCache) 819 } else { 820 if ret.Get(1) != nil { 821 r1 = ret.Get(1).(*model.AppError) 822 } 823 } 824 825 return r0, r1 826 } 827 828 // GetMemberCountFromCache provides a mock function with given fields: channelId 829 func (_m *ChannelStore) GetMemberCountFromCache(channelId string) int64 { 830 ret := _m.Called(channelId) 831 832 var r0 int64 833 if rf, ok := ret.Get(0).(func(string) int64); ok { 834 r0 = rf(channelId) 835 } else { 836 r0 = ret.Get(0).(int64) 837 } 838 839 return r0 840 } 841 842 // GetMemberForPost provides a mock function with given fields: postId, userId 843 func (_m *ChannelStore) GetMemberForPost(postId string, userId string) (*model.ChannelMember, *model.AppError) { 844 ret := _m.Called(postId, userId) 845 846 var r0 *model.ChannelMember 847 if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMember); ok { 848 r0 = rf(postId, userId) 849 } else { 850 if ret.Get(0) != nil { 851 r0 = ret.Get(0).(*model.ChannelMember) 852 } 853 } 854 855 var r1 *model.AppError 856 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 857 r1 = rf(postId, userId) 858 } else { 859 if ret.Get(1) != nil { 860 r1 = ret.Get(1).(*model.AppError) 861 } 862 } 863 864 return r0, r1 865 } 866 867 // GetMembers provides a mock function with given fields: channelId, offset, limit 868 func (_m *ChannelStore) GetMembers(channelId string, offset int, limit int) (*model.ChannelMembers, *model.AppError) { 869 ret := _m.Called(channelId, offset, limit) 870 871 var r0 *model.ChannelMembers 872 if rf, ok := ret.Get(0).(func(string, int, int) *model.ChannelMembers); ok { 873 r0 = rf(channelId, offset, limit) 874 } else { 875 if ret.Get(0) != nil { 876 r0 = ret.Get(0).(*model.ChannelMembers) 877 } 878 } 879 880 var r1 *model.AppError 881 if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { 882 r1 = rf(channelId, offset, limit) 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 // GetMembersByIds provides a mock function with given fields: channelId, userIds 893 func (_m *ChannelStore) GetMembersByIds(channelId string, userIds []string) (*model.ChannelMembers, *model.AppError) { 894 ret := _m.Called(channelId, userIds) 895 896 var r0 *model.ChannelMembers 897 if rf, ok := ret.Get(0).(func(string, []string) *model.ChannelMembers); ok { 898 r0 = rf(channelId, userIds) 899 } else { 900 if ret.Get(0) != nil { 901 r0 = ret.Get(0).(*model.ChannelMembers) 902 } 903 } 904 905 var r1 *model.AppError 906 if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok { 907 r1 = rf(channelId, userIds) 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 // GetMembersForUser provides a mock function with given fields: teamId, userId 918 func (_m *ChannelStore) GetMembersForUser(teamId string, userId string) (*model.ChannelMembers, *model.AppError) { 919 ret := _m.Called(teamId, userId) 920 921 var r0 *model.ChannelMembers 922 if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMembers); ok { 923 r0 = rf(teamId, userId) 924 } else { 925 if ret.Get(0) != nil { 926 r0 = ret.Get(0).(*model.ChannelMembers) 927 } 928 } 929 930 var r1 *model.AppError 931 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 932 r1 = rf(teamId, userId) 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 // GetMembersForUserWithPagination provides a mock function with given fields: teamId, userId, page, perPage 943 func (_m *ChannelStore) GetMembersForUserWithPagination(teamId string, userId string, page int, perPage int) (*model.ChannelMembers, *model.AppError) { 944 ret := _m.Called(teamId, userId, page, perPage) 945 946 var r0 *model.ChannelMembers 947 if rf, ok := ret.Get(0).(func(string, string, int, int) *model.ChannelMembers); ok { 948 r0 = rf(teamId, userId, page, perPage) 949 } else { 950 if ret.Get(0) != nil { 951 r0 = ret.Get(0).(*model.ChannelMembers) 952 } 953 } 954 955 var r1 *model.AppError 956 if rf, ok := ret.Get(1).(func(string, string, int, int) *model.AppError); ok { 957 r1 = rf(teamId, userId, page, perPage) 958 } else { 959 if ret.Get(1) != nil { 960 r1 = ret.Get(1).(*model.AppError) 961 } 962 } 963 964 return r0, r1 965 } 966 967 // GetMoreChannels provides a mock function with given fields: teamId, userId, offset, limit 968 func (_m *ChannelStore) GetMoreChannels(teamId string, userId string, offset int, limit int) (*model.ChannelList, *model.AppError) { 969 ret := _m.Called(teamId, userId, offset, limit) 970 971 var r0 *model.ChannelList 972 if rf, ok := ret.Get(0).(func(string, string, int, int) *model.ChannelList); ok { 973 r0 = rf(teamId, userId, offset, limit) 974 } else { 975 if ret.Get(0) != nil { 976 r0 = ret.Get(0).(*model.ChannelList) 977 } 978 } 979 980 var r1 *model.AppError 981 if rf, ok := ret.Get(1).(func(string, string, int, int) *model.AppError); ok { 982 r1 = rf(teamId, userId, offset, limit) 983 } else { 984 if ret.Get(1) != nil { 985 r1 = ret.Get(1).(*model.AppError) 986 } 987 } 988 989 return r0, r1 990 } 991 992 // GetPinnedPosts provides a mock function with given fields: channelId 993 func (_m *ChannelStore) GetPinnedPosts(channelId string) (*model.PostList, *model.AppError) { 994 ret := _m.Called(channelId) 995 996 var r0 *model.PostList 997 if rf, ok := ret.Get(0).(func(string) *model.PostList); ok { 998 r0 = rf(channelId) 999 } else { 1000 if ret.Get(0) != nil { 1001 r0 = ret.Get(0).(*model.PostList) 1002 } 1003 } 1004 1005 var r1 *model.AppError 1006 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1007 r1 = rf(channelId) 1008 } else { 1009 if ret.Get(1) != nil { 1010 r1 = ret.Get(1).(*model.AppError) 1011 } 1012 } 1013 1014 return r0, r1 1015 } 1016 1017 // GetPublicChannelsByIdsForTeam provides a mock function with given fields: teamId, channelIds 1018 func (_m *ChannelStore) GetPublicChannelsByIdsForTeam(teamId string, channelIds []string) (*model.ChannelList, *model.AppError) { 1019 ret := _m.Called(teamId, channelIds) 1020 1021 var r0 *model.ChannelList 1022 if rf, ok := ret.Get(0).(func(string, []string) *model.ChannelList); ok { 1023 r0 = rf(teamId, channelIds) 1024 } else { 1025 if ret.Get(0) != nil { 1026 r0 = ret.Get(0).(*model.ChannelList) 1027 } 1028 } 1029 1030 var r1 *model.AppError 1031 if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok { 1032 r1 = rf(teamId, channelIds) 1033 } else { 1034 if ret.Get(1) != nil { 1035 r1 = ret.Get(1).(*model.AppError) 1036 } 1037 } 1038 1039 return r0, r1 1040 } 1041 1042 // GetPublicChannelsForTeam provides a mock function with given fields: teamId, offset, limit 1043 func (_m *ChannelStore) GetPublicChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, *model.AppError) { 1044 ret := _m.Called(teamId, offset, limit) 1045 1046 var r0 *model.ChannelList 1047 if rf, ok := ret.Get(0).(func(string, int, int) *model.ChannelList); ok { 1048 r0 = rf(teamId, offset, limit) 1049 } else { 1050 if ret.Get(0) != nil { 1051 r0 = ret.Get(0).(*model.ChannelList) 1052 } 1053 } 1054 1055 var r1 *model.AppError 1056 if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { 1057 r1 = rf(teamId, offset, limit) 1058 } else { 1059 if ret.Get(1) != nil { 1060 r1 = ret.Get(1).(*model.AppError) 1061 } 1062 } 1063 1064 return r0, r1 1065 } 1066 1067 // GetTeamChannels provides a mock function with given fields: teamId 1068 func (_m *ChannelStore) GetTeamChannels(teamId string) (*model.ChannelList, *model.AppError) { 1069 ret := _m.Called(teamId) 1070 1071 var r0 *model.ChannelList 1072 if rf, ok := ret.Get(0).(func(string) *model.ChannelList); ok { 1073 r0 = rf(teamId) 1074 } else { 1075 if ret.Get(0) != nil { 1076 r0 = ret.Get(0).(*model.ChannelList) 1077 } 1078 } 1079 1080 var r1 *model.AppError 1081 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1082 r1 = rf(teamId) 1083 } else { 1084 if ret.Get(1) != nil { 1085 r1 = ret.Get(1).(*model.AppError) 1086 } 1087 } 1088 1089 return r0, r1 1090 } 1091 1092 // IncrementMentionCount provides a mock function with given fields: channelId, userId 1093 func (_m *ChannelStore) IncrementMentionCount(channelId string, userId string) *model.AppError { 1094 ret := _m.Called(channelId, userId) 1095 1096 var r0 *model.AppError 1097 if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok { 1098 r0 = rf(channelId, userId) 1099 } else { 1100 if ret.Get(0) != nil { 1101 r0 = ret.Get(0).(*model.AppError) 1102 } 1103 } 1104 1105 return r0 1106 } 1107 1108 // InvalidateAllChannelMembersForUser provides a mock function with given fields: userId 1109 func (_m *ChannelStore) InvalidateAllChannelMembersForUser(userId string) { 1110 _m.Called(userId) 1111 } 1112 1113 // InvalidateCacheForChannelMembersNotifyProps provides a mock function with given fields: channelId 1114 func (_m *ChannelStore) InvalidateCacheForChannelMembersNotifyProps(channelId string) { 1115 _m.Called(channelId) 1116 } 1117 1118 // InvalidateChannel provides a mock function with given fields: id 1119 func (_m *ChannelStore) InvalidateChannel(id string) { 1120 _m.Called(id) 1121 } 1122 1123 // InvalidateChannelByName provides a mock function with given fields: teamId, name 1124 func (_m *ChannelStore) InvalidateChannelByName(teamId string, name string) { 1125 _m.Called(teamId, name) 1126 } 1127 1128 // InvalidateMemberCount provides a mock function with given fields: channelId 1129 func (_m *ChannelStore) InvalidateMemberCount(channelId string) { 1130 _m.Called(channelId) 1131 } 1132 1133 // IsUserInChannelUseCache provides a mock function with given fields: userId, channelId 1134 func (_m *ChannelStore) IsUserInChannelUseCache(userId string, channelId string) bool { 1135 ret := _m.Called(userId, channelId) 1136 1137 var r0 bool 1138 if rf, ok := ret.Get(0).(func(string, string) bool); ok { 1139 r0 = rf(userId, channelId) 1140 } else { 1141 r0 = ret.Get(0).(bool) 1142 } 1143 1144 return r0 1145 } 1146 1147 // MigrateChannelMembers provides a mock function with given fields: fromChannelId, fromUserId 1148 func (_m *ChannelStore) MigrateChannelMembers(fromChannelId string, fromUserId string) (map[string]string, *model.AppError) { 1149 ret := _m.Called(fromChannelId, fromUserId) 1150 1151 var r0 map[string]string 1152 if rf, ok := ret.Get(0).(func(string, string) map[string]string); ok { 1153 r0 = rf(fromChannelId, fromUserId) 1154 } else { 1155 if ret.Get(0) != nil { 1156 r0 = ret.Get(0).(map[string]string) 1157 } 1158 } 1159 1160 var r1 *model.AppError 1161 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 1162 r1 = rf(fromChannelId, fromUserId) 1163 } else { 1164 if ret.Get(1) != nil { 1165 r1 = ret.Get(1).(*model.AppError) 1166 } 1167 } 1168 1169 return r0, r1 1170 } 1171 1172 // MigratePublicChannels provides a mock function with given fields: 1173 func (_m *ChannelStore) MigratePublicChannels() error { 1174 ret := _m.Called() 1175 1176 var r0 error 1177 if rf, ok := ret.Get(0).(func() error); ok { 1178 r0 = rf() 1179 } else { 1180 r0 = ret.Error(0) 1181 } 1182 1183 return r0 1184 } 1185 1186 // PermanentDelete provides a mock function with given fields: channelId 1187 func (_m *ChannelStore) PermanentDelete(channelId string) store.StoreChannel { 1188 ret := _m.Called(channelId) 1189 1190 var r0 store.StoreChannel 1191 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 1192 r0 = rf(channelId) 1193 } else { 1194 if ret.Get(0) != nil { 1195 r0 = ret.Get(0).(store.StoreChannel) 1196 } 1197 } 1198 1199 return r0 1200 } 1201 1202 // PermanentDeleteByTeam provides a mock function with given fields: teamId 1203 func (_m *ChannelStore) PermanentDeleteByTeam(teamId string) store.StoreChannel { 1204 ret := _m.Called(teamId) 1205 1206 var r0 store.StoreChannel 1207 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 1208 r0 = rf(teamId) 1209 } else { 1210 if ret.Get(0) != nil { 1211 r0 = ret.Get(0).(store.StoreChannel) 1212 } 1213 } 1214 1215 return r0 1216 } 1217 1218 // PermanentDeleteMembersByChannel provides a mock function with given fields: channelId 1219 func (_m *ChannelStore) PermanentDeleteMembersByChannel(channelId string) *model.AppError { 1220 ret := _m.Called(channelId) 1221 1222 var r0 *model.AppError 1223 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 1224 r0 = rf(channelId) 1225 } else { 1226 if ret.Get(0) != nil { 1227 r0 = ret.Get(0).(*model.AppError) 1228 } 1229 } 1230 1231 return r0 1232 } 1233 1234 // PermanentDeleteMembersByUser provides a mock function with given fields: userId 1235 func (_m *ChannelStore) PermanentDeleteMembersByUser(userId string) *model.AppError { 1236 ret := _m.Called(userId) 1237 1238 var r0 *model.AppError 1239 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 1240 r0 = rf(userId) 1241 } else { 1242 if ret.Get(0) != nil { 1243 r0 = ret.Get(0).(*model.AppError) 1244 } 1245 } 1246 1247 return r0 1248 } 1249 1250 // RemoveAllDeactivatedMembers provides a mock function with given fields: channelId 1251 func (_m *ChannelStore) RemoveAllDeactivatedMembers(channelId string) *model.AppError { 1252 ret := _m.Called(channelId) 1253 1254 var r0 *model.AppError 1255 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 1256 r0 = rf(channelId) 1257 } else { 1258 if ret.Get(0) != nil { 1259 r0 = ret.Get(0).(*model.AppError) 1260 } 1261 } 1262 1263 return r0 1264 } 1265 1266 // RemoveMember provides a mock function with given fields: channelId, userId 1267 func (_m *ChannelStore) RemoveMember(channelId string, userId string) *model.AppError { 1268 ret := _m.Called(channelId, userId) 1269 1270 var r0 *model.AppError 1271 if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok { 1272 r0 = rf(channelId, userId) 1273 } else { 1274 if ret.Get(0) != nil { 1275 r0 = ret.Get(0).(*model.AppError) 1276 } 1277 } 1278 1279 return r0 1280 } 1281 1282 // ResetAllChannelSchemes provides a mock function with given fields: 1283 func (_m *ChannelStore) ResetAllChannelSchemes() *model.AppError { 1284 ret := _m.Called() 1285 1286 var r0 *model.AppError 1287 if rf, ok := ret.Get(0).(func() *model.AppError); ok { 1288 r0 = rf() 1289 } else { 1290 if ret.Get(0) != nil { 1291 r0 = ret.Get(0).(*model.AppError) 1292 } 1293 } 1294 1295 return r0 1296 } 1297 1298 // Restore provides a mock function with given fields: channelId, time 1299 func (_m *ChannelStore) Restore(channelId string, time int64) *model.AppError { 1300 ret := _m.Called(channelId, time) 1301 1302 var r0 *model.AppError 1303 if rf, ok := ret.Get(0).(func(string, int64) *model.AppError); ok { 1304 r0 = rf(channelId, time) 1305 } else { 1306 if ret.Get(0) != nil { 1307 r0 = ret.Get(0).(*model.AppError) 1308 } 1309 } 1310 1311 return r0 1312 } 1313 1314 // Save provides a mock function with given fields: channel, maxChannelsPerTeam 1315 func (_m *ChannelStore) Save(channel *model.Channel, maxChannelsPerTeam int64) (*model.Channel, *model.AppError) { 1316 ret := _m.Called(channel, maxChannelsPerTeam) 1317 1318 var r0 *model.Channel 1319 if rf, ok := ret.Get(0).(func(*model.Channel, int64) *model.Channel); ok { 1320 r0 = rf(channel, maxChannelsPerTeam) 1321 } else { 1322 if ret.Get(0) != nil { 1323 r0 = ret.Get(0).(*model.Channel) 1324 } 1325 } 1326 1327 var r1 *model.AppError 1328 if rf, ok := ret.Get(1).(func(*model.Channel, int64) *model.AppError); ok { 1329 r1 = rf(channel, maxChannelsPerTeam) 1330 } else { 1331 if ret.Get(1) != nil { 1332 r1 = ret.Get(1).(*model.AppError) 1333 } 1334 } 1335 1336 return r0, r1 1337 } 1338 1339 // SaveDirectChannel provides a mock function with given fields: channel, member1, member2 1340 func (_m *ChannelStore) SaveDirectChannel(channel *model.Channel, member1 *model.ChannelMember, member2 *model.ChannelMember) (*model.Channel, *model.AppError) { 1341 ret := _m.Called(channel, member1, member2) 1342 1343 var r0 *model.Channel 1344 if rf, ok := ret.Get(0).(func(*model.Channel, *model.ChannelMember, *model.ChannelMember) *model.Channel); ok { 1345 r0 = rf(channel, member1, member2) 1346 } else { 1347 if ret.Get(0) != nil { 1348 r0 = ret.Get(0).(*model.Channel) 1349 } 1350 } 1351 1352 var r1 *model.AppError 1353 if rf, ok := ret.Get(1).(func(*model.Channel, *model.ChannelMember, *model.ChannelMember) *model.AppError); ok { 1354 r1 = rf(channel, member1, member2) 1355 } else { 1356 if ret.Get(1) != nil { 1357 r1 = ret.Get(1).(*model.AppError) 1358 } 1359 } 1360 1361 return r0, r1 1362 } 1363 1364 // SaveMember provides a mock function with given fields: member 1365 func (_m *ChannelStore) SaveMember(member *model.ChannelMember) store.StoreChannel { 1366 ret := _m.Called(member) 1367 1368 var r0 store.StoreChannel 1369 if rf, ok := ret.Get(0).(func(*model.ChannelMember) store.StoreChannel); ok { 1370 r0 = rf(member) 1371 } else { 1372 if ret.Get(0) != nil { 1373 r0 = ret.Get(0).(store.StoreChannel) 1374 } 1375 } 1376 1377 return r0 1378 } 1379 1380 // SearchAllChannels provides a mock function with given fields: term, opts 1381 func (_m *ChannelStore) SearchAllChannels(term string, opts store.ChannelSearchOpts) (*model.ChannelListWithTeamData, *model.AppError) { 1382 ret := _m.Called(term, opts) 1383 1384 var r0 *model.ChannelListWithTeamData 1385 if rf, ok := ret.Get(0).(func(string, store.ChannelSearchOpts) *model.ChannelListWithTeamData); ok { 1386 r0 = rf(term, opts) 1387 } else { 1388 if ret.Get(0) != nil { 1389 r0 = ret.Get(0).(*model.ChannelListWithTeamData) 1390 } 1391 } 1392 1393 var r1 *model.AppError 1394 if rf, ok := ret.Get(1).(func(string, store.ChannelSearchOpts) *model.AppError); ok { 1395 r1 = rf(term, opts) 1396 } else { 1397 if ret.Get(1) != nil { 1398 r1 = ret.Get(1).(*model.AppError) 1399 } 1400 } 1401 1402 return r0, r1 1403 } 1404 1405 // SearchGroupChannels provides a mock function with given fields: userId, term 1406 func (_m *ChannelStore) SearchGroupChannels(userId string, term string) (*model.ChannelList, *model.AppError) { 1407 ret := _m.Called(userId, term) 1408 1409 var r0 *model.ChannelList 1410 if rf, ok := ret.Get(0).(func(string, string) *model.ChannelList); ok { 1411 r0 = rf(userId, term) 1412 } else { 1413 if ret.Get(0) != nil { 1414 r0 = ret.Get(0).(*model.ChannelList) 1415 } 1416 } 1417 1418 var r1 *model.AppError 1419 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 1420 r1 = rf(userId, term) 1421 } else { 1422 if ret.Get(1) != nil { 1423 r1 = ret.Get(1).(*model.AppError) 1424 } 1425 } 1426 1427 return r0, r1 1428 } 1429 1430 // SearchInTeam provides a mock function with given fields: teamId, term, includeDeleted 1431 func (_m *ChannelStore) SearchInTeam(teamId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) { 1432 ret := _m.Called(teamId, term, includeDeleted) 1433 1434 var r0 *model.ChannelList 1435 if rf, ok := ret.Get(0).(func(string, string, bool) *model.ChannelList); ok { 1436 r0 = rf(teamId, term, includeDeleted) 1437 } else { 1438 if ret.Get(0) != nil { 1439 r0 = ret.Get(0).(*model.ChannelList) 1440 } 1441 } 1442 1443 var r1 *model.AppError 1444 if rf, ok := ret.Get(1).(func(string, string, bool) *model.AppError); ok { 1445 r1 = rf(teamId, term, includeDeleted) 1446 } else { 1447 if ret.Get(1) != nil { 1448 r1 = ret.Get(1).(*model.AppError) 1449 } 1450 } 1451 1452 return r0, r1 1453 } 1454 1455 // SearchMore provides a mock function with given fields: userId, teamId, term 1456 func (_m *ChannelStore) SearchMore(userId string, teamId string, term string) (*model.ChannelList, *model.AppError) { 1457 ret := _m.Called(userId, teamId, term) 1458 1459 var r0 *model.ChannelList 1460 if rf, ok := ret.Get(0).(func(string, string, string) *model.ChannelList); ok { 1461 r0 = rf(userId, teamId, term) 1462 } else { 1463 if ret.Get(0) != nil { 1464 r0 = ret.Get(0).(*model.ChannelList) 1465 } 1466 } 1467 1468 var r1 *model.AppError 1469 if rf, ok := ret.Get(1).(func(string, string, string) *model.AppError); ok { 1470 r1 = rf(userId, teamId, term) 1471 } else { 1472 if ret.Get(1) != nil { 1473 r1 = ret.Get(1).(*model.AppError) 1474 } 1475 } 1476 1477 return r0, r1 1478 } 1479 1480 // SetDeleteAt provides a mock function with given fields: channelId, deleteAt, updateAt 1481 func (_m *ChannelStore) SetDeleteAt(channelId string, deleteAt int64, updateAt int64) *model.AppError { 1482 ret := _m.Called(channelId, deleteAt, updateAt) 1483 1484 var r0 *model.AppError 1485 if rf, ok := ret.Get(0).(func(string, int64, int64) *model.AppError); ok { 1486 r0 = rf(channelId, deleteAt, updateAt) 1487 } else { 1488 if ret.Get(0) != nil { 1489 r0 = ret.Get(0).(*model.AppError) 1490 } 1491 } 1492 1493 return r0 1494 } 1495 1496 // Update provides a mock function with given fields: channel 1497 func (_m *ChannelStore) Update(channel *model.Channel) (*model.Channel, *model.AppError) { 1498 ret := _m.Called(channel) 1499 1500 var r0 *model.Channel 1501 if rf, ok := ret.Get(0).(func(*model.Channel) *model.Channel); ok { 1502 r0 = rf(channel) 1503 } else { 1504 if ret.Get(0) != nil { 1505 r0 = ret.Get(0).(*model.Channel) 1506 } 1507 } 1508 1509 var r1 *model.AppError 1510 if rf, ok := ret.Get(1).(func(*model.Channel) *model.AppError); ok { 1511 r1 = rf(channel) 1512 } else { 1513 if ret.Get(1) != nil { 1514 r1 = ret.Get(1).(*model.AppError) 1515 } 1516 } 1517 1518 return r0, r1 1519 } 1520 1521 // UpdateLastViewedAt provides a mock function with given fields: channelIds, userId 1522 func (_m *ChannelStore) UpdateLastViewedAt(channelIds []string, userId string) (map[string]int64, *model.AppError) { 1523 ret := _m.Called(channelIds, userId) 1524 1525 var r0 map[string]int64 1526 if rf, ok := ret.Get(0).(func([]string, string) map[string]int64); ok { 1527 r0 = rf(channelIds, userId) 1528 } else { 1529 if ret.Get(0) != nil { 1530 r0 = ret.Get(0).(map[string]int64) 1531 } 1532 } 1533 1534 var r1 *model.AppError 1535 if rf, ok := ret.Get(1).(func([]string, string) *model.AppError); ok { 1536 r1 = rf(channelIds, userId) 1537 } else { 1538 if ret.Get(1) != nil { 1539 r1 = ret.Get(1).(*model.AppError) 1540 } 1541 } 1542 1543 return r0, r1 1544 } 1545 1546 // UpdateMember provides a mock function with given fields: member 1547 func (_m *ChannelStore) UpdateMember(member *model.ChannelMember) (*model.ChannelMember, *model.AppError) { 1548 ret := _m.Called(member) 1549 1550 var r0 *model.ChannelMember 1551 if rf, ok := ret.Get(0).(func(*model.ChannelMember) *model.ChannelMember); ok { 1552 r0 = rf(member) 1553 } else { 1554 if ret.Get(0) != nil { 1555 r0 = ret.Get(0).(*model.ChannelMember) 1556 } 1557 } 1558 1559 var r1 *model.AppError 1560 if rf, ok := ret.Get(1).(func(*model.ChannelMember) *model.AppError); ok { 1561 r1 = rf(member) 1562 } else { 1563 if ret.Get(1) != nil { 1564 r1 = ret.Get(1).(*model.AppError) 1565 } 1566 } 1567 1568 return r0, r1 1569 } 1570 1571 // UserBelongsToChannels provides a mock function with given fields: userId, channelIds 1572 func (_m *ChannelStore) UserBelongsToChannels(userId string, channelIds []string) (bool, *model.AppError) { 1573 ret := _m.Called(userId, channelIds) 1574 1575 var r0 bool 1576 if rf, ok := ret.Get(0).(func(string, []string) bool); ok { 1577 r0 = rf(userId, channelIds) 1578 } else { 1579 r0 = ret.Get(0).(bool) 1580 } 1581 1582 var r1 *model.AppError 1583 if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok { 1584 r1 = rf(userId, channelIds) 1585 } else { 1586 if ret.Get(1) != nil { 1587 r1 = ret.Get(1).(*model.AppError) 1588 } 1589 } 1590 1591 return r0, r1 1592 }