github.com/trigonella/mattermost-server@v5.11.1+incompatible/plugin/plugintest/api.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 // Regenerate this file using `make plugin-mocks`. 4 5 package plugintest 6 7 import mock "github.com/stretchr/testify/mock" 8 import model "github.com/mattermost/mattermost-server/model" 9 10 // API is an autogenerated mock type for the API type 11 type API struct { 12 mock.Mock 13 } 14 15 // AddChannelMember provides a mock function with given fields: channelId, userId 16 func (_m *API) AddChannelMember(channelId string, userId string) (*model.ChannelMember, *model.AppError) { 17 ret := _m.Called(channelId, userId) 18 19 var r0 *model.ChannelMember 20 if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMember); ok { 21 r0 = rf(channelId, userId) 22 } else { 23 if ret.Get(0) != nil { 24 r0 = ret.Get(0).(*model.ChannelMember) 25 } 26 } 27 28 var r1 *model.AppError 29 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 30 r1 = rf(channelId, userId) 31 } else { 32 if ret.Get(1) != nil { 33 r1 = ret.Get(1).(*model.AppError) 34 } 35 } 36 37 return r0, r1 38 } 39 40 // AddReaction provides a mock function with given fields: reaction 41 func (_m *API) AddReaction(reaction *model.Reaction) (*model.Reaction, *model.AppError) { 42 ret := _m.Called(reaction) 43 44 var r0 *model.Reaction 45 if rf, ok := ret.Get(0).(func(*model.Reaction) *model.Reaction); ok { 46 r0 = rf(reaction) 47 } else { 48 if ret.Get(0) != nil { 49 r0 = ret.Get(0).(*model.Reaction) 50 } 51 } 52 53 var r1 *model.AppError 54 if rf, ok := ret.Get(1).(func(*model.Reaction) *model.AppError); ok { 55 r1 = rf(reaction) 56 } else { 57 if ret.Get(1) != nil { 58 r1 = ret.Get(1).(*model.AppError) 59 } 60 } 61 62 return r0, r1 63 } 64 65 // CopyFileInfos provides a mock function with given fields: userId, fileIds 66 func (_m *API) CopyFileInfos(userId string, fileIds []string) ([]string, *model.AppError) { 67 ret := _m.Called(userId, fileIds) 68 69 var r0 []string 70 if rf, ok := ret.Get(0).(func(string, []string) []string); ok { 71 r0 = rf(userId, fileIds) 72 } else { 73 if ret.Get(0) != nil { 74 r0 = ret.Get(0).([]string) 75 } 76 } 77 78 var r1 *model.AppError 79 if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok { 80 r1 = rf(userId, fileIds) 81 } else { 82 if ret.Get(1) != nil { 83 r1 = ret.Get(1).(*model.AppError) 84 } 85 } 86 87 return r0, r1 88 } 89 90 // CreateBot provides a mock function with given fields: bot 91 func (_m *API) CreateBot(bot *model.Bot) (*model.Bot, *model.AppError) { 92 ret := _m.Called(bot) 93 94 var r0 *model.Bot 95 if rf, ok := ret.Get(0).(func(*model.Bot) *model.Bot); ok { 96 r0 = rf(bot) 97 } else { 98 if ret.Get(0) != nil { 99 r0 = ret.Get(0).(*model.Bot) 100 } 101 } 102 103 var r1 *model.AppError 104 if rf, ok := ret.Get(1).(func(*model.Bot) *model.AppError); ok { 105 r1 = rf(bot) 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 // CreateChannel provides a mock function with given fields: channel 116 func (_m *API) CreateChannel(channel *model.Channel) (*model.Channel, *model.AppError) { 117 ret := _m.Called(channel) 118 119 var r0 *model.Channel 120 if rf, ok := ret.Get(0).(func(*model.Channel) *model.Channel); ok { 121 r0 = rf(channel) 122 } else { 123 if ret.Get(0) != nil { 124 r0 = ret.Get(0).(*model.Channel) 125 } 126 } 127 128 var r1 *model.AppError 129 if rf, ok := ret.Get(1).(func(*model.Channel) *model.AppError); ok { 130 r1 = rf(channel) 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 // CreatePost provides a mock function with given fields: post 141 func (_m *API) CreatePost(post *model.Post) (*model.Post, *model.AppError) { 142 ret := _m.Called(post) 143 144 var r0 *model.Post 145 if rf, ok := ret.Get(0).(func(*model.Post) *model.Post); ok { 146 r0 = rf(post) 147 } else { 148 if ret.Get(0) != nil { 149 r0 = ret.Get(0).(*model.Post) 150 } 151 } 152 153 var r1 *model.AppError 154 if rf, ok := ret.Get(1).(func(*model.Post) *model.AppError); ok { 155 r1 = rf(post) 156 } else { 157 if ret.Get(1) != nil { 158 r1 = ret.Get(1).(*model.AppError) 159 } 160 } 161 162 return r0, r1 163 } 164 165 // CreateTeam provides a mock function with given fields: team 166 func (_m *API) CreateTeam(team *model.Team) (*model.Team, *model.AppError) { 167 ret := _m.Called(team) 168 169 var r0 *model.Team 170 if rf, ok := ret.Get(0).(func(*model.Team) *model.Team); ok { 171 r0 = rf(team) 172 } else { 173 if ret.Get(0) != nil { 174 r0 = ret.Get(0).(*model.Team) 175 } 176 } 177 178 var r1 *model.AppError 179 if rf, ok := ret.Get(1).(func(*model.Team) *model.AppError); ok { 180 r1 = rf(team) 181 } else { 182 if ret.Get(1) != nil { 183 r1 = ret.Get(1).(*model.AppError) 184 } 185 } 186 187 return r0, r1 188 } 189 190 // CreateTeamMember provides a mock function with given fields: teamId, userId 191 func (_m *API) CreateTeamMember(teamId string, userId string) (*model.TeamMember, *model.AppError) { 192 ret := _m.Called(teamId, userId) 193 194 var r0 *model.TeamMember 195 if rf, ok := ret.Get(0).(func(string, string) *model.TeamMember); ok { 196 r0 = rf(teamId, userId) 197 } else { 198 if ret.Get(0) != nil { 199 r0 = ret.Get(0).(*model.TeamMember) 200 } 201 } 202 203 var r1 *model.AppError 204 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 205 r1 = rf(teamId, userId) 206 } else { 207 if ret.Get(1) != nil { 208 r1 = ret.Get(1).(*model.AppError) 209 } 210 } 211 212 return r0, r1 213 } 214 215 // CreateTeamMembers provides a mock function with given fields: teamId, userIds, requestorId 216 func (_m *API) CreateTeamMembers(teamId string, userIds []string, requestorId string) ([]*model.TeamMember, *model.AppError) { 217 ret := _m.Called(teamId, userIds, requestorId) 218 219 var r0 []*model.TeamMember 220 if rf, ok := ret.Get(0).(func(string, []string, string) []*model.TeamMember); ok { 221 r0 = rf(teamId, userIds, requestorId) 222 } else { 223 if ret.Get(0) != nil { 224 r0 = ret.Get(0).([]*model.TeamMember) 225 } 226 } 227 228 var r1 *model.AppError 229 if rf, ok := ret.Get(1).(func(string, []string, string) *model.AppError); ok { 230 r1 = rf(teamId, userIds, requestorId) 231 } else { 232 if ret.Get(1) != nil { 233 r1 = ret.Get(1).(*model.AppError) 234 } 235 } 236 237 return r0, r1 238 } 239 240 // CreateUser provides a mock function with given fields: user 241 func (_m *API) CreateUser(user *model.User) (*model.User, *model.AppError) { 242 ret := _m.Called(user) 243 244 var r0 *model.User 245 if rf, ok := ret.Get(0).(func(*model.User) *model.User); ok { 246 r0 = rf(user) 247 } else { 248 if ret.Get(0) != nil { 249 r0 = ret.Get(0).(*model.User) 250 } 251 } 252 253 var r1 *model.AppError 254 if rf, ok := ret.Get(1).(func(*model.User) *model.AppError); ok { 255 r1 = rf(user) 256 } else { 257 if ret.Get(1) != nil { 258 r1 = ret.Get(1).(*model.AppError) 259 } 260 } 261 262 return r0, r1 263 } 264 265 // DeleteChannel provides a mock function with given fields: channelId 266 func (_m *API) DeleteChannel(channelId string) *model.AppError { 267 ret := _m.Called(channelId) 268 269 var r0 *model.AppError 270 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 271 r0 = rf(channelId) 272 } else { 273 if ret.Get(0) != nil { 274 r0 = ret.Get(0).(*model.AppError) 275 } 276 } 277 278 return r0 279 } 280 281 // DeleteChannelMember provides a mock function with given fields: channelId, userId 282 func (_m *API) DeleteChannelMember(channelId string, userId string) *model.AppError { 283 ret := _m.Called(channelId, userId) 284 285 var r0 *model.AppError 286 if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok { 287 r0 = rf(channelId, userId) 288 } else { 289 if ret.Get(0) != nil { 290 r0 = ret.Get(0).(*model.AppError) 291 } 292 } 293 294 return r0 295 } 296 297 // DeleteEphemeralPost provides a mock function with given fields: userId, post 298 func (_m *API) DeleteEphemeralPost(userId string, post *model.Post) { 299 _m.Called(userId, post) 300 } 301 302 // DeletePost provides a mock function with given fields: postId 303 func (_m *API) DeletePost(postId string) *model.AppError { 304 ret := _m.Called(postId) 305 306 var r0 *model.AppError 307 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 308 r0 = rf(postId) 309 } else { 310 if ret.Get(0) != nil { 311 r0 = ret.Get(0).(*model.AppError) 312 } 313 } 314 315 return r0 316 } 317 318 // DeleteTeam provides a mock function with given fields: teamId 319 func (_m *API) DeleteTeam(teamId string) *model.AppError { 320 ret := _m.Called(teamId) 321 322 var r0 *model.AppError 323 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 324 r0 = rf(teamId) 325 } else { 326 if ret.Get(0) != nil { 327 r0 = ret.Get(0).(*model.AppError) 328 } 329 } 330 331 return r0 332 } 333 334 // DeleteTeamMember provides a mock function with given fields: teamId, userId, requestorId 335 func (_m *API) DeleteTeamMember(teamId string, userId string, requestorId string) *model.AppError { 336 ret := _m.Called(teamId, userId, requestorId) 337 338 var r0 *model.AppError 339 if rf, ok := ret.Get(0).(func(string, string, string) *model.AppError); ok { 340 r0 = rf(teamId, userId, requestorId) 341 } else { 342 if ret.Get(0) != nil { 343 r0 = ret.Get(0).(*model.AppError) 344 } 345 } 346 347 return r0 348 } 349 350 // DeleteUser provides a mock function with given fields: userId 351 func (_m *API) DeleteUser(userId string) *model.AppError { 352 ret := _m.Called(userId) 353 354 var r0 *model.AppError 355 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 356 r0 = rf(userId) 357 } else { 358 if ret.Get(0) != nil { 359 r0 = ret.Get(0).(*model.AppError) 360 } 361 } 362 363 return r0 364 } 365 366 // DisablePlugin provides a mock function with given fields: id 367 func (_m *API) DisablePlugin(id string) *model.AppError { 368 ret := _m.Called(id) 369 370 var r0 *model.AppError 371 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 372 r0 = rf(id) 373 } else { 374 if ret.Get(0) != nil { 375 r0 = ret.Get(0).(*model.AppError) 376 } 377 } 378 379 return r0 380 } 381 382 // EnablePlugin provides a mock function with given fields: id 383 func (_m *API) EnablePlugin(id string) *model.AppError { 384 ret := _m.Called(id) 385 386 var r0 *model.AppError 387 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 388 r0 = rf(id) 389 } else { 390 if ret.Get(0) != nil { 391 r0 = ret.Get(0).(*model.AppError) 392 } 393 } 394 395 return r0 396 } 397 398 // GetBot provides a mock function with given fields: botUserId, includeDeleted 399 func (_m *API) GetBot(botUserId string, includeDeleted bool) (*model.Bot, *model.AppError) { 400 ret := _m.Called(botUserId, includeDeleted) 401 402 var r0 *model.Bot 403 if rf, ok := ret.Get(0).(func(string, bool) *model.Bot); ok { 404 r0 = rf(botUserId, includeDeleted) 405 } else { 406 if ret.Get(0) != nil { 407 r0 = ret.Get(0).(*model.Bot) 408 } 409 } 410 411 var r1 *model.AppError 412 if rf, ok := ret.Get(1).(func(string, bool) *model.AppError); ok { 413 r1 = rf(botUserId, includeDeleted) 414 } else { 415 if ret.Get(1) != nil { 416 r1 = ret.Get(1).(*model.AppError) 417 } 418 } 419 420 return r0, r1 421 } 422 423 // GetBots provides a mock function with given fields: options 424 func (_m *API) GetBots(options *model.BotGetOptions) ([]*model.Bot, *model.AppError) { 425 ret := _m.Called(options) 426 427 var r0 []*model.Bot 428 if rf, ok := ret.Get(0).(func(*model.BotGetOptions) []*model.Bot); ok { 429 r0 = rf(options) 430 } else { 431 if ret.Get(0) != nil { 432 r0 = ret.Get(0).([]*model.Bot) 433 } 434 } 435 436 var r1 *model.AppError 437 if rf, ok := ret.Get(1).(func(*model.BotGetOptions) *model.AppError); ok { 438 r1 = rf(options) 439 } else { 440 if ret.Get(1) != nil { 441 r1 = ret.Get(1).(*model.AppError) 442 } 443 } 444 445 return r0, r1 446 } 447 448 // GetBundlePath provides a mock function with given fields: 449 func (_m *API) GetBundlePath() (string, error) { 450 ret := _m.Called() 451 452 var r0 string 453 if rf, ok := ret.Get(0).(func() string); ok { 454 r0 = rf() 455 } else { 456 r0 = ret.Get(0).(string) 457 } 458 459 var r1 error 460 if rf, ok := ret.Get(1).(func() error); ok { 461 r1 = rf() 462 } else { 463 r1 = ret.Error(1) 464 } 465 466 return r0, r1 467 } 468 469 // GetChannel provides a mock function with given fields: channelId 470 func (_m *API) GetChannel(channelId string) (*model.Channel, *model.AppError) { 471 ret := _m.Called(channelId) 472 473 var r0 *model.Channel 474 if rf, ok := ret.Get(0).(func(string) *model.Channel); ok { 475 r0 = rf(channelId) 476 } else { 477 if ret.Get(0) != nil { 478 r0 = ret.Get(0).(*model.Channel) 479 } 480 } 481 482 var r1 *model.AppError 483 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 484 r1 = rf(channelId) 485 } else { 486 if ret.Get(1) != nil { 487 r1 = ret.Get(1).(*model.AppError) 488 } 489 } 490 491 return r0, r1 492 } 493 494 // GetChannelByName provides a mock function with given fields: teamId, name, includeDeleted 495 func (_m *API) GetChannelByName(teamId string, name string, includeDeleted bool) (*model.Channel, *model.AppError) { 496 ret := _m.Called(teamId, name, includeDeleted) 497 498 var r0 *model.Channel 499 if rf, ok := ret.Get(0).(func(string, string, bool) *model.Channel); ok { 500 r0 = rf(teamId, name, includeDeleted) 501 } else { 502 if ret.Get(0) != nil { 503 r0 = ret.Get(0).(*model.Channel) 504 } 505 } 506 507 var r1 *model.AppError 508 if rf, ok := ret.Get(1).(func(string, string, bool) *model.AppError); ok { 509 r1 = rf(teamId, name, includeDeleted) 510 } else { 511 if ret.Get(1) != nil { 512 r1 = ret.Get(1).(*model.AppError) 513 } 514 } 515 516 return r0, r1 517 } 518 519 // GetChannelByNameForTeamName provides a mock function with given fields: teamName, channelName, includeDeleted 520 func (_m *API) GetChannelByNameForTeamName(teamName string, channelName string, includeDeleted bool) (*model.Channel, *model.AppError) { 521 ret := _m.Called(teamName, channelName, includeDeleted) 522 523 var r0 *model.Channel 524 if rf, ok := ret.Get(0).(func(string, string, bool) *model.Channel); ok { 525 r0 = rf(teamName, channelName, includeDeleted) 526 } else { 527 if ret.Get(0) != nil { 528 r0 = ret.Get(0).(*model.Channel) 529 } 530 } 531 532 var r1 *model.AppError 533 if rf, ok := ret.Get(1).(func(string, string, bool) *model.AppError); ok { 534 r1 = rf(teamName, channelName, includeDeleted) 535 } else { 536 if ret.Get(1) != nil { 537 r1 = ret.Get(1).(*model.AppError) 538 } 539 } 540 541 return r0, r1 542 } 543 544 // GetChannelMember provides a mock function with given fields: channelId, userId 545 func (_m *API) GetChannelMember(channelId string, userId string) (*model.ChannelMember, *model.AppError) { 546 ret := _m.Called(channelId, userId) 547 548 var r0 *model.ChannelMember 549 if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMember); ok { 550 r0 = rf(channelId, userId) 551 } else { 552 if ret.Get(0) != nil { 553 r0 = ret.Get(0).(*model.ChannelMember) 554 } 555 } 556 557 var r1 *model.AppError 558 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 559 r1 = rf(channelId, userId) 560 } else { 561 if ret.Get(1) != nil { 562 r1 = ret.Get(1).(*model.AppError) 563 } 564 } 565 566 return r0, r1 567 } 568 569 // GetChannelMembers provides a mock function with given fields: channelId, page, perPage 570 func (_m *API) GetChannelMembers(channelId string, page int, perPage int) (*model.ChannelMembers, *model.AppError) { 571 ret := _m.Called(channelId, page, perPage) 572 573 var r0 *model.ChannelMembers 574 if rf, ok := ret.Get(0).(func(string, int, int) *model.ChannelMembers); ok { 575 r0 = rf(channelId, page, perPage) 576 } else { 577 if ret.Get(0) != nil { 578 r0 = ret.Get(0).(*model.ChannelMembers) 579 } 580 } 581 582 var r1 *model.AppError 583 if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { 584 r1 = rf(channelId, page, perPage) 585 } else { 586 if ret.Get(1) != nil { 587 r1 = ret.Get(1).(*model.AppError) 588 } 589 } 590 591 return r0, r1 592 } 593 594 // GetChannelMembersByIds provides a mock function with given fields: channelId, userIds 595 func (_m *API) GetChannelMembersByIds(channelId string, userIds []string) (*model.ChannelMembers, *model.AppError) { 596 ret := _m.Called(channelId, userIds) 597 598 var r0 *model.ChannelMembers 599 if rf, ok := ret.Get(0).(func(string, []string) *model.ChannelMembers); ok { 600 r0 = rf(channelId, userIds) 601 } else { 602 if ret.Get(0) != nil { 603 r0 = ret.Get(0).(*model.ChannelMembers) 604 } 605 } 606 607 var r1 *model.AppError 608 if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok { 609 r1 = rf(channelId, userIds) 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 // GetChannelMembersForUser provides a mock function with given fields: teamId, userId, page, perPage 620 func (_m *API) GetChannelMembersForUser(teamId string, userId string, page int, perPage int) ([]*model.ChannelMember, *model.AppError) { 621 ret := _m.Called(teamId, userId, page, perPage) 622 623 var r0 []*model.ChannelMember 624 if rf, ok := ret.Get(0).(func(string, string, int, int) []*model.ChannelMember); ok { 625 r0 = rf(teamId, userId, page, perPage) 626 } else { 627 if ret.Get(0) != nil { 628 r0 = ret.Get(0).([]*model.ChannelMember) 629 } 630 } 631 632 var r1 *model.AppError 633 if rf, ok := ret.Get(1).(func(string, string, int, int) *model.AppError); ok { 634 r1 = rf(teamId, userId, page, perPage) 635 } else { 636 if ret.Get(1) != nil { 637 r1 = ret.Get(1).(*model.AppError) 638 } 639 } 640 641 return r0, r1 642 } 643 644 // GetChannelStats provides a mock function with given fields: channelId 645 func (_m *API) GetChannelStats(channelId string) (*model.ChannelStats, *model.AppError) { 646 ret := _m.Called(channelId) 647 648 var r0 *model.ChannelStats 649 if rf, ok := ret.Get(0).(func(string) *model.ChannelStats); ok { 650 r0 = rf(channelId) 651 } else { 652 if ret.Get(0) != nil { 653 r0 = ret.Get(0).(*model.ChannelStats) 654 } 655 } 656 657 var r1 *model.AppError 658 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 659 r1 = rf(channelId) 660 } else { 661 if ret.Get(1) != nil { 662 r1 = ret.Get(1).(*model.AppError) 663 } 664 } 665 666 return r0, r1 667 } 668 669 // GetChannelsForTeamForUser provides a mock function with given fields: teamId, userId, includeDeleted 670 func (_m *API) GetChannelsForTeamForUser(teamId string, userId string, includeDeleted bool) ([]*model.Channel, *model.AppError) { 671 ret := _m.Called(teamId, userId, includeDeleted) 672 673 var r0 []*model.Channel 674 if rf, ok := ret.Get(0).(func(string, string, bool) []*model.Channel); ok { 675 r0 = rf(teamId, userId, includeDeleted) 676 } else { 677 if ret.Get(0) != nil { 678 r0 = ret.Get(0).([]*model.Channel) 679 } 680 } 681 682 var r1 *model.AppError 683 if rf, ok := ret.Get(1).(func(string, string, bool) *model.AppError); ok { 684 r1 = rf(teamId, userId, includeDeleted) 685 } else { 686 if ret.Get(1) != nil { 687 r1 = ret.Get(1).(*model.AppError) 688 } 689 } 690 691 return r0, r1 692 } 693 694 // GetConfig provides a mock function with given fields: 695 func (_m *API) GetConfig() *model.Config { 696 ret := _m.Called() 697 698 var r0 *model.Config 699 if rf, ok := ret.Get(0).(func() *model.Config); ok { 700 r0 = rf() 701 } else { 702 if ret.Get(0) != nil { 703 r0 = ret.Get(0).(*model.Config) 704 } 705 } 706 707 return r0 708 } 709 710 // GetDiagnosticId provides a mock function with given fields: 711 func (_m *API) GetDiagnosticId() string { 712 ret := _m.Called() 713 714 var r0 string 715 if rf, ok := ret.Get(0).(func() string); ok { 716 r0 = rf() 717 } else { 718 r0 = ret.Get(0).(string) 719 } 720 721 return r0 722 } 723 724 // GetDirectChannel provides a mock function with given fields: userId1, userId2 725 func (_m *API) GetDirectChannel(userId1 string, userId2 string) (*model.Channel, *model.AppError) { 726 ret := _m.Called(userId1, userId2) 727 728 var r0 *model.Channel 729 if rf, ok := ret.Get(0).(func(string, string) *model.Channel); ok { 730 r0 = rf(userId1, userId2) 731 } else { 732 if ret.Get(0) != nil { 733 r0 = ret.Get(0).(*model.Channel) 734 } 735 } 736 737 var r1 *model.AppError 738 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 739 r1 = rf(userId1, userId2) 740 } else { 741 if ret.Get(1) != nil { 742 r1 = ret.Get(1).(*model.AppError) 743 } 744 } 745 746 return r0, r1 747 } 748 749 // GetEmoji provides a mock function with given fields: emojiId 750 func (_m *API) GetEmoji(emojiId string) (*model.Emoji, *model.AppError) { 751 ret := _m.Called(emojiId) 752 753 var r0 *model.Emoji 754 if rf, ok := ret.Get(0).(func(string) *model.Emoji); ok { 755 r0 = rf(emojiId) 756 } else { 757 if ret.Get(0) != nil { 758 r0 = ret.Get(0).(*model.Emoji) 759 } 760 } 761 762 var r1 *model.AppError 763 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 764 r1 = rf(emojiId) 765 } else { 766 if ret.Get(1) != nil { 767 r1 = ret.Get(1).(*model.AppError) 768 } 769 } 770 771 return r0, r1 772 } 773 774 // GetEmojiByName provides a mock function with given fields: name 775 func (_m *API) GetEmojiByName(name string) (*model.Emoji, *model.AppError) { 776 ret := _m.Called(name) 777 778 var r0 *model.Emoji 779 if rf, ok := ret.Get(0).(func(string) *model.Emoji); ok { 780 r0 = rf(name) 781 } else { 782 if ret.Get(0) != nil { 783 r0 = ret.Get(0).(*model.Emoji) 784 } 785 } 786 787 var r1 *model.AppError 788 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 789 r1 = rf(name) 790 } else { 791 if ret.Get(1) != nil { 792 r1 = ret.Get(1).(*model.AppError) 793 } 794 } 795 796 return r0, r1 797 } 798 799 // GetEmojiImage provides a mock function with given fields: emojiId 800 func (_m *API) GetEmojiImage(emojiId string) ([]byte, string, *model.AppError) { 801 ret := _m.Called(emojiId) 802 803 var r0 []byte 804 if rf, ok := ret.Get(0).(func(string) []byte); ok { 805 r0 = rf(emojiId) 806 } else { 807 if ret.Get(0) != nil { 808 r0 = ret.Get(0).([]byte) 809 } 810 } 811 812 var r1 string 813 if rf, ok := ret.Get(1).(func(string) string); ok { 814 r1 = rf(emojiId) 815 } else { 816 r1 = ret.Get(1).(string) 817 } 818 819 var r2 *model.AppError 820 if rf, ok := ret.Get(2).(func(string) *model.AppError); ok { 821 r2 = rf(emojiId) 822 } else { 823 if ret.Get(2) != nil { 824 r2 = ret.Get(2).(*model.AppError) 825 } 826 } 827 828 return r0, r1, r2 829 } 830 831 // GetEmojiList provides a mock function with given fields: sortBy, page, perPage 832 func (_m *API) GetEmojiList(sortBy string, page int, perPage int) ([]*model.Emoji, *model.AppError) { 833 ret := _m.Called(sortBy, page, perPage) 834 835 var r0 []*model.Emoji 836 if rf, ok := ret.Get(0).(func(string, int, int) []*model.Emoji); ok { 837 r0 = rf(sortBy, page, perPage) 838 } else { 839 if ret.Get(0) != nil { 840 r0 = ret.Get(0).([]*model.Emoji) 841 } 842 } 843 844 var r1 *model.AppError 845 if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { 846 r1 = rf(sortBy, page, perPage) 847 } else { 848 if ret.Get(1) != nil { 849 r1 = ret.Get(1).(*model.AppError) 850 } 851 } 852 853 return r0, r1 854 } 855 856 // GetFile provides a mock function with given fields: fileId 857 func (_m *API) GetFile(fileId string) ([]byte, *model.AppError) { 858 ret := _m.Called(fileId) 859 860 var r0 []byte 861 if rf, ok := ret.Get(0).(func(string) []byte); ok { 862 r0 = rf(fileId) 863 } else { 864 if ret.Get(0) != nil { 865 r0 = ret.Get(0).([]byte) 866 } 867 } 868 869 var r1 *model.AppError 870 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 871 r1 = rf(fileId) 872 } else { 873 if ret.Get(1) != nil { 874 r1 = ret.Get(1).(*model.AppError) 875 } 876 } 877 878 return r0, r1 879 } 880 881 // GetFileInfo provides a mock function with given fields: fileId 882 func (_m *API) GetFileInfo(fileId string) (*model.FileInfo, *model.AppError) { 883 ret := _m.Called(fileId) 884 885 var r0 *model.FileInfo 886 if rf, ok := ret.Get(0).(func(string) *model.FileInfo); ok { 887 r0 = rf(fileId) 888 } else { 889 if ret.Get(0) != nil { 890 r0 = ret.Get(0).(*model.FileInfo) 891 } 892 } 893 894 var r1 *model.AppError 895 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 896 r1 = rf(fileId) 897 } else { 898 if ret.Get(1) != nil { 899 r1 = ret.Get(1).(*model.AppError) 900 } 901 } 902 903 return r0, r1 904 } 905 906 // GetFileLink provides a mock function with given fields: fileId 907 func (_m *API) GetFileLink(fileId string) (string, *model.AppError) { 908 ret := _m.Called(fileId) 909 910 var r0 string 911 if rf, ok := ret.Get(0).(func(string) string); ok { 912 r0 = rf(fileId) 913 } else { 914 r0 = ret.Get(0).(string) 915 } 916 917 var r1 *model.AppError 918 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 919 r1 = rf(fileId) 920 } else { 921 if ret.Get(1) != nil { 922 r1 = ret.Get(1).(*model.AppError) 923 } 924 } 925 926 return r0, r1 927 } 928 929 // GetGroupChannel provides a mock function with given fields: userIds 930 func (_m *API) GetGroupChannel(userIds []string) (*model.Channel, *model.AppError) { 931 ret := _m.Called(userIds) 932 933 var r0 *model.Channel 934 if rf, ok := ret.Get(0).(func([]string) *model.Channel); ok { 935 r0 = rf(userIds) 936 } else { 937 if ret.Get(0) != nil { 938 r0 = ret.Get(0).(*model.Channel) 939 } 940 } 941 942 var r1 *model.AppError 943 if rf, ok := ret.Get(1).(func([]string) *model.AppError); ok { 944 r1 = rf(userIds) 945 } else { 946 if ret.Get(1) != nil { 947 r1 = ret.Get(1).(*model.AppError) 948 } 949 } 950 951 return r0, r1 952 } 953 954 // GetLDAPUserAttributes provides a mock function with given fields: userId, attributes 955 func (_m *API) GetLDAPUserAttributes(userId string, attributes []string) (map[string]string, *model.AppError) { 956 ret := _m.Called(userId, attributes) 957 958 var r0 map[string]string 959 if rf, ok := ret.Get(0).(func(string, []string) map[string]string); ok { 960 r0 = rf(userId, attributes) 961 } else { 962 if ret.Get(0) != nil { 963 r0 = ret.Get(0).(map[string]string) 964 } 965 } 966 967 var r1 *model.AppError 968 if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok { 969 r1 = rf(userId, attributes) 970 } else { 971 if ret.Get(1) != nil { 972 r1 = ret.Get(1).(*model.AppError) 973 } 974 } 975 976 return r0, r1 977 } 978 979 // GetLicense provides a mock function with given fields: 980 func (_m *API) GetLicense() *model.License { 981 ret := _m.Called() 982 983 var r0 *model.License 984 if rf, ok := ret.Get(0).(func() *model.License); ok { 985 r0 = rf() 986 } else { 987 if ret.Get(0) != nil { 988 r0 = ret.Get(0).(*model.License) 989 } 990 } 991 992 return r0 993 } 994 995 // GetPluginConfig provides a mock function with given fields: 996 func (_m *API) GetPluginConfig() map[string]interface{} { 997 ret := _m.Called() 998 999 var r0 map[string]interface{} 1000 if rf, ok := ret.Get(0).(func() map[string]interface{}); ok { 1001 r0 = rf() 1002 } else { 1003 if ret.Get(0) != nil { 1004 r0 = ret.Get(0).(map[string]interface{}) 1005 } 1006 } 1007 1008 return r0 1009 } 1010 1011 // GetPluginStatus provides a mock function with given fields: id 1012 func (_m *API) GetPluginStatus(id string) (*model.PluginStatus, *model.AppError) { 1013 ret := _m.Called(id) 1014 1015 var r0 *model.PluginStatus 1016 if rf, ok := ret.Get(0).(func(string) *model.PluginStatus); ok { 1017 r0 = rf(id) 1018 } else { 1019 if ret.Get(0) != nil { 1020 r0 = ret.Get(0).(*model.PluginStatus) 1021 } 1022 } 1023 1024 var r1 *model.AppError 1025 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1026 r1 = rf(id) 1027 } else { 1028 if ret.Get(1) != nil { 1029 r1 = ret.Get(1).(*model.AppError) 1030 } 1031 } 1032 1033 return r0, r1 1034 } 1035 1036 // GetPlugins provides a mock function with given fields: 1037 func (_m *API) GetPlugins() ([]*model.Manifest, *model.AppError) { 1038 ret := _m.Called() 1039 1040 var r0 []*model.Manifest 1041 if rf, ok := ret.Get(0).(func() []*model.Manifest); ok { 1042 r0 = rf() 1043 } else { 1044 if ret.Get(0) != nil { 1045 r0 = ret.Get(0).([]*model.Manifest) 1046 } 1047 } 1048 1049 var r1 *model.AppError 1050 if rf, ok := ret.Get(1).(func() *model.AppError); ok { 1051 r1 = rf() 1052 } else { 1053 if ret.Get(1) != nil { 1054 r1 = ret.Get(1).(*model.AppError) 1055 } 1056 } 1057 1058 return r0, r1 1059 } 1060 1061 // GetPost provides a mock function with given fields: postId 1062 func (_m *API) GetPost(postId string) (*model.Post, *model.AppError) { 1063 ret := _m.Called(postId) 1064 1065 var r0 *model.Post 1066 if rf, ok := ret.Get(0).(func(string) *model.Post); ok { 1067 r0 = rf(postId) 1068 } else { 1069 if ret.Get(0) != nil { 1070 r0 = ret.Get(0).(*model.Post) 1071 } 1072 } 1073 1074 var r1 *model.AppError 1075 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1076 r1 = rf(postId) 1077 } else { 1078 if ret.Get(1) != nil { 1079 r1 = ret.Get(1).(*model.AppError) 1080 } 1081 } 1082 1083 return r0, r1 1084 } 1085 1086 // GetPostThread provides a mock function with given fields: postId 1087 func (_m *API) GetPostThread(postId string) (*model.PostList, *model.AppError) { 1088 ret := _m.Called(postId) 1089 1090 var r0 *model.PostList 1091 if rf, ok := ret.Get(0).(func(string) *model.PostList); ok { 1092 r0 = rf(postId) 1093 } else { 1094 if ret.Get(0) != nil { 1095 r0 = ret.Get(0).(*model.PostList) 1096 } 1097 } 1098 1099 var r1 *model.AppError 1100 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1101 r1 = rf(postId) 1102 } else { 1103 if ret.Get(1) != nil { 1104 r1 = ret.Get(1).(*model.AppError) 1105 } 1106 } 1107 1108 return r0, r1 1109 } 1110 1111 // GetPostsAfter provides a mock function with given fields: channelId, postId, page, perPage 1112 func (_m *API) GetPostsAfter(channelId string, postId string, page int, perPage int) (*model.PostList, *model.AppError) { 1113 ret := _m.Called(channelId, postId, page, perPage) 1114 1115 var r0 *model.PostList 1116 if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok { 1117 r0 = rf(channelId, postId, page, perPage) 1118 } else { 1119 if ret.Get(0) != nil { 1120 r0 = ret.Get(0).(*model.PostList) 1121 } 1122 } 1123 1124 var r1 *model.AppError 1125 if rf, ok := ret.Get(1).(func(string, string, int, int) *model.AppError); ok { 1126 r1 = rf(channelId, postId, page, perPage) 1127 } else { 1128 if ret.Get(1) != nil { 1129 r1 = ret.Get(1).(*model.AppError) 1130 } 1131 } 1132 1133 return r0, r1 1134 } 1135 1136 // GetPostsBefore provides a mock function with given fields: channelId, postId, page, perPage 1137 func (_m *API) GetPostsBefore(channelId string, postId string, page int, perPage int) (*model.PostList, *model.AppError) { 1138 ret := _m.Called(channelId, postId, page, perPage) 1139 1140 var r0 *model.PostList 1141 if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok { 1142 r0 = rf(channelId, postId, page, perPage) 1143 } else { 1144 if ret.Get(0) != nil { 1145 r0 = ret.Get(0).(*model.PostList) 1146 } 1147 } 1148 1149 var r1 *model.AppError 1150 if rf, ok := ret.Get(1).(func(string, string, int, int) *model.AppError); ok { 1151 r1 = rf(channelId, postId, page, perPage) 1152 } else { 1153 if ret.Get(1) != nil { 1154 r1 = ret.Get(1).(*model.AppError) 1155 } 1156 } 1157 1158 return r0, r1 1159 } 1160 1161 // GetPostsForChannel provides a mock function with given fields: channelId, page, perPage 1162 func (_m *API) GetPostsForChannel(channelId string, page int, perPage int) (*model.PostList, *model.AppError) { 1163 ret := _m.Called(channelId, page, perPage) 1164 1165 var r0 *model.PostList 1166 if rf, ok := ret.Get(0).(func(string, int, int) *model.PostList); ok { 1167 r0 = rf(channelId, page, perPage) 1168 } else { 1169 if ret.Get(0) != nil { 1170 r0 = ret.Get(0).(*model.PostList) 1171 } 1172 } 1173 1174 var r1 *model.AppError 1175 if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { 1176 r1 = rf(channelId, page, perPage) 1177 } else { 1178 if ret.Get(1) != nil { 1179 r1 = ret.Get(1).(*model.AppError) 1180 } 1181 } 1182 1183 return r0, r1 1184 } 1185 1186 // GetPostsSince provides a mock function with given fields: channelId, time 1187 func (_m *API) GetPostsSince(channelId string, time int64) (*model.PostList, *model.AppError) { 1188 ret := _m.Called(channelId, time) 1189 1190 var r0 *model.PostList 1191 if rf, ok := ret.Get(0).(func(string, int64) *model.PostList); ok { 1192 r0 = rf(channelId, time) 1193 } else { 1194 if ret.Get(0) != nil { 1195 r0 = ret.Get(0).(*model.PostList) 1196 } 1197 } 1198 1199 var r1 *model.AppError 1200 if rf, ok := ret.Get(1).(func(string, int64) *model.AppError); ok { 1201 r1 = rf(channelId, time) 1202 } else { 1203 if ret.Get(1) != nil { 1204 r1 = ret.Get(1).(*model.AppError) 1205 } 1206 } 1207 1208 return r0, r1 1209 } 1210 1211 // GetProfileImage provides a mock function with given fields: userId 1212 func (_m *API) GetProfileImage(userId string) ([]byte, *model.AppError) { 1213 ret := _m.Called(userId) 1214 1215 var r0 []byte 1216 if rf, ok := ret.Get(0).(func(string) []byte); ok { 1217 r0 = rf(userId) 1218 } else { 1219 if ret.Get(0) != nil { 1220 r0 = ret.Get(0).([]byte) 1221 } 1222 } 1223 1224 var r1 *model.AppError 1225 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1226 r1 = rf(userId) 1227 } else { 1228 if ret.Get(1) != nil { 1229 r1 = ret.Get(1).(*model.AppError) 1230 } 1231 } 1232 1233 return r0, r1 1234 } 1235 1236 // GetPublicChannelsForTeam provides a mock function with given fields: teamId, page, perPage 1237 func (_m *API) GetPublicChannelsForTeam(teamId string, page int, perPage int) ([]*model.Channel, *model.AppError) { 1238 ret := _m.Called(teamId, page, perPage) 1239 1240 var r0 []*model.Channel 1241 if rf, ok := ret.Get(0).(func(string, int, int) []*model.Channel); ok { 1242 r0 = rf(teamId, page, perPage) 1243 } else { 1244 if ret.Get(0) != nil { 1245 r0 = ret.Get(0).([]*model.Channel) 1246 } 1247 } 1248 1249 var r1 *model.AppError 1250 if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { 1251 r1 = rf(teamId, page, perPage) 1252 } else { 1253 if ret.Get(1) != nil { 1254 r1 = ret.Get(1).(*model.AppError) 1255 } 1256 } 1257 1258 return r0, r1 1259 } 1260 1261 // GetReactions provides a mock function with given fields: postId 1262 func (_m *API) GetReactions(postId string) ([]*model.Reaction, *model.AppError) { 1263 ret := _m.Called(postId) 1264 1265 var r0 []*model.Reaction 1266 if rf, ok := ret.Get(0).(func(string) []*model.Reaction); ok { 1267 r0 = rf(postId) 1268 } else { 1269 if ret.Get(0) != nil { 1270 r0 = ret.Get(0).([]*model.Reaction) 1271 } 1272 } 1273 1274 var r1 *model.AppError 1275 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1276 r1 = rf(postId) 1277 } else { 1278 if ret.Get(1) != nil { 1279 r1 = ret.Get(1).(*model.AppError) 1280 } 1281 } 1282 1283 return r0, r1 1284 } 1285 1286 // GetServerVersion provides a mock function with given fields: 1287 func (_m *API) GetServerVersion() string { 1288 ret := _m.Called() 1289 1290 var r0 string 1291 if rf, ok := ret.Get(0).(func() string); ok { 1292 r0 = rf() 1293 } else { 1294 r0 = ret.Get(0).(string) 1295 } 1296 1297 return r0 1298 } 1299 1300 // GetSession provides a mock function with given fields: sessionId 1301 func (_m *API) GetSession(sessionId string) (*model.Session, *model.AppError) { 1302 ret := _m.Called(sessionId) 1303 1304 var r0 *model.Session 1305 if rf, ok := ret.Get(0).(func(string) *model.Session); ok { 1306 r0 = rf(sessionId) 1307 } else { 1308 if ret.Get(0) != nil { 1309 r0 = ret.Get(0).(*model.Session) 1310 } 1311 } 1312 1313 var r1 *model.AppError 1314 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1315 r1 = rf(sessionId) 1316 } else { 1317 if ret.Get(1) != nil { 1318 r1 = ret.Get(1).(*model.AppError) 1319 } 1320 } 1321 1322 return r0, r1 1323 } 1324 1325 // GetSystemInstallDate provides a mock function with given fields: 1326 func (_m *API) GetSystemInstallDate() (int64, *model.AppError) { 1327 ret := _m.Called() 1328 1329 var r0 int64 1330 if rf, ok := ret.Get(0).(func() int64); ok { 1331 r0 = rf() 1332 } else { 1333 r0 = ret.Get(0).(int64) 1334 } 1335 1336 var r1 *model.AppError 1337 if rf, ok := ret.Get(1).(func() *model.AppError); ok { 1338 r1 = rf() 1339 } else { 1340 if ret.Get(1) != nil { 1341 r1 = ret.Get(1).(*model.AppError) 1342 } 1343 } 1344 1345 return r0, r1 1346 } 1347 1348 // GetTeam provides a mock function with given fields: teamId 1349 func (_m *API) GetTeam(teamId string) (*model.Team, *model.AppError) { 1350 ret := _m.Called(teamId) 1351 1352 var r0 *model.Team 1353 if rf, ok := ret.Get(0).(func(string) *model.Team); ok { 1354 r0 = rf(teamId) 1355 } else { 1356 if ret.Get(0) != nil { 1357 r0 = ret.Get(0).(*model.Team) 1358 } 1359 } 1360 1361 var r1 *model.AppError 1362 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1363 r1 = rf(teamId) 1364 } else { 1365 if ret.Get(1) != nil { 1366 r1 = ret.Get(1).(*model.AppError) 1367 } 1368 } 1369 1370 return r0, r1 1371 } 1372 1373 // GetTeamByName provides a mock function with given fields: name 1374 func (_m *API) GetTeamByName(name string) (*model.Team, *model.AppError) { 1375 ret := _m.Called(name) 1376 1377 var r0 *model.Team 1378 if rf, ok := ret.Get(0).(func(string) *model.Team); ok { 1379 r0 = rf(name) 1380 } else { 1381 if ret.Get(0) != nil { 1382 r0 = ret.Get(0).(*model.Team) 1383 } 1384 } 1385 1386 var r1 *model.AppError 1387 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1388 r1 = rf(name) 1389 } else { 1390 if ret.Get(1) != nil { 1391 r1 = ret.Get(1).(*model.AppError) 1392 } 1393 } 1394 1395 return r0, r1 1396 } 1397 1398 // GetTeamIcon provides a mock function with given fields: teamId 1399 func (_m *API) GetTeamIcon(teamId string) ([]byte, *model.AppError) { 1400 ret := _m.Called(teamId) 1401 1402 var r0 []byte 1403 if rf, ok := ret.Get(0).(func(string) []byte); ok { 1404 r0 = rf(teamId) 1405 } else { 1406 if ret.Get(0) != nil { 1407 r0 = ret.Get(0).([]byte) 1408 } 1409 } 1410 1411 var r1 *model.AppError 1412 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1413 r1 = rf(teamId) 1414 } else { 1415 if ret.Get(1) != nil { 1416 r1 = ret.Get(1).(*model.AppError) 1417 } 1418 } 1419 1420 return r0, r1 1421 } 1422 1423 // GetTeamMember provides a mock function with given fields: teamId, userId 1424 func (_m *API) GetTeamMember(teamId string, userId string) (*model.TeamMember, *model.AppError) { 1425 ret := _m.Called(teamId, userId) 1426 1427 var r0 *model.TeamMember 1428 if rf, ok := ret.Get(0).(func(string, string) *model.TeamMember); ok { 1429 r0 = rf(teamId, userId) 1430 } else { 1431 if ret.Get(0) != nil { 1432 r0 = ret.Get(0).(*model.TeamMember) 1433 } 1434 } 1435 1436 var r1 *model.AppError 1437 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 1438 r1 = rf(teamId, userId) 1439 } else { 1440 if ret.Get(1) != nil { 1441 r1 = ret.Get(1).(*model.AppError) 1442 } 1443 } 1444 1445 return r0, r1 1446 } 1447 1448 // GetTeamMembers provides a mock function with given fields: teamId, page, perPage 1449 func (_m *API) GetTeamMembers(teamId string, page int, perPage int) ([]*model.TeamMember, *model.AppError) { 1450 ret := _m.Called(teamId, page, perPage) 1451 1452 var r0 []*model.TeamMember 1453 if rf, ok := ret.Get(0).(func(string, int, int) []*model.TeamMember); ok { 1454 r0 = rf(teamId, page, perPage) 1455 } else { 1456 if ret.Get(0) != nil { 1457 r0 = ret.Get(0).([]*model.TeamMember) 1458 } 1459 } 1460 1461 var r1 *model.AppError 1462 if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { 1463 r1 = rf(teamId, page, perPage) 1464 } else { 1465 if ret.Get(1) != nil { 1466 r1 = ret.Get(1).(*model.AppError) 1467 } 1468 } 1469 1470 return r0, r1 1471 } 1472 1473 // GetTeamMembersForUser provides a mock function with given fields: userId, page, perPage 1474 func (_m *API) GetTeamMembersForUser(userId string, page int, perPage int) ([]*model.TeamMember, *model.AppError) { 1475 ret := _m.Called(userId, page, perPage) 1476 1477 var r0 []*model.TeamMember 1478 if rf, ok := ret.Get(0).(func(string, int, int) []*model.TeamMember); ok { 1479 r0 = rf(userId, page, perPage) 1480 } else { 1481 if ret.Get(0) != nil { 1482 r0 = ret.Get(0).([]*model.TeamMember) 1483 } 1484 } 1485 1486 var r1 *model.AppError 1487 if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { 1488 r1 = rf(userId, page, perPage) 1489 } else { 1490 if ret.Get(1) != nil { 1491 r1 = ret.Get(1).(*model.AppError) 1492 } 1493 } 1494 1495 return r0, r1 1496 } 1497 1498 // GetTeamStats provides a mock function with given fields: teamId 1499 func (_m *API) GetTeamStats(teamId string) (*model.TeamStats, *model.AppError) { 1500 ret := _m.Called(teamId) 1501 1502 var r0 *model.TeamStats 1503 if rf, ok := ret.Get(0).(func(string) *model.TeamStats); ok { 1504 r0 = rf(teamId) 1505 } else { 1506 if ret.Get(0) != nil { 1507 r0 = ret.Get(0).(*model.TeamStats) 1508 } 1509 } 1510 1511 var r1 *model.AppError 1512 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1513 r1 = rf(teamId) 1514 } else { 1515 if ret.Get(1) != nil { 1516 r1 = ret.Get(1).(*model.AppError) 1517 } 1518 } 1519 1520 return r0, r1 1521 } 1522 1523 // GetTeams provides a mock function with given fields: 1524 func (_m *API) GetTeams() ([]*model.Team, *model.AppError) { 1525 ret := _m.Called() 1526 1527 var r0 []*model.Team 1528 if rf, ok := ret.Get(0).(func() []*model.Team); ok { 1529 r0 = rf() 1530 } else { 1531 if ret.Get(0) != nil { 1532 r0 = ret.Get(0).([]*model.Team) 1533 } 1534 } 1535 1536 var r1 *model.AppError 1537 if rf, ok := ret.Get(1).(func() *model.AppError); ok { 1538 r1 = rf() 1539 } else { 1540 if ret.Get(1) != nil { 1541 r1 = ret.Get(1).(*model.AppError) 1542 } 1543 } 1544 1545 return r0, r1 1546 } 1547 1548 // GetTeamsForUser provides a mock function with given fields: userId 1549 func (_m *API) GetTeamsForUser(userId string) ([]*model.Team, *model.AppError) { 1550 ret := _m.Called(userId) 1551 1552 var r0 []*model.Team 1553 if rf, ok := ret.Get(0).(func(string) []*model.Team); ok { 1554 r0 = rf(userId) 1555 } else { 1556 if ret.Get(0) != nil { 1557 r0 = ret.Get(0).([]*model.Team) 1558 } 1559 } 1560 1561 var r1 *model.AppError 1562 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1563 r1 = rf(userId) 1564 } else { 1565 if ret.Get(1) != nil { 1566 r1 = ret.Get(1).(*model.AppError) 1567 } 1568 } 1569 1570 return r0, r1 1571 } 1572 1573 // GetTeamsUnreadForUser provides a mock function with given fields: userId 1574 func (_m *API) GetTeamsUnreadForUser(userId string) ([]*model.TeamUnread, *model.AppError) { 1575 ret := _m.Called(userId) 1576 1577 var r0 []*model.TeamUnread 1578 if rf, ok := ret.Get(0).(func(string) []*model.TeamUnread); ok { 1579 r0 = rf(userId) 1580 } else { 1581 if ret.Get(0) != nil { 1582 r0 = ret.Get(0).([]*model.TeamUnread) 1583 } 1584 } 1585 1586 var r1 *model.AppError 1587 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1588 r1 = rf(userId) 1589 } else { 1590 if ret.Get(1) != nil { 1591 r1 = ret.Get(1).(*model.AppError) 1592 } 1593 } 1594 1595 return r0, r1 1596 } 1597 1598 // GetUser provides a mock function with given fields: userId 1599 func (_m *API) GetUser(userId string) (*model.User, *model.AppError) { 1600 ret := _m.Called(userId) 1601 1602 var r0 *model.User 1603 if rf, ok := ret.Get(0).(func(string) *model.User); ok { 1604 r0 = rf(userId) 1605 } else { 1606 if ret.Get(0) != nil { 1607 r0 = ret.Get(0).(*model.User) 1608 } 1609 } 1610 1611 var r1 *model.AppError 1612 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1613 r1 = rf(userId) 1614 } else { 1615 if ret.Get(1) != nil { 1616 r1 = ret.Get(1).(*model.AppError) 1617 } 1618 } 1619 1620 return r0, r1 1621 } 1622 1623 // GetUserByEmail provides a mock function with given fields: email 1624 func (_m *API) GetUserByEmail(email string) (*model.User, *model.AppError) { 1625 ret := _m.Called(email) 1626 1627 var r0 *model.User 1628 if rf, ok := ret.Get(0).(func(string) *model.User); ok { 1629 r0 = rf(email) 1630 } else { 1631 if ret.Get(0) != nil { 1632 r0 = ret.Get(0).(*model.User) 1633 } 1634 } 1635 1636 var r1 *model.AppError 1637 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1638 r1 = rf(email) 1639 } else { 1640 if ret.Get(1) != nil { 1641 r1 = ret.Get(1).(*model.AppError) 1642 } 1643 } 1644 1645 return r0, r1 1646 } 1647 1648 // GetUserByUsername provides a mock function with given fields: name 1649 func (_m *API) GetUserByUsername(name string) (*model.User, *model.AppError) { 1650 ret := _m.Called(name) 1651 1652 var r0 *model.User 1653 if rf, ok := ret.Get(0).(func(string) *model.User); ok { 1654 r0 = rf(name) 1655 } else { 1656 if ret.Get(0) != nil { 1657 r0 = ret.Get(0).(*model.User) 1658 } 1659 } 1660 1661 var r1 *model.AppError 1662 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1663 r1 = rf(name) 1664 } else { 1665 if ret.Get(1) != nil { 1666 r1 = ret.Get(1).(*model.AppError) 1667 } 1668 } 1669 1670 return r0, r1 1671 } 1672 1673 // GetUserStatus provides a mock function with given fields: userId 1674 func (_m *API) GetUserStatus(userId string) (*model.Status, *model.AppError) { 1675 ret := _m.Called(userId) 1676 1677 var r0 *model.Status 1678 if rf, ok := ret.Get(0).(func(string) *model.Status); ok { 1679 r0 = rf(userId) 1680 } else { 1681 if ret.Get(0) != nil { 1682 r0 = ret.Get(0).(*model.Status) 1683 } 1684 } 1685 1686 var r1 *model.AppError 1687 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1688 r1 = rf(userId) 1689 } else { 1690 if ret.Get(1) != nil { 1691 r1 = ret.Get(1).(*model.AppError) 1692 } 1693 } 1694 1695 return r0, r1 1696 } 1697 1698 // GetUserStatusesByIds provides a mock function with given fields: userIds 1699 func (_m *API) GetUserStatusesByIds(userIds []string) ([]*model.Status, *model.AppError) { 1700 ret := _m.Called(userIds) 1701 1702 var r0 []*model.Status 1703 if rf, ok := ret.Get(0).(func([]string) []*model.Status); ok { 1704 r0 = rf(userIds) 1705 } else { 1706 if ret.Get(0) != nil { 1707 r0 = ret.Get(0).([]*model.Status) 1708 } 1709 } 1710 1711 var r1 *model.AppError 1712 if rf, ok := ret.Get(1).(func([]string) *model.AppError); ok { 1713 r1 = rf(userIds) 1714 } else { 1715 if ret.Get(1) != nil { 1716 r1 = ret.Get(1).(*model.AppError) 1717 } 1718 } 1719 1720 return r0, r1 1721 } 1722 1723 // GetUsers provides a mock function with given fields: options 1724 func (_m *API) GetUsers(options *model.UserGetOptions) ([]*model.User, *model.AppError) { 1725 ret := _m.Called(options) 1726 1727 var r0 []*model.User 1728 if rf, ok := ret.Get(0).(func(*model.UserGetOptions) []*model.User); ok { 1729 r0 = rf(options) 1730 } else { 1731 if ret.Get(0) != nil { 1732 r0 = ret.Get(0).([]*model.User) 1733 } 1734 } 1735 1736 var r1 *model.AppError 1737 if rf, ok := ret.Get(1).(func(*model.UserGetOptions) *model.AppError); ok { 1738 r1 = rf(options) 1739 } else { 1740 if ret.Get(1) != nil { 1741 r1 = ret.Get(1).(*model.AppError) 1742 } 1743 } 1744 1745 return r0, r1 1746 } 1747 1748 // GetUsersByUsernames provides a mock function with given fields: usernames 1749 func (_m *API) GetUsersByUsernames(usernames []string) ([]*model.User, *model.AppError) { 1750 ret := _m.Called(usernames) 1751 1752 var r0 []*model.User 1753 if rf, ok := ret.Get(0).(func([]string) []*model.User); ok { 1754 r0 = rf(usernames) 1755 } else { 1756 if ret.Get(0) != nil { 1757 r0 = ret.Get(0).([]*model.User) 1758 } 1759 } 1760 1761 var r1 *model.AppError 1762 if rf, ok := ret.Get(1).(func([]string) *model.AppError); ok { 1763 r1 = rf(usernames) 1764 } else { 1765 if ret.Get(1) != nil { 1766 r1 = ret.Get(1).(*model.AppError) 1767 } 1768 } 1769 1770 return r0, r1 1771 } 1772 1773 // GetUsersInChannel provides a mock function with given fields: channelId, sortBy, page, perPage 1774 func (_m *API) GetUsersInChannel(channelId string, sortBy string, page int, perPage int) ([]*model.User, *model.AppError) { 1775 ret := _m.Called(channelId, sortBy, page, perPage) 1776 1777 var r0 []*model.User 1778 if rf, ok := ret.Get(0).(func(string, string, int, int) []*model.User); ok { 1779 r0 = rf(channelId, sortBy, page, perPage) 1780 } else { 1781 if ret.Get(0) != nil { 1782 r0 = ret.Get(0).([]*model.User) 1783 } 1784 } 1785 1786 var r1 *model.AppError 1787 if rf, ok := ret.Get(1).(func(string, string, int, int) *model.AppError); ok { 1788 r1 = rf(channelId, sortBy, page, perPage) 1789 } else { 1790 if ret.Get(1) != nil { 1791 r1 = ret.Get(1).(*model.AppError) 1792 } 1793 } 1794 1795 return r0, r1 1796 } 1797 1798 // GetUsersInTeam provides a mock function with given fields: teamId, page, perPage 1799 func (_m *API) GetUsersInTeam(teamId string, page int, perPage int) ([]*model.User, *model.AppError) { 1800 ret := _m.Called(teamId, page, perPage) 1801 1802 var r0 []*model.User 1803 if rf, ok := ret.Get(0).(func(string, int, int) []*model.User); ok { 1804 r0 = rf(teamId, page, perPage) 1805 } else { 1806 if ret.Get(0) != nil { 1807 r0 = ret.Get(0).([]*model.User) 1808 } 1809 } 1810 1811 var r1 *model.AppError 1812 if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok { 1813 r1 = rf(teamId, page, perPage) 1814 } else { 1815 if ret.Get(1) != nil { 1816 r1 = ret.Get(1).(*model.AppError) 1817 } 1818 } 1819 1820 return r0, r1 1821 } 1822 1823 // HasPermissionTo provides a mock function with given fields: userId, permission 1824 func (_m *API) HasPermissionTo(userId string, permission *model.Permission) bool { 1825 ret := _m.Called(userId, permission) 1826 1827 var r0 bool 1828 if rf, ok := ret.Get(0).(func(string, *model.Permission) bool); ok { 1829 r0 = rf(userId, permission) 1830 } else { 1831 r0 = ret.Get(0).(bool) 1832 } 1833 1834 return r0 1835 } 1836 1837 // HasPermissionToChannel provides a mock function with given fields: userId, channelId, permission 1838 func (_m *API) HasPermissionToChannel(userId string, channelId string, permission *model.Permission) bool { 1839 ret := _m.Called(userId, channelId, permission) 1840 1841 var r0 bool 1842 if rf, ok := ret.Get(0).(func(string, string, *model.Permission) bool); ok { 1843 r0 = rf(userId, channelId, permission) 1844 } else { 1845 r0 = ret.Get(0).(bool) 1846 } 1847 1848 return r0 1849 } 1850 1851 // HasPermissionToTeam provides a mock function with given fields: userId, teamId, permission 1852 func (_m *API) HasPermissionToTeam(userId string, teamId string, permission *model.Permission) bool { 1853 ret := _m.Called(userId, teamId, permission) 1854 1855 var r0 bool 1856 if rf, ok := ret.Get(0).(func(string, string, *model.Permission) bool); ok { 1857 r0 = rf(userId, teamId, permission) 1858 } else { 1859 r0 = ret.Get(0).(bool) 1860 } 1861 1862 return r0 1863 } 1864 1865 // KVDelete provides a mock function with given fields: key 1866 func (_m *API) KVDelete(key string) *model.AppError { 1867 ret := _m.Called(key) 1868 1869 var r0 *model.AppError 1870 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 1871 r0 = rf(key) 1872 } else { 1873 if ret.Get(0) != nil { 1874 r0 = ret.Get(0).(*model.AppError) 1875 } 1876 } 1877 1878 return r0 1879 } 1880 1881 // KVDeleteAll provides a mock function with given fields: 1882 func (_m *API) KVDeleteAll() *model.AppError { 1883 ret := _m.Called() 1884 1885 var r0 *model.AppError 1886 if rf, ok := ret.Get(0).(func() *model.AppError); ok { 1887 r0 = rf() 1888 } else { 1889 if ret.Get(0) != nil { 1890 r0 = ret.Get(0).(*model.AppError) 1891 } 1892 } 1893 1894 return r0 1895 } 1896 1897 // KVGet provides a mock function with given fields: key 1898 func (_m *API) KVGet(key string) ([]byte, *model.AppError) { 1899 ret := _m.Called(key) 1900 1901 var r0 []byte 1902 if rf, ok := ret.Get(0).(func(string) []byte); ok { 1903 r0 = rf(key) 1904 } else { 1905 if ret.Get(0) != nil { 1906 r0 = ret.Get(0).([]byte) 1907 } 1908 } 1909 1910 var r1 *model.AppError 1911 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 1912 r1 = rf(key) 1913 } else { 1914 if ret.Get(1) != nil { 1915 r1 = ret.Get(1).(*model.AppError) 1916 } 1917 } 1918 1919 return r0, r1 1920 } 1921 1922 // KVList provides a mock function with given fields: page, perPage 1923 func (_m *API) KVList(page int, perPage int) ([]string, *model.AppError) { 1924 ret := _m.Called(page, perPage) 1925 1926 var r0 []string 1927 if rf, ok := ret.Get(0).(func(int, int) []string); ok { 1928 r0 = rf(page, perPage) 1929 } else { 1930 if ret.Get(0) != nil { 1931 r0 = ret.Get(0).([]string) 1932 } 1933 } 1934 1935 var r1 *model.AppError 1936 if rf, ok := ret.Get(1).(func(int, int) *model.AppError); ok { 1937 r1 = rf(page, perPage) 1938 } else { 1939 if ret.Get(1) != nil { 1940 r1 = ret.Get(1).(*model.AppError) 1941 } 1942 } 1943 1944 return r0, r1 1945 } 1946 1947 // KVSet provides a mock function with given fields: key, value 1948 func (_m *API) KVSet(key string, value []byte) *model.AppError { 1949 ret := _m.Called(key, value) 1950 1951 var r0 *model.AppError 1952 if rf, ok := ret.Get(0).(func(string, []byte) *model.AppError); ok { 1953 r0 = rf(key, value) 1954 } else { 1955 if ret.Get(0) != nil { 1956 r0 = ret.Get(0).(*model.AppError) 1957 } 1958 } 1959 1960 return r0 1961 } 1962 1963 // KVSetWithExpiry provides a mock function with given fields: key, value, expireInSeconds 1964 func (_m *API) KVSetWithExpiry(key string, value []byte, expireInSeconds int64) *model.AppError { 1965 ret := _m.Called(key, value, expireInSeconds) 1966 1967 var r0 *model.AppError 1968 if rf, ok := ret.Get(0).(func(string, []byte, int64) *model.AppError); ok { 1969 r0 = rf(key, value, expireInSeconds) 1970 } else { 1971 if ret.Get(0) != nil { 1972 r0 = ret.Get(0).(*model.AppError) 1973 } 1974 } 1975 1976 return r0 1977 } 1978 1979 // LoadPluginConfiguration provides a mock function with given fields: dest 1980 func (_m *API) LoadPluginConfiguration(dest interface{}) error { 1981 ret := _m.Called(dest) 1982 1983 var r0 error 1984 if rf, ok := ret.Get(0).(func(interface{}) error); ok { 1985 r0 = rf(dest) 1986 } else { 1987 r0 = ret.Error(0) 1988 } 1989 1990 return r0 1991 } 1992 1993 // LogDebug provides a mock function with given fields: msg, keyValuePairs 1994 func (_m *API) LogDebug(msg string, keyValuePairs ...interface{}) { 1995 var _ca []interface{} 1996 _ca = append(_ca, msg) 1997 _ca = append(_ca, keyValuePairs...) 1998 _m.Called(_ca...) 1999 } 2000 2001 // LogError provides a mock function with given fields: msg, keyValuePairs 2002 func (_m *API) LogError(msg string, keyValuePairs ...interface{}) { 2003 var _ca []interface{} 2004 _ca = append(_ca, msg) 2005 _ca = append(_ca, keyValuePairs...) 2006 _m.Called(_ca...) 2007 } 2008 2009 // LogInfo provides a mock function with given fields: msg, keyValuePairs 2010 func (_m *API) LogInfo(msg string, keyValuePairs ...interface{}) { 2011 var _ca []interface{} 2012 _ca = append(_ca, msg) 2013 _ca = append(_ca, keyValuePairs...) 2014 _m.Called(_ca...) 2015 } 2016 2017 // LogWarn provides a mock function with given fields: msg, keyValuePairs 2018 func (_m *API) LogWarn(msg string, keyValuePairs ...interface{}) { 2019 var _ca []interface{} 2020 _ca = append(_ca, msg) 2021 _ca = append(_ca, keyValuePairs...) 2022 _m.Called(_ca...) 2023 } 2024 2025 // OpenInteractiveDialog provides a mock function with given fields: dialog 2026 func (_m *API) OpenInteractiveDialog(dialog model.OpenDialogRequest) *model.AppError { 2027 ret := _m.Called(dialog) 2028 2029 var r0 *model.AppError 2030 if rf, ok := ret.Get(0).(func(model.OpenDialogRequest) *model.AppError); ok { 2031 r0 = rf(dialog) 2032 } else { 2033 if ret.Get(0) != nil { 2034 r0 = ret.Get(0).(*model.AppError) 2035 } 2036 } 2037 2038 return r0 2039 } 2040 2041 // PatchBot provides a mock function with given fields: botUserId, botPatch 2042 func (_m *API) PatchBot(botUserId string, botPatch *model.BotPatch) (*model.Bot, *model.AppError) { 2043 ret := _m.Called(botUserId, botPatch) 2044 2045 var r0 *model.Bot 2046 if rf, ok := ret.Get(0).(func(string, *model.BotPatch) *model.Bot); ok { 2047 r0 = rf(botUserId, botPatch) 2048 } else { 2049 if ret.Get(0) != nil { 2050 r0 = ret.Get(0).(*model.Bot) 2051 } 2052 } 2053 2054 var r1 *model.AppError 2055 if rf, ok := ret.Get(1).(func(string, *model.BotPatch) *model.AppError); ok { 2056 r1 = rf(botUserId, botPatch) 2057 } else { 2058 if ret.Get(1) != nil { 2059 r1 = ret.Get(1).(*model.AppError) 2060 } 2061 } 2062 2063 return r0, r1 2064 } 2065 2066 // PermanentDeleteBot provides a mock function with given fields: botUserId 2067 func (_m *API) PermanentDeleteBot(botUserId string) *model.AppError { 2068 ret := _m.Called(botUserId) 2069 2070 var r0 *model.AppError 2071 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 2072 r0 = rf(botUserId) 2073 } else { 2074 if ret.Get(0) != nil { 2075 r0 = ret.Get(0).(*model.AppError) 2076 } 2077 } 2078 2079 return r0 2080 } 2081 2082 // PublishWebSocketEvent provides a mock function with given fields: event, payload, broadcast 2083 func (_m *API) PublishWebSocketEvent(event string, payload map[string]interface{}, broadcast *model.WebsocketBroadcast) { 2084 _m.Called(event, payload, broadcast) 2085 } 2086 2087 // ReadFile provides a mock function with given fields: path 2088 func (_m *API) ReadFile(path string) ([]byte, *model.AppError) { 2089 ret := _m.Called(path) 2090 2091 var r0 []byte 2092 if rf, ok := ret.Get(0).(func(string) []byte); ok { 2093 r0 = rf(path) 2094 } else { 2095 if ret.Get(0) != nil { 2096 r0 = ret.Get(0).([]byte) 2097 } 2098 } 2099 2100 var r1 *model.AppError 2101 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 2102 r1 = rf(path) 2103 } else { 2104 if ret.Get(1) != nil { 2105 r1 = ret.Get(1).(*model.AppError) 2106 } 2107 } 2108 2109 return r0, r1 2110 } 2111 2112 // RegisterCommand provides a mock function with given fields: command 2113 func (_m *API) RegisterCommand(command *model.Command) error { 2114 ret := _m.Called(command) 2115 2116 var r0 error 2117 if rf, ok := ret.Get(0).(func(*model.Command) error); ok { 2118 r0 = rf(command) 2119 } else { 2120 r0 = ret.Error(0) 2121 } 2122 2123 return r0 2124 } 2125 2126 // RemovePlugin provides a mock function with given fields: id 2127 func (_m *API) RemovePlugin(id string) *model.AppError { 2128 ret := _m.Called(id) 2129 2130 var r0 *model.AppError 2131 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 2132 r0 = rf(id) 2133 } else { 2134 if ret.Get(0) != nil { 2135 r0 = ret.Get(0).(*model.AppError) 2136 } 2137 } 2138 2139 return r0 2140 } 2141 2142 // RemoveReaction provides a mock function with given fields: reaction 2143 func (_m *API) RemoveReaction(reaction *model.Reaction) *model.AppError { 2144 ret := _m.Called(reaction) 2145 2146 var r0 *model.AppError 2147 if rf, ok := ret.Get(0).(func(*model.Reaction) *model.AppError); ok { 2148 r0 = rf(reaction) 2149 } else { 2150 if ret.Get(0) != nil { 2151 r0 = ret.Get(0).(*model.AppError) 2152 } 2153 } 2154 2155 return r0 2156 } 2157 2158 // RemoveTeamIcon provides a mock function with given fields: teamId 2159 func (_m *API) RemoveTeamIcon(teamId string) *model.AppError { 2160 ret := _m.Called(teamId) 2161 2162 var r0 *model.AppError 2163 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 2164 r0 = rf(teamId) 2165 } else { 2166 if ret.Get(0) != nil { 2167 r0 = ret.Get(0).(*model.AppError) 2168 } 2169 } 2170 2171 return r0 2172 } 2173 2174 // SaveConfig provides a mock function with given fields: config 2175 func (_m *API) SaveConfig(config *model.Config) *model.AppError { 2176 ret := _m.Called(config) 2177 2178 var r0 *model.AppError 2179 if rf, ok := ret.Get(0).(func(*model.Config) *model.AppError); ok { 2180 r0 = rf(config) 2181 } else { 2182 if ret.Get(0) != nil { 2183 r0 = ret.Get(0).(*model.AppError) 2184 } 2185 } 2186 2187 return r0 2188 } 2189 2190 // SavePluginConfig provides a mock function with given fields: config 2191 func (_m *API) SavePluginConfig(config map[string]interface{}) *model.AppError { 2192 ret := _m.Called(config) 2193 2194 var r0 *model.AppError 2195 if rf, ok := ret.Get(0).(func(map[string]interface{}) *model.AppError); ok { 2196 r0 = rf(config) 2197 } else { 2198 if ret.Get(0) != nil { 2199 r0 = ret.Get(0).(*model.AppError) 2200 } 2201 } 2202 2203 return r0 2204 } 2205 2206 // SearchChannels provides a mock function with given fields: teamId, term 2207 func (_m *API) SearchChannels(teamId string, term string) ([]*model.Channel, *model.AppError) { 2208 ret := _m.Called(teamId, term) 2209 2210 var r0 []*model.Channel 2211 if rf, ok := ret.Get(0).(func(string, string) []*model.Channel); ok { 2212 r0 = rf(teamId, term) 2213 } else { 2214 if ret.Get(0) != nil { 2215 r0 = ret.Get(0).([]*model.Channel) 2216 } 2217 } 2218 2219 var r1 *model.AppError 2220 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 2221 r1 = rf(teamId, term) 2222 } else { 2223 if ret.Get(1) != nil { 2224 r1 = ret.Get(1).(*model.AppError) 2225 } 2226 } 2227 2228 return r0, r1 2229 } 2230 2231 // SearchPostsInTeam provides a mock function with given fields: teamId, paramsList 2232 func (_m *API) SearchPostsInTeam(teamId string, paramsList []*model.SearchParams) ([]*model.Post, *model.AppError) { 2233 ret := _m.Called(teamId, paramsList) 2234 2235 var r0 []*model.Post 2236 if rf, ok := ret.Get(0).(func(string, []*model.SearchParams) []*model.Post); ok { 2237 r0 = rf(teamId, paramsList) 2238 } else { 2239 if ret.Get(0) != nil { 2240 r0 = ret.Get(0).([]*model.Post) 2241 } 2242 } 2243 2244 var r1 *model.AppError 2245 if rf, ok := ret.Get(1).(func(string, []*model.SearchParams) *model.AppError); ok { 2246 r1 = rf(teamId, paramsList) 2247 } else { 2248 if ret.Get(1) != nil { 2249 r1 = ret.Get(1).(*model.AppError) 2250 } 2251 } 2252 2253 return r0, r1 2254 } 2255 2256 // SearchTeams provides a mock function with given fields: term 2257 func (_m *API) SearchTeams(term string) ([]*model.Team, *model.AppError) { 2258 ret := _m.Called(term) 2259 2260 var r0 []*model.Team 2261 if rf, ok := ret.Get(0).(func(string) []*model.Team); ok { 2262 r0 = rf(term) 2263 } else { 2264 if ret.Get(0) != nil { 2265 r0 = ret.Get(0).([]*model.Team) 2266 } 2267 } 2268 2269 var r1 *model.AppError 2270 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 2271 r1 = rf(term) 2272 } else { 2273 if ret.Get(1) != nil { 2274 r1 = ret.Get(1).(*model.AppError) 2275 } 2276 } 2277 2278 return r0, r1 2279 } 2280 2281 // SearchUsers provides a mock function with given fields: search 2282 func (_m *API) SearchUsers(search *model.UserSearch) ([]*model.User, *model.AppError) { 2283 ret := _m.Called(search) 2284 2285 var r0 []*model.User 2286 if rf, ok := ret.Get(0).(func(*model.UserSearch) []*model.User); ok { 2287 r0 = rf(search) 2288 } else { 2289 if ret.Get(0) != nil { 2290 r0 = ret.Get(0).([]*model.User) 2291 } 2292 } 2293 2294 var r1 *model.AppError 2295 if rf, ok := ret.Get(1).(func(*model.UserSearch) *model.AppError); ok { 2296 r1 = rf(search) 2297 } else { 2298 if ret.Get(1) != nil { 2299 r1 = ret.Get(1).(*model.AppError) 2300 } 2301 } 2302 2303 return r0, r1 2304 } 2305 2306 // SendEphemeralPost provides a mock function with given fields: userId, post 2307 func (_m *API) SendEphemeralPost(userId string, post *model.Post) *model.Post { 2308 ret := _m.Called(userId, post) 2309 2310 var r0 *model.Post 2311 if rf, ok := ret.Get(0).(func(string, *model.Post) *model.Post); ok { 2312 r0 = rf(userId, post) 2313 } else { 2314 if ret.Get(0) != nil { 2315 r0 = ret.Get(0).(*model.Post) 2316 } 2317 } 2318 2319 return r0 2320 } 2321 2322 // SendMail provides a mock function with given fields: to, subject, htmlBody 2323 func (_m *API) SendMail(to string, subject string, htmlBody string) *model.AppError { 2324 ret := _m.Called(to, subject, htmlBody) 2325 2326 var r0 *model.AppError 2327 if rf, ok := ret.Get(0).(func(string, string, string) *model.AppError); ok { 2328 r0 = rf(to, subject, htmlBody) 2329 } else { 2330 if ret.Get(0) != nil { 2331 r0 = ret.Get(0).(*model.AppError) 2332 } 2333 } 2334 2335 return r0 2336 } 2337 2338 // SetProfileImage provides a mock function with given fields: userId, data 2339 func (_m *API) SetProfileImage(userId string, data []byte) *model.AppError { 2340 ret := _m.Called(userId, data) 2341 2342 var r0 *model.AppError 2343 if rf, ok := ret.Get(0).(func(string, []byte) *model.AppError); ok { 2344 r0 = rf(userId, data) 2345 } else { 2346 if ret.Get(0) != nil { 2347 r0 = ret.Get(0).(*model.AppError) 2348 } 2349 } 2350 2351 return r0 2352 } 2353 2354 // SetTeamIcon provides a mock function with given fields: teamId, data 2355 func (_m *API) SetTeamIcon(teamId string, data []byte) *model.AppError { 2356 ret := _m.Called(teamId, data) 2357 2358 var r0 *model.AppError 2359 if rf, ok := ret.Get(0).(func(string, []byte) *model.AppError); ok { 2360 r0 = rf(teamId, data) 2361 } else { 2362 if ret.Get(0) != nil { 2363 r0 = ret.Get(0).(*model.AppError) 2364 } 2365 } 2366 2367 return r0 2368 } 2369 2370 // UnregisterCommand provides a mock function with given fields: teamId, trigger 2371 func (_m *API) UnregisterCommand(teamId string, trigger string) error { 2372 ret := _m.Called(teamId, trigger) 2373 2374 var r0 error 2375 if rf, ok := ret.Get(0).(func(string, string) error); ok { 2376 r0 = rf(teamId, trigger) 2377 } else { 2378 r0 = ret.Error(0) 2379 } 2380 2381 return r0 2382 } 2383 2384 // UpdateBotActive provides a mock function with given fields: botUserId, active 2385 func (_m *API) UpdateBotActive(botUserId string, active bool) (*model.Bot, *model.AppError) { 2386 ret := _m.Called(botUserId, active) 2387 2388 var r0 *model.Bot 2389 if rf, ok := ret.Get(0).(func(string, bool) *model.Bot); ok { 2390 r0 = rf(botUserId, active) 2391 } else { 2392 if ret.Get(0) != nil { 2393 r0 = ret.Get(0).(*model.Bot) 2394 } 2395 } 2396 2397 var r1 *model.AppError 2398 if rf, ok := ret.Get(1).(func(string, bool) *model.AppError); ok { 2399 r1 = rf(botUserId, active) 2400 } else { 2401 if ret.Get(1) != nil { 2402 r1 = ret.Get(1).(*model.AppError) 2403 } 2404 } 2405 2406 return r0, r1 2407 } 2408 2409 // UpdateChannel provides a mock function with given fields: channel 2410 func (_m *API) UpdateChannel(channel *model.Channel) (*model.Channel, *model.AppError) { 2411 ret := _m.Called(channel) 2412 2413 var r0 *model.Channel 2414 if rf, ok := ret.Get(0).(func(*model.Channel) *model.Channel); ok { 2415 r0 = rf(channel) 2416 } else { 2417 if ret.Get(0) != nil { 2418 r0 = ret.Get(0).(*model.Channel) 2419 } 2420 } 2421 2422 var r1 *model.AppError 2423 if rf, ok := ret.Get(1).(func(*model.Channel) *model.AppError); ok { 2424 r1 = rf(channel) 2425 } else { 2426 if ret.Get(1) != nil { 2427 r1 = ret.Get(1).(*model.AppError) 2428 } 2429 } 2430 2431 return r0, r1 2432 } 2433 2434 // UpdateChannelMemberNotifications provides a mock function with given fields: channelId, userId, notifications 2435 func (_m *API) UpdateChannelMemberNotifications(channelId string, userId string, notifications map[string]string) (*model.ChannelMember, *model.AppError) { 2436 ret := _m.Called(channelId, userId, notifications) 2437 2438 var r0 *model.ChannelMember 2439 if rf, ok := ret.Get(0).(func(string, string, map[string]string) *model.ChannelMember); ok { 2440 r0 = rf(channelId, userId, notifications) 2441 } else { 2442 if ret.Get(0) != nil { 2443 r0 = ret.Get(0).(*model.ChannelMember) 2444 } 2445 } 2446 2447 var r1 *model.AppError 2448 if rf, ok := ret.Get(1).(func(string, string, map[string]string) *model.AppError); ok { 2449 r1 = rf(channelId, userId, notifications) 2450 } else { 2451 if ret.Get(1) != nil { 2452 r1 = ret.Get(1).(*model.AppError) 2453 } 2454 } 2455 2456 return r0, r1 2457 } 2458 2459 // UpdateChannelMemberRoles provides a mock function with given fields: channelId, userId, newRoles 2460 func (_m *API) UpdateChannelMemberRoles(channelId string, userId string, newRoles string) (*model.ChannelMember, *model.AppError) { 2461 ret := _m.Called(channelId, userId, newRoles) 2462 2463 var r0 *model.ChannelMember 2464 if rf, ok := ret.Get(0).(func(string, string, string) *model.ChannelMember); ok { 2465 r0 = rf(channelId, userId, newRoles) 2466 } else { 2467 if ret.Get(0) != nil { 2468 r0 = ret.Get(0).(*model.ChannelMember) 2469 } 2470 } 2471 2472 var r1 *model.AppError 2473 if rf, ok := ret.Get(1).(func(string, string, string) *model.AppError); ok { 2474 r1 = rf(channelId, userId, newRoles) 2475 } else { 2476 if ret.Get(1) != nil { 2477 r1 = ret.Get(1).(*model.AppError) 2478 } 2479 } 2480 2481 return r0, r1 2482 } 2483 2484 // UpdateEphemeralPost provides a mock function with given fields: userId, post 2485 func (_m *API) UpdateEphemeralPost(userId string, post *model.Post) *model.Post { 2486 ret := _m.Called(userId, post) 2487 2488 var r0 *model.Post 2489 if rf, ok := ret.Get(0).(func(string, *model.Post) *model.Post); ok { 2490 r0 = rf(userId, post) 2491 } else { 2492 if ret.Get(0) != nil { 2493 r0 = ret.Get(0).(*model.Post) 2494 } 2495 } 2496 2497 return r0 2498 } 2499 2500 // UpdatePost provides a mock function with given fields: post 2501 func (_m *API) UpdatePost(post *model.Post) (*model.Post, *model.AppError) { 2502 ret := _m.Called(post) 2503 2504 var r0 *model.Post 2505 if rf, ok := ret.Get(0).(func(*model.Post) *model.Post); ok { 2506 r0 = rf(post) 2507 } else { 2508 if ret.Get(0) != nil { 2509 r0 = ret.Get(0).(*model.Post) 2510 } 2511 } 2512 2513 var r1 *model.AppError 2514 if rf, ok := ret.Get(1).(func(*model.Post) *model.AppError); ok { 2515 r1 = rf(post) 2516 } else { 2517 if ret.Get(1) != nil { 2518 r1 = ret.Get(1).(*model.AppError) 2519 } 2520 } 2521 2522 return r0, r1 2523 } 2524 2525 // UpdateTeam provides a mock function with given fields: team 2526 func (_m *API) UpdateTeam(team *model.Team) (*model.Team, *model.AppError) { 2527 ret := _m.Called(team) 2528 2529 var r0 *model.Team 2530 if rf, ok := ret.Get(0).(func(*model.Team) *model.Team); ok { 2531 r0 = rf(team) 2532 } else { 2533 if ret.Get(0) != nil { 2534 r0 = ret.Get(0).(*model.Team) 2535 } 2536 } 2537 2538 var r1 *model.AppError 2539 if rf, ok := ret.Get(1).(func(*model.Team) *model.AppError); ok { 2540 r1 = rf(team) 2541 } else { 2542 if ret.Get(1) != nil { 2543 r1 = ret.Get(1).(*model.AppError) 2544 } 2545 } 2546 2547 return r0, r1 2548 } 2549 2550 // UpdateTeamMemberRoles provides a mock function with given fields: teamId, userId, newRoles 2551 func (_m *API) UpdateTeamMemberRoles(teamId string, userId string, newRoles string) (*model.TeamMember, *model.AppError) { 2552 ret := _m.Called(teamId, userId, newRoles) 2553 2554 var r0 *model.TeamMember 2555 if rf, ok := ret.Get(0).(func(string, string, string) *model.TeamMember); ok { 2556 r0 = rf(teamId, userId, newRoles) 2557 } else { 2558 if ret.Get(0) != nil { 2559 r0 = ret.Get(0).(*model.TeamMember) 2560 } 2561 } 2562 2563 var r1 *model.AppError 2564 if rf, ok := ret.Get(1).(func(string, string, string) *model.AppError); ok { 2565 r1 = rf(teamId, userId, newRoles) 2566 } else { 2567 if ret.Get(1) != nil { 2568 r1 = ret.Get(1).(*model.AppError) 2569 } 2570 } 2571 2572 return r0, r1 2573 } 2574 2575 // UpdateUser provides a mock function with given fields: user 2576 func (_m *API) UpdateUser(user *model.User) (*model.User, *model.AppError) { 2577 ret := _m.Called(user) 2578 2579 var r0 *model.User 2580 if rf, ok := ret.Get(0).(func(*model.User) *model.User); ok { 2581 r0 = rf(user) 2582 } else { 2583 if ret.Get(0) != nil { 2584 r0 = ret.Get(0).(*model.User) 2585 } 2586 } 2587 2588 var r1 *model.AppError 2589 if rf, ok := ret.Get(1).(func(*model.User) *model.AppError); ok { 2590 r1 = rf(user) 2591 } else { 2592 if ret.Get(1) != nil { 2593 r1 = ret.Get(1).(*model.AppError) 2594 } 2595 } 2596 2597 return r0, r1 2598 } 2599 2600 // UpdateUserActive provides a mock function with given fields: userId, active 2601 func (_m *API) UpdateUserActive(userId string, active bool) *model.AppError { 2602 ret := _m.Called(userId, active) 2603 2604 var r0 *model.AppError 2605 if rf, ok := ret.Get(0).(func(string, bool) *model.AppError); ok { 2606 r0 = rf(userId, active) 2607 } else { 2608 if ret.Get(0) != nil { 2609 r0 = ret.Get(0).(*model.AppError) 2610 } 2611 } 2612 2613 return r0 2614 } 2615 2616 // UpdateUserStatus provides a mock function with given fields: userId, status 2617 func (_m *API) UpdateUserStatus(userId string, status string) (*model.Status, *model.AppError) { 2618 ret := _m.Called(userId, status) 2619 2620 var r0 *model.Status 2621 if rf, ok := ret.Get(0).(func(string, string) *model.Status); ok { 2622 r0 = rf(userId, status) 2623 } else { 2624 if ret.Get(0) != nil { 2625 r0 = ret.Get(0).(*model.Status) 2626 } 2627 } 2628 2629 var r1 *model.AppError 2630 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 2631 r1 = rf(userId, status) 2632 } else { 2633 if ret.Get(1) != nil { 2634 r1 = ret.Get(1).(*model.AppError) 2635 } 2636 } 2637 2638 return r0, r1 2639 } 2640 2641 // UploadFile provides a mock function with given fields: data, channelId, filename 2642 func (_m *API) UploadFile(data []byte, channelId string, filename string) (*model.FileInfo, *model.AppError) { 2643 ret := _m.Called(data, channelId, filename) 2644 2645 var r0 *model.FileInfo 2646 if rf, ok := ret.Get(0).(func([]byte, string, string) *model.FileInfo); ok { 2647 r0 = rf(data, channelId, filename) 2648 } else { 2649 if ret.Get(0) != nil { 2650 r0 = ret.Get(0).(*model.FileInfo) 2651 } 2652 } 2653 2654 var r1 *model.AppError 2655 if rf, ok := ret.Get(1).(func([]byte, string, string) *model.AppError); ok { 2656 r1 = rf(data, channelId, filename) 2657 } else { 2658 if ret.Get(1) != nil { 2659 r1 = ret.Get(1).(*model.AppError) 2660 } 2661 } 2662 2663 return r0, r1 2664 }