github.com/qichengzx/mattermost-server@v4.5.1-0.20180604164826-2c75247c97d0+incompatible/store/storetest/mocks/TeamStore.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/mattermost/mattermost-server/model" 9 import store "github.com/mattermost/mattermost-server/store" 10 11 // TeamStore is an autogenerated mock type for the TeamStore type 12 type TeamStore struct { 13 mock.Mock 14 } 15 16 // AnalyticsTeamCount provides a mock function with given fields: 17 func (_m *TeamStore) AnalyticsTeamCount() store.StoreChannel { 18 ret := _m.Called() 19 20 var r0 store.StoreChannel 21 if rf, ok := ret.Get(0).(func() store.StoreChannel); ok { 22 r0 = rf() 23 } else { 24 if ret.Get(0) != nil { 25 r0 = ret.Get(0).(store.StoreChannel) 26 } 27 } 28 29 return r0 30 } 31 32 // Get provides a mock function with given fields: id 33 func (_m *TeamStore) Get(id string) store.StoreChannel { 34 ret := _m.Called(id) 35 36 var r0 store.StoreChannel 37 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 38 r0 = rf(id) 39 } else { 40 if ret.Get(0) != nil { 41 r0 = ret.Get(0).(store.StoreChannel) 42 } 43 } 44 45 return r0 46 } 47 48 // GetActiveMemberCount provides a mock function with given fields: teamId 49 func (_m *TeamStore) GetActiveMemberCount(teamId string) store.StoreChannel { 50 ret := _m.Called(teamId) 51 52 var r0 store.StoreChannel 53 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 54 r0 = rf(teamId) 55 } else { 56 if ret.Get(0) != nil { 57 r0 = ret.Get(0).(store.StoreChannel) 58 } 59 } 60 61 return r0 62 } 63 64 // GetAll provides a mock function with given fields: 65 func (_m *TeamStore) GetAll() store.StoreChannel { 66 ret := _m.Called() 67 68 var r0 store.StoreChannel 69 if rf, ok := ret.Get(0).(func() store.StoreChannel); ok { 70 r0 = rf() 71 } else { 72 if ret.Get(0) != nil { 73 r0 = ret.Get(0).(store.StoreChannel) 74 } 75 } 76 77 return r0 78 } 79 80 // GetAllPage provides a mock function with given fields: offset, limit 81 func (_m *TeamStore) GetAllPage(offset int, limit int) store.StoreChannel { 82 ret := _m.Called(offset, limit) 83 84 var r0 store.StoreChannel 85 if rf, ok := ret.Get(0).(func(int, int) store.StoreChannel); ok { 86 r0 = rf(offset, limit) 87 } else { 88 if ret.Get(0) != nil { 89 r0 = ret.Get(0).(store.StoreChannel) 90 } 91 } 92 93 return r0 94 } 95 96 // GetAllTeamListing provides a mock function with given fields: 97 func (_m *TeamStore) GetAllTeamListing() store.StoreChannel { 98 ret := _m.Called() 99 100 var r0 store.StoreChannel 101 if rf, ok := ret.Get(0).(func() store.StoreChannel); ok { 102 r0 = rf() 103 } else { 104 if ret.Get(0) != nil { 105 r0 = ret.Get(0).(store.StoreChannel) 106 } 107 } 108 109 return r0 110 } 111 112 // GetAllTeamPageListing provides a mock function with given fields: offset, limit 113 func (_m *TeamStore) GetAllTeamPageListing(offset int, limit int) store.StoreChannel { 114 ret := _m.Called(offset, limit) 115 116 var r0 store.StoreChannel 117 if rf, ok := ret.Get(0).(func(int, int) store.StoreChannel); ok { 118 r0 = rf(offset, limit) 119 } else { 120 if ret.Get(0) != nil { 121 r0 = ret.Get(0).(store.StoreChannel) 122 } 123 } 124 125 return r0 126 } 127 128 // GetByInviteId provides a mock function with given fields: inviteId 129 func (_m *TeamStore) GetByInviteId(inviteId string) store.StoreChannel { 130 ret := _m.Called(inviteId) 131 132 var r0 store.StoreChannel 133 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 134 r0 = rf(inviteId) 135 } else { 136 if ret.Get(0) != nil { 137 r0 = ret.Get(0).(store.StoreChannel) 138 } 139 } 140 141 return r0 142 } 143 144 // GetByName provides a mock function with given fields: name 145 func (_m *TeamStore) GetByName(name string) store.StoreChannel { 146 ret := _m.Called(name) 147 148 var r0 store.StoreChannel 149 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 150 r0 = rf(name) 151 } else { 152 if ret.Get(0) != nil { 153 r0 = ret.Get(0).(store.StoreChannel) 154 } 155 } 156 157 return r0 158 } 159 160 // GetChannelUnreadsForAllTeams provides a mock function with given fields: excludeTeamId, userId 161 func (_m *TeamStore) GetChannelUnreadsForAllTeams(excludeTeamId string, userId string) store.StoreChannel { 162 ret := _m.Called(excludeTeamId, userId) 163 164 var r0 store.StoreChannel 165 if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { 166 r0 = rf(excludeTeamId, userId) 167 } else { 168 if ret.Get(0) != nil { 169 r0 = ret.Get(0).(store.StoreChannel) 170 } 171 } 172 173 return r0 174 } 175 176 // GetChannelUnreadsForTeam provides a mock function with given fields: teamId, userId 177 func (_m *TeamStore) GetChannelUnreadsForTeam(teamId string, userId string) store.StoreChannel { 178 ret := _m.Called(teamId, userId) 179 180 var r0 store.StoreChannel 181 if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { 182 r0 = rf(teamId, userId) 183 } else { 184 if ret.Get(0) != nil { 185 r0 = ret.Get(0).(store.StoreChannel) 186 } 187 } 188 189 return r0 190 } 191 192 // GetMember provides a mock function with given fields: teamId, userId 193 func (_m *TeamStore) GetMember(teamId string, userId string) store.StoreChannel { 194 ret := _m.Called(teamId, userId) 195 196 var r0 store.StoreChannel 197 if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { 198 r0 = rf(teamId, userId) 199 } else { 200 if ret.Get(0) != nil { 201 r0 = ret.Get(0).(store.StoreChannel) 202 } 203 } 204 205 return r0 206 } 207 208 // GetMembers provides a mock function with given fields: teamId, offset, limit 209 func (_m *TeamStore) GetMembers(teamId string, offset int, limit int) store.StoreChannel { 210 ret := _m.Called(teamId, offset, limit) 211 212 var r0 store.StoreChannel 213 if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok { 214 r0 = rf(teamId, offset, limit) 215 } else { 216 if ret.Get(0) != nil { 217 r0 = ret.Get(0).(store.StoreChannel) 218 } 219 } 220 221 return r0 222 } 223 224 // GetMembersByIds provides a mock function with given fields: teamId, userIds 225 func (_m *TeamStore) GetMembersByIds(teamId string, userIds []string) store.StoreChannel { 226 ret := _m.Called(teamId, userIds) 227 228 var r0 store.StoreChannel 229 if rf, ok := ret.Get(0).(func(string, []string) store.StoreChannel); ok { 230 r0 = rf(teamId, userIds) 231 } else { 232 if ret.Get(0) != nil { 233 r0 = ret.Get(0).(store.StoreChannel) 234 } 235 } 236 237 return r0 238 } 239 240 // GetTeamsByScheme provides a mock function with given fields: schemeId, offset, limit 241 func (_m *TeamStore) GetTeamsByScheme(schemeId string, offset int, limit int) store.StoreChannel { 242 ret := _m.Called(schemeId, offset, limit) 243 244 var r0 store.StoreChannel 245 if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok { 246 r0 = rf(schemeId, offset, limit) 247 } else { 248 if ret.Get(0) != nil { 249 r0 = ret.Get(0).(store.StoreChannel) 250 } 251 } 252 253 return r0 254 } 255 256 // GetTeamsByUserId provides a mock function with given fields: userId 257 func (_m *TeamStore) GetTeamsByUserId(userId string) store.StoreChannel { 258 ret := _m.Called(userId) 259 260 var r0 store.StoreChannel 261 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 262 r0 = rf(userId) 263 } else { 264 if ret.Get(0) != nil { 265 r0 = ret.Get(0).(store.StoreChannel) 266 } 267 } 268 269 return r0 270 } 271 272 // GetTeamsForUser provides a mock function with given fields: userId 273 func (_m *TeamStore) GetTeamsForUser(userId string) store.StoreChannel { 274 ret := _m.Called(userId) 275 276 var r0 store.StoreChannel 277 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 278 r0 = rf(userId) 279 } else { 280 if ret.Get(0) != nil { 281 r0 = ret.Get(0).(store.StoreChannel) 282 } 283 } 284 285 return r0 286 } 287 288 // GetTotalMemberCount provides a mock function with given fields: teamId 289 func (_m *TeamStore) GetTotalMemberCount(teamId string) store.StoreChannel { 290 ret := _m.Called(teamId) 291 292 var r0 store.StoreChannel 293 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 294 r0 = rf(teamId) 295 } else { 296 if ret.Get(0) != nil { 297 r0 = ret.Get(0).(store.StoreChannel) 298 } 299 } 300 301 return r0 302 } 303 304 // MigrateTeamMembers provides a mock function with given fields: fromTeamId, fromUserId 305 func (_m *TeamStore) MigrateTeamMembers(fromTeamId string, fromUserId string) store.StoreChannel { 306 ret := _m.Called(fromTeamId, fromUserId) 307 308 var r0 store.StoreChannel 309 if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { 310 r0 = rf(fromTeamId, fromUserId) 311 } else { 312 if ret.Get(0) != nil { 313 r0 = ret.Get(0).(store.StoreChannel) 314 } 315 } 316 317 return r0 318 } 319 320 // PermanentDelete provides a mock function with given fields: teamId 321 func (_m *TeamStore) PermanentDelete(teamId string) store.StoreChannel { 322 ret := _m.Called(teamId) 323 324 var r0 store.StoreChannel 325 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 326 r0 = rf(teamId) 327 } else { 328 if ret.Get(0) != nil { 329 r0 = ret.Get(0).(store.StoreChannel) 330 } 331 } 332 333 return r0 334 } 335 336 // RemoveAllMembersByTeam provides a mock function with given fields: teamId 337 func (_m *TeamStore) RemoveAllMembersByTeam(teamId string) store.StoreChannel { 338 ret := _m.Called(teamId) 339 340 var r0 store.StoreChannel 341 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 342 r0 = rf(teamId) 343 } else { 344 if ret.Get(0) != nil { 345 r0 = ret.Get(0).(store.StoreChannel) 346 } 347 } 348 349 return r0 350 } 351 352 // RemoveAllMembersByUser provides a mock function with given fields: userId 353 func (_m *TeamStore) RemoveAllMembersByUser(userId string) store.StoreChannel { 354 ret := _m.Called(userId) 355 356 var r0 store.StoreChannel 357 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 358 r0 = rf(userId) 359 } else { 360 if ret.Get(0) != nil { 361 r0 = ret.Get(0).(store.StoreChannel) 362 } 363 } 364 365 return r0 366 } 367 368 // RemoveMember provides a mock function with given fields: teamId, userId 369 func (_m *TeamStore) RemoveMember(teamId string, userId string) store.StoreChannel { 370 ret := _m.Called(teamId, userId) 371 372 var r0 store.StoreChannel 373 if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { 374 r0 = rf(teamId, userId) 375 } else { 376 if ret.Get(0) != nil { 377 r0 = ret.Get(0).(store.StoreChannel) 378 } 379 } 380 381 return r0 382 } 383 384 // ResetAllTeamSchemes provides a mock function with given fields: 385 func (_m *TeamStore) ResetAllTeamSchemes() store.StoreChannel { 386 ret := _m.Called() 387 388 var r0 store.StoreChannel 389 if rf, ok := ret.Get(0).(func() store.StoreChannel); ok { 390 r0 = rf() 391 } else { 392 if ret.Get(0) != nil { 393 r0 = ret.Get(0).(store.StoreChannel) 394 } 395 } 396 397 return r0 398 } 399 400 // Save provides a mock function with given fields: team 401 func (_m *TeamStore) Save(team *model.Team) store.StoreChannel { 402 ret := _m.Called(team) 403 404 var r0 store.StoreChannel 405 if rf, ok := ret.Get(0).(func(*model.Team) store.StoreChannel); ok { 406 r0 = rf(team) 407 } else { 408 if ret.Get(0) != nil { 409 r0 = ret.Get(0).(store.StoreChannel) 410 } 411 } 412 413 return r0 414 } 415 416 // SaveMember provides a mock function with given fields: member, maxUsersPerTeam 417 func (_m *TeamStore) SaveMember(member *model.TeamMember, maxUsersPerTeam int) store.StoreChannel { 418 ret := _m.Called(member, maxUsersPerTeam) 419 420 var r0 store.StoreChannel 421 if rf, ok := ret.Get(0).(func(*model.TeamMember, int) store.StoreChannel); ok { 422 r0 = rf(member, maxUsersPerTeam) 423 } else { 424 if ret.Get(0) != nil { 425 r0 = ret.Get(0).(store.StoreChannel) 426 } 427 } 428 429 return r0 430 } 431 432 // SearchAll provides a mock function with given fields: term 433 func (_m *TeamStore) SearchAll(term string) store.StoreChannel { 434 ret := _m.Called(term) 435 436 var r0 store.StoreChannel 437 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 438 r0 = rf(term) 439 } else { 440 if ret.Get(0) != nil { 441 r0 = ret.Get(0).(store.StoreChannel) 442 } 443 } 444 445 return r0 446 } 447 448 // SearchByName provides a mock function with given fields: name 449 func (_m *TeamStore) SearchByName(name string) store.StoreChannel { 450 ret := _m.Called(name) 451 452 var r0 store.StoreChannel 453 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 454 r0 = rf(name) 455 } else { 456 if ret.Get(0) != nil { 457 r0 = ret.Get(0).(store.StoreChannel) 458 } 459 } 460 461 return r0 462 } 463 464 // SearchOpen provides a mock function with given fields: term 465 func (_m *TeamStore) SearchOpen(term string) store.StoreChannel { 466 ret := _m.Called(term) 467 468 var r0 store.StoreChannel 469 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 470 r0 = rf(term) 471 } else { 472 if ret.Get(0) != nil { 473 r0 = ret.Get(0).(store.StoreChannel) 474 } 475 } 476 477 return r0 478 } 479 480 // Update provides a mock function with given fields: team 481 func (_m *TeamStore) Update(team *model.Team) store.StoreChannel { 482 ret := _m.Called(team) 483 484 var r0 store.StoreChannel 485 if rf, ok := ret.Get(0).(func(*model.Team) store.StoreChannel); ok { 486 r0 = rf(team) 487 } else { 488 if ret.Get(0) != nil { 489 r0 = ret.Get(0).(store.StoreChannel) 490 } 491 } 492 493 return r0 494 } 495 496 // UpdateDisplayName provides a mock function with given fields: name, teamId 497 func (_m *TeamStore) UpdateDisplayName(name string, teamId string) store.StoreChannel { 498 ret := _m.Called(name, teamId) 499 500 var r0 store.StoreChannel 501 if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { 502 r0 = rf(name, teamId) 503 } else { 504 if ret.Get(0) != nil { 505 r0 = ret.Get(0).(store.StoreChannel) 506 } 507 } 508 509 return r0 510 } 511 512 // UpdateLastTeamIconUpdate provides a mock function with given fields: teamId, curTime 513 func (_m *TeamStore) UpdateLastTeamIconUpdate(teamId string, curTime int64) store.StoreChannel { 514 ret := _m.Called(teamId, curTime) 515 516 var r0 store.StoreChannel 517 if rf, ok := ret.Get(0).(func(string, int64) store.StoreChannel); ok { 518 r0 = rf(teamId, curTime) 519 } else { 520 if ret.Get(0) != nil { 521 r0 = ret.Get(0).(store.StoreChannel) 522 } 523 } 524 525 return r0 526 } 527 528 // UpdateMember provides a mock function with given fields: member 529 func (_m *TeamStore) UpdateMember(member *model.TeamMember) store.StoreChannel { 530 ret := _m.Called(member) 531 532 var r0 store.StoreChannel 533 if rf, ok := ret.Get(0).(func(*model.TeamMember) store.StoreChannel); ok { 534 r0 = rf(member) 535 } else { 536 if ret.Get(0) != nil { 537 r0 = ret.Get(0).(store.StoreChannel) 538 } 539 } 540 541 return r0 542 }