/
mock_API.go
10150 lines (8409 loc) · 304 KB
/
mock_API.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by mockery v2.40.1. DO NOT EDIT.
package plugin
import (
io "io"
http "net/http"
mock "github.com/stretchr/testify/mock"
model "github.com/mattermost/mattermost/server/public/model"
)
// MockAPI is an autogenerated mock type for the API type
type MockAPI struct {
mock.Mock
}
type MockAPI_Expecter struct {
mock *mock.Mock
}
func (_m *MockAPI) EXPECT() *MockAPI_Expecter {
return &MockAPI_Expecter{mock: &_m.Mock}
}
// AddChannelMember provides a mock function with given fields: channelId, userID
func (_m *MockAPI) AddChannelMember(channelId string, userID string) (*model.ChannelMember, *model.AppError) {
ret := _m.Called(channelId, userID)
if len(ret) == 0 {
panic("no return value specified for AddChannelMember")
}
var r0 *model.ChannelMember
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, string) (*model.ChannelMember, *model.AppError)); ok {
return rf(channelId, userID)
}
if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMember); ok {
r0 = rf(channelId, userID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.ChannelMember)
}
}
if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
r1 = rf(channelId, userID)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0, r1
}
// MockAPI_AddChannelMember_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddChannelMember'
type MockAPI_AddChannelMember_Call struct {
*mock.Call
}
// AddChannelMember is a helper method to define mock.On call
// - channelId string
// - userID string
func (_e *MockAPI_Expecter) AddChannelMember(channelId interface{}, userID interface{}) *MockAPI_AddChannelMember_Call {
return &MockAPI_AddChannelMember_Call{Call: _e.mock.On("AddChannelMember", channelId, userID)}
}
func (_c *MockAPI_AddChannelMember_Call) Run(run func(channelId string, userID string)) *MockAPI_AddChannelMember_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(string))
})
return _c
}
func (_c *MockAPI_AddChannelMember_Call) Return(_a0 *model.ChannelMember, _a1 *model.AppError) *MockAPI_AddChannelMember_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockAPI_AddChannelMember_Call) RunAndReturn(run func(string, string) (*model.ChannelMember, *model.AppError)) *MockAPI_AddChannelMember_Call {
_c.Call.Return(run)
return _c
}
// AddReaction provides a mock function with given fields: reaction
func (_m *MockAPI) AddReaction(reaction *model.Reaction) (*model.Reaction, *model.AppError) {
ret := _m.Called(reaction)
if len(ret) == 0 {
panic("no return value specified for AddReaction")
}
var r0 *model.Reaction
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(*model.Reaction) (*model.Reaction, *model.AppError)); ok {
return rf(reaction)
}
if rf, ok := ret.Get(0).(func(*model.Reaction) *model.Reaction); ok {
r0 = rf(reaction)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Reaction)
}
}
if rf, ok := ret.Get(1).(func(*model.Reaction) *model.AppError); ok {
r1 = rf(reaction)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0, r1
}
// MockAPI_AddReaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddReaction'
type MockAPI_AddReaction_Call struct {
*mock.Call
}
// AddReaction is a helper method to define mock.On call
// - reaction *model.Reaction
func (_e *MockAPI_Expecter) AddReaction(reaction interface{}) *MockAPI_AddReaction_Call {
return &MockAPI_AddReaction_Call{Call: _e.mock.On("AddReaction", reaction)}
}
func (_c *MockAPI_AddReaction_Call) Run(run func(reaction *model.Reaction)) *MockAPI_AddReaction_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*model.Reaction))
})
return _c
}
func (_c *MockAPI_AddReaction_Call) Return(_a0 *model.Reaction, _a1 *model.AppError) *MockAPI_AddReaction_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockAPI_AddReaction_Call) RunAndReturn(run func(*model.Reaction) (*model.Reaction, *model.AppError)) *MockAPI_AddReaction_Call {
_c.Call.Return(run)
return _c
}
// AddUserToChannel provides a mock function with given fields: channelId, userID, asUserId
func (_m *MockAPI) AddUserToChannel(channelId string, userID string, asUserId string) (*model.ChannelMember, *model.AppError) {
ret := _m.Called(channelId, userID, asUserId)
if len(ret) == 0 {
panic("no return value specified for AddUserToChannel")
}
var r0 *model.ChannelMember
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, string, string) (*model.ChannelMember, *model.AppError)); ok {
return rf(channelId, userID, asUserId)
}
if rf, ok := ret.Get(0).(func(string, string, string) *model.ChannelMember); ok {
r0 = rf(channelId, userID, asUserId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.ChannelMember)
}
}
if rf, ok := ret.Get(1).(func(string, string, string) *model.AppError); ok {
r1 = rf(channelId, userID, asUserId)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0, r1
}
// MockAPI_AddUserToChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddUserToChannel'
type MockAPI_AddUserToChannel_Call struct {
*mock.Call
}
// AddUserToChannel is a helper method to define mock.On call
// - channelId string
// - userID string
// - asUserId string
func (_e *MockAPI_Expecter) AddUserToChannel(channelId interface{}, userID interface{}, asUserId interface{}) *MockAPI_AddUserToChannel_Call {
return &MockAPI_AddUserToChannel_Call{Call: _e.mock.On("AddUserToChannel", channelId, userID, asUserId)}
}
func (_c *MockAPI_AddUserToChannel_Call) Run(run func(channelId string, userID string, asUserId string)) *MockAPI_AddUserToChannel_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(string), args[2].(string))
})
return _c
}
func (_c *MockAPI_AddUserToChannel_Call) Return(_a0 *model.ChannelMember, _a1 *model.AppError) *MockAPI_AddUserToChannel_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockAPI_AddUserToChannel_Call) RunAndReturn(run func(string, string, string) (*model.ChannelMember, *model.AppError)) *MockAPI_AddUserToChannel_Call {
_c.Call.Return(run)
return _c
}
// CopyFileInfos provides a mock function with given fields: userID, fileIds
func (_m *MockAPI) CopyFileInfos(userID string, fileIds []string) ([]string, *model.AppError) {
ret := _m.Called(userID, fileIds)
if len(ret) == 0 {
panic("no return value specified for CopyFileInfos")
}
var r0 []string
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, []string) ([]string, *model.AppError)); ok {
return rf(userID, fileIds)
}
if rf, ok := ret.Get(0).(func(string, []string) []string); ok {
r0 = rf(userID, fileIds)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok {
r1 = rf(userID, fileIds)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0, r1
}
// MockAPI_CopyFileInfos_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CopyFileInfos'
type MockAPI_CopyFileInfos_Call struct {
*mock.Call
}
// CopyFileInfos is a helper method to define mock.On call
// - userID string
// - fileIds []string
func (_e *MockAPI_Expecter) CopyFileInfos(userID interface{}, fileIds interface{}) *MockAPI_CopyFileInfos_Call {
return &MockAPI_CopyFileInfos_Call{Call: _e.mock.On("CopyFileInfos", userID, fileIds)}
}
func (_c *MockAPI_CopyFileInfos_Call) Run(run func(userID string, fileIds []string)) *MockAPI_CopyFileInfos_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].([]string))
})
return _c
}
func (_c *MockAPI_CopyFileInfos_Call) Return(_a0 []string, _a1 *model.AppError) *MockAPI_CopyFileInfos_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockAPI_CopyFileInfos_Call) RunAndReturn(run func(string, []string) ([]string, *model.AppError)) *MockAPI_CopyFileInfos_Call {
_c.Call.Return(run)
return _c
}
// CreateBot provides a mock function with given fields: bot
func (_m *MockAPI) CreateBot(bot *model.Bot) (*model.Bot, *model.AppError) {
ret := _m.Called(bot)
if len(ret) == 0 {
panic("no return value specified for CreateBot")
}
var r0 *model.Bot
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(*model.Bot) (*model.Bot, *model.AppError)); ok {
return rf(bot)
}
if rf, ok := ret.Get(0).(func(*model.Bot) *model.Bot); ok {
r0 = rf(bot)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Bot)
}
}
if rf, ok := ret.Get(1).(func(*model.Bot) *model.AppError); ok {
r1 = rf(bot)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0, r1
}
// MockAPI_CreateBot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateBot'
type MockAPI_CreateBot_Call struct {
*mock.Call
}
// CreateBot is a helper method to define mock.On call
// - bot *model.Bot
func (_e *MockAPI_Expecter) CreateBot(bot interface{}) *MockAPI_CreateBot_Call {
return &MockAPI_CreateBot_Call{Call: _e.mock.On("CreateBot", bot)}
}
func (_c *MockAPI_CreateBot_Call) Run(run func(bot *model.Bot)) *MockAPI_CreateBot_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*model.Bot))
})
return _c
}
func (_c *MockAPI_CreateBot_Call) Return(_a0 *model.Bot, _a1 *model.AppError) *MockAPI_CreateBot_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockAPI_CreateBot_Call) RunAndReturn(run func(*model.Bot) (*model.Bot, *model.AppError)) *MockAPI_CreateBot_Call {
_c.Call.Return(run)
return _c
}
// CreateChannel provides a mock function with given fields: channel
func (_m *MockAPI) CreateChannel(channel *model.Channel) (*model.Channel, *model.AppError) {
ret := _m.Called(channel)
if len(ret) == 0 {
panic("no return value specified for CreateChannel")
}
var r0 *model.Channel
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(*model.Channel) (*model.Channel, *model.AppError)); ok {
return rf(channel)
}
if rf, ok := ret.Get(0).(func(*model.Channel) *model.Channel); ok {
r0 = rf(channel)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Channel)
}
}
if rf, ok := ret.Get(1).(func(*model.Channel) *model.AppError); ok {
r1 = rf(channel)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0, r1
}
// MockAPI_CreateChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateChannel'
type MockAPI_CreateChannel_Call struct {
*mock.Call
}
// CreateChannel is a helper method to define mock.On call
// - channel *model.Channel
func (_e *MockAPI_Expecter) CreateChannel(channel interface{}) *MockAPI_CreateChannel_Call {
return &MockAPI_CreateChannel_Call{Call: _e.mock.On("CreateChannel", channel)}
}
func (_c *MockAPI_CreateChannel_Call) Run(run func(channel *model.Channel)) *MockAPI_CreateChannel_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*model.Channel))
})
return _c
}
func (_c *MockAPI_CreateChannel_Call) Return(_a0 *model.Channel, _a1 *model.AppError) *MockAPI_CreateChannel_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockAPI_CreateChannel_Call) RunAndReturn(run func(*model.Channel) (*model.Channel, *model.AppError)) *MockAPI_CreateChannel_Call {
_c.Call.Return(run)
return _c
}
// CreateChannelSidebarCategory provides a mock function with given fields: userID, teamID, newCategory
func (_m *MockAPI) CreateChannelSidebarCategory(userID string, teamID string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, *model.AppError) {
ret := _m.Called(userID, teamID, newCategory)
if len(ret) == 0 {
panic("no return value specified for CreateChannelSidebarCategory")
}
var r0 *model.SidebarCategoryWithChannels
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, string, *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, *model.AppError)); ok {
return rf(userID, teamID, newCategory)
}
if rf, ok := ret.Get(0).(func(string, string, *model.SidebarCategoryWithChannels) *model.SidebarCategoryWithChannels); ok {
r0 = rf(userID, teamID, newCategory)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.SidebarCategoryWithChannels)
}
}
if rf, ok := ret.Get(1).(func(string, string, *model.SidebarCategoryWithChannels) *model.AppError); ok {
r1 = rf(userID, teamID, newCategory)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0, r1
}
// MockAPI_CreateChannelSidebarCategory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateChannelSidebarCategory'
type MockAPI_CreateChannelSidebarCategory_Call struct {
*mock.Call
}
// CreateChannelSidebarCategory is a helper method to define mock.On call
// - userID string
// - teamID string
// - newCategory *model.SidebarCategoryWithChannels
func (_e *MockAPI_Expecter) CreateChannelSidebarCategory(userID interface{}, teamID interface{}, newCategory interface{}) *MockAPI_CreateChannelSidebarCategory_Call {
return &MockAPI_CreateChannelSidebarCategory_Call{Call: _e.mock.On("CreateChannelSidebarCategory", userID, teamID, newCategory)}
}
func (_c *MockAPI_CreateChannelSidebarCategory_Call) Run(run func(userID string, teamID string, newCategory *model.SidebarCategoryWithChannels)) *MockAPI_CreateChannelSidebarCategory_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(string), args[2].(*model.SidebarCategoryWithChannels))
})
return _c
}
func (_c *MockAPI_CreateChannelSidebarCategory_Call) Return(_a0 *model.SidebarCategoryWithChannels, _a1 *model.AppError) *MockAPI_CreateChannelSidebarCategory_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockAPI_CreateChannelSidebarCategory_Call) RunAndReturn(run func(string, string, *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, *model.AppError)) *MockAPI_CreateChannelSidebarCategory_Call {
_c.Call.Return(run)
return _c
}
// CreateCommand provides a mock function with given fields: cmd
func (_m *MockAPI) CreateCommand(cmd *model.Command) (*model.Command, error) {
ret := _m.Called(cmd)
if len(ret) == 0 {
panic("no return value specified for CreateCommand")
}
var r0 *model.Command
var r1 error
if rf, ok := ret.Get(0).(func(*model.Command) (*model.Command, error)); ok {
return rf(cmd)
}
if rf, ok := ret.Get(0).(func(*model.Command) *model.Command); ok {
r0 = rf(cmd)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Command)
}
}
if rf, ok := ret.Get(1).(func(*model.Command) error); ok {
r1 = rf(cmd)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockAPI_CreateCommand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateCommand'
type MockAPI_CreateCommand_Call struct {
*mock.Call
}
// CreateCommand is a helper method to define mock.On call
// - cmd *model.Command
func (_e *MockAPI_Expecter) CreateCommand(cmd interface{}) *MockAPI_CreateCommand_Call {
return &MockAPI_CreateCommand_Call{Call: _e.mock.On("CreateCommand", cmd)}
}
func (_c *MockAPI_CreateCommand_Call) Run(run func(cmd *model.Command)) *MockAPI_CreateCommand_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*model.Command))
})
return _c
}
func (_c *MockAPI_CreateCommand_Call) Return(_a0 *model.Command, _a1 error) *MockAPI_CreateCommand_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockAPI_CreateCommand_Call) RunAndReturn(run func(*model.Command) (*model.Command, error)) *MockAPI_CreateCommand_Call {
_c.Call.Return(run)
return _c
}
// CreateOAuthApp provides a mock function with given fields: app
func (_m *MockAPI) CreateOAuthApp(app *model.OAuthApp) (*model.OAuthApp, *model.AppError) {
ret := _m.Called(app)
if len(ret) == 0 {
panic("no return value specified for CreateOAuthApp")
}
var r0 *model.OAuthApp
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(*model.OAuthApp) (*model.OAuthApp, *model.AppError)); ok {
return rf(app)
}
if rf, ok := ret.Get(0).(func(*model.OAuthApp) *model.OAuthApp); ok {
r0 = rf(app)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.OAuthApp)
}
}
if rf, ok := ret.Get(1).(func(*model.OAuthApp) *model.AppError); ok {
r1 = rf(app)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0, r1
}
// MockAPI_CreateOAuthApp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateOAuthApp'
type MockAPI_CreateOAuthApp_Call struct {
*mock.Call
}
// CreateOAuthApp is a helper method to define mock.On call
// - app *model.OAuthApp
func (_e *MockAPI_Expecter) CreateOAuthApp(app interface{}) *MockAPI_CreateOAuthApp_Call {
return &MockAPI_CreateOAuthApp_Call{Call: _e.mock.On("CreateOAuthApp", app)}
}
func (_c *MockAPI_CreateOAuthApp_Call) Run(run func(app *model.OAuthApp)) *MockAPI_CreateOAuthApp_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*model.OAuthApp))
})
return _c
}
func (_c *MockAPI_CreateOAuthApp_Call) Return(_a0 *model.OAuthApp, _a1 *model.AppError) *MockAPI_CreateOAuthApp_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockAPI_CreateOAuthApp_Call) RunAndReturn(run func(*model.OAuthApp) (*model.OAuthApp, *model.AppError)) *MockAPI_CreateOAuthApp_Call {
_c.Call.Return(run)
return _c
}
// CreatePost provides a mock function with given fields: post
func (_m *MockAPI) CreatePost(post *model.Post) (*model.Post, *model.AppError) {
ret := _m.Called(post)
if len(ret) == 0 {
panic("no return value specified for CreatePost")
}
var r0 *model.Post
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(*model.Post) (*model.Post, *model.AppError)); ok {
return rf(post)
}
if rf, ok := ret.Get(0).(func(*model.Post) *model.Post); ok {
r0 = rf(post)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Post)
}
}
if rf, ok := ret.Get(1).(func(*model.Post) *model.AppError); ok {
r1 = rf(post)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0, r1
}
// MockAPI_CreatePost_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePost'
type MockAPI_CreatePost_Call struct {
*mock.Call
}
// CreatePost is a helper method to define mock.On call
// - post *model.Post
func (_e *MockAPI_Expecter) CreatePost(post interface{}) *MockAPI_CreatePost_Call {
return &MockAPI_CreatePost_Call{Call: _e.mock.On("CreatePost", post)}
}
func (_c *MockAPI_CreatePost_Call) Run(run func(post *model.Post)) *MockAPI_CreatePost_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*model.Post))
})
return _c
}
func (_c *MockAPI_CreatePost_Call) Return(_a0 *model.Post, _a1 *model.AppError) *MockAPI_CreatePost_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockAPI_CreatePost_Call) RunAndReturn(run func(*model.Post) (*model.Post, *model.AppError)) *MockAPI_CreatePost_Call {
_c.Call.Return(run)
return _c
}
// CreateSession provides a mock function with given fields: session
func (_m *MockAPI) CreateSession(session *model.Session) (*model.Session, *model.AppError) {
ret := _m.Called(session)
if len(ret) == 0 {
panic("no return value specified for CreateSession")
}
var r0 *model.Session
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(*model.Session) (*model.Session, *model.AppError)); ok {
return rf(session)
}
if rf, ok := ret.Get(0).(func(*model.Session) *model.Session); ok {
r0 = rf(session)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Session)
}
}
if rf, ok := ret.Get(1).(func(*model.Session) *model.AppError); ok {
r1 = rf(session)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0, r1
}
// MockAPI_CreateSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSession'
type MockAPI_CreateSession_Call struct {
*mock.Call
}
// CreateSession is a helper method to define mock.On call
// - session *model.Session
func (_e *MockAPI_Expecter) CreateSession(session interface{}) *MockAPI_CreateSession_Call {
return &MockAPI_CreateSession_Call{Call: _e.mock.On("CreateSession", session)}
}
func (_c *MockAPI_CreateSession_Call) Run(run func(session *model.Session)) *MockAPI_CreateSession_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*model.Session))
})
return _c
}
func (_c *MockAPI_CreateSession_Call) Return(_a0 *model.Session, _a1 *model.AppError) *MockAPI_CreateSession_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockAPI_CreateSession_Call) RunAndReturn(run func(*model.Session) (*model.Session, *model.AppError)) *MockAPI_CreateSession_Call {
_c.Call.Return(run)
return _c
}
// CreateTeam provides a mock function with given fields: team
func (_m *MockAPI) CreateTeam(team *model.Team) (*model.Team, *model.AppError) {
ret := _m.Called(team)
if len(ret) == 0 {
panic("no return value specified for CreateTeam")
}
var r0 *model.Team
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(*model.Team) (*model.Team, *model.AppError)); ok {
return rf(team)
}
if rf, ok := ret.Get(0).(func(*model.Team) *model.Team); ok {
r0 = rf(team)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Team)
}
}
if rf, ok := ret.Get(1).(func(*model.Team) *model.AppError); ok {
r1 = rf(team)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0, r1
}
// MockAPI_CreateTeam_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTeam'
type MockAPI_CreateTeam_Call struct {
*mock.Call
}
// CreateTeam is a helper method to define mock.On call
// - team *model.Team
func (_e *MockAPI_Expecter) CreateTeam(team interface{}) *MockAPI_CreateTeam_Call {
return &MockAPI_CreateTeam_Call{Call: _e.mock.On("CreateTeam", team)}
}
func (_c *MockAPI_CreateTeam_Call) Run(run func(team *model.Team)) *MockAPI_CreateTeam_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*model.Team))
})
return _c
}
func (_c *MockAPI_CreateTeam_Call) Return(_a0 *model.Team, _a1 *model.AppError) *MockAPI_CreateTeam_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockAPI_CreateTeam_Call) RunAndReturn(run func(*model.Team) (*model.Team, *model.AppError)) *MockAPI_CreateTeam_Call {
_c.Call.Return(run)
return _c
}
// CreateTeamMember provides a mock function with given fields: teamID, userID
func (_m *MockAPI) CreateTeamMember(teamID string, userID string) (*model.TeamMember, *model.AppError) {
ret := _m.Called(teamID, userID)
if len(ret) == 0 {
panic("no return value specified for CreateTeamMember")
}
var r0 *model.TeamMember
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, string) (*model.TeamMember, *model.AppError)); ok {
return rf(teamID, userID)
}
if rf, ok := ret.Get(0).(func(string, string) *model.TeamMember); ok {
r0 = rf(teamID, userID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.TeamMember)
}
}
if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
r1 = rf(teamID, userID)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0, r1
}
// MockAPI_CreateTeamMember_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTeamMember'
type MockAPI_CreateTeamMember_Call struct {
*mock.Call
}
// CreateTeamMember is a helper method to define mock.On call
// - teamID string
// - userID string
func (_e *MockAPI_Expecter) CreateTeamMember(teamID interface{}, userID interface{}) *MockAPI_CreateTeamMember_Call {
return &MockAPI_CreateTeamMember_Call{Call: _e.mock.On("CreateTeamMember", teamID, userID)}
}
func (_c *MockAPI_CreateTeamMember_Call) Run(run func(teamID string, userID string)) *MockAPI_CreateTeamMember_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(string))
})
return _c
}
func (_c *MockAPI_CreateTeamMember_Call) Return(_a0 *model.TeamMember, _a1 *model.AppError) *MockAPI_CreateTeamMember_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockAPI_CreateTeamMember_Call) RunAndReturn(run func(string, string) (*model.TeamMember, *model.AppError)) *MockAPI_CreateTeamMember_Call {
_c.Call.Return(run)
return _c
}
// CreateTeamMembers provides a mock function with given fields: teamID, userIds, requestorId
func (_m *MockAPI) CreateTeamMembers(teamID string, userIds []string, requestorId string) ([]*model.TeamMember, *model.AppError) {
ret := _m.Called(teamID, userIds, requestorId)
if len(ret) == 0 {
panic("no return value specified for CreateTeamMembers")
}
var r0 []*model.TeamMember
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, []string, string) ([]*model.TeamMember, *model.AppError)); ok {
return rf(teamID, userIds, requestorId)
}
if rf, ok := ret.Get(0).(func(string, []string, string) []*model.TeamMember); ok {
r0 = rf(teamID, userIds, requestorId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.TeamMember)
}
}
if rf, ok := ret.Get(1).(func(string, []string, string) *model.AppError); ok {
r1 = rf(teamID, userIds, requestorId)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0, r1
}
// MockAPI_CreateTeamMembers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTeamMembers'
type MockAPI_CreateTeamMembers_Call struct {
*mock.Call
}
// CreateTeamMembers is a helper method to define mock.On call
// - teamID string
// - userIds []string
// - requestorId string
func (_e *MockAPI_Expecter) CreateTeamMembers(teamID interface{}, userIds interface{}, requestorId interface{}) *MockAPI_CreateTeamMembers_Call {
return &MockAPI_CreateTeamMembers_Call{Call: _e.mock.On("CreateTeamMembers", teamID, userIds, requestorId)}
}
func (_c *MockAPI_CreateTeamMembers_Call) Run(run func(teamID string, userIds []string, requestorId string)) *MockAPI_CreateTeamMembers_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].([]string), args[2].(string))
})
return _c
}
func (_c *MockAPI_CreateTeamMembers_Call) Return(_a0 []*model.TeamMember, _a1 *model.AppError) *MockAPI_CreateTeamMembers_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockAPI_CreateTeamMembers_Call) RunAndReturn(run func(string, []string, string) ([]*model.TeamMember, *model.AppError)) *MockAPI_CreateTeamMembers_Call {
_c.Call.Return(run)
return _c
}
// CreateTeamMembersGracefully provides a mock function with given fields: teamID, userIds, requestorId
func (_m *MockAPI) CreateTeamMembersGracefully(teamID string, userIds []string, requestorId string) ([]*model.TeamMemberWithError, *model.AppError) {
ret := _m.Called(teamID, userIds, requestorId)
if len(ret) == 0 {
panic("no return value specified for CreateTeamMembersGracefully")
}
var r0 []*model.TeamMemberWithError
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, []string, string) ([]*model.TeamMemberWithError, *model.AppError)); ok {
return rf(teamID, userIds, requestorId)
}
if rf, ok := ret.Get(0).(func(string, []string, string) []*model.TeamMemberWithError); ok {
r0 = rf(teamID, userIds, requestorId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.TeamMemberWithError)
}
}
if rf, ok := ret.Get(1).(func(string, []string, string) *model.AppError); ok {
r1 = rf(teamID, userIds, requestorId)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0, r1
}
// MockAPI_CreateTeamMembersGracefully_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTeamMembersGracefully'
type MockAPI_CreateTeamMembersGracefully_Call struct {
*mock.Call
}
// CreateTeamMembersGracefully is a helper method to define mock.On call
// - teamID string
// - userIds []string
// - requestorId string
func (_e *MockAPI_Expecter) CreateTeamMembersGracefully(teamID interface{}, userIds interface{}, requestorId interface{}) *MockAPI_CreateTeamMembersGracefully_Call {
return &MockAPI_CreateTeamMembersGracefully_Call{Call: _e.mock.On("CreateTeamMembersGracefully", teamID, userIds, requestorId)}
}
func (_c *MockAPI_CreateTeamMembersGracefully_Call) Run(run func(teamID string, userIds []string, requestorId string)) *MockAPI_CreateTeamMembersGracefully_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].([]string), args[2].(string))
})
return _c
}
func (_c *MockAPI_CreateTeamMembersGracefully_Call) Return(_a0 []*model.TeamMemberWithError, _a1 *model.AppError) *MockAPI_CreateTeamMembersGracefully_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockAPI_CreateTeamMembersGracefully_Call) RunAndReturn(run func(string, []string, string) ([]*model.TeamMemberWithError, *model.AppError)) *MockAPI_CreateTeamMembersGracefully_Call {
_c.Call.Return(run)
return _c
}
// CreateUploadSession provides a mock function with given fields: us
func (_m *MockAPI) CreateUploadSession(us *model.UploadSession) (*model.UploadSession, error) {
ret := _m.Called(us)
if len(ret) == 0 {
panic("no return value specified for CreateUploadSession")
}
var r0 *model.UploadSession
var r1 error
if rf, ok := ret.Get(0).(func(*model.UploadSession) (*model.UploadSession, error)); ok {
return rf(us)
}
if rf, ok := ret.Get(0).(func(*model.UploadSession) *model.UploadSession); ok {
r0 = rf(us)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.UploadSession)
}
}
if rf, ok := ret.Get(1).(func(*model.UploadSession) error); ok {
r1 = rf(us)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockAPI_CreateUploadSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateUploadSession'
type MockAPI_CreateUploadSession_Call struct {
*mock.Call
}
// CreateUploadSession is a helper method to define mock.On call
// - us *model.UploadSession
func (_e *MockAPI_Expecter) CreateUploadSession(us interface{}) *MockAPI_CreateUploadSession_Call {
return &MockAPI_CreateUploadSession_Call{Call: _e.mock.On("CreateUploadSession", us)}
}
func (_c *MockAPI_CreateUploadSession_Call) Run(run func(us *model.UploadSession)) *MockAPI_CreateUploadSession_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*model.UploadSession))
})
return _c
}
func (_c *MockAPI_CreateUploadSession_Call) Return(_a0 *model.UploadSession, _a1 error) *MockAPI_CreateUploadSession_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockAPI_CreateUploadSession_Call) RunAndReturn(run func(*model.UploadSession) (*model.UploadSession, error)) *MockAPI_CreateUploadSession_Call {
_c.Call.Return(run)
return _c
}
// CreateUser provides a mock function with given fields: user
func (_m *MockAPI) CreateUser(user *model.User) (*model.User, *model.AppError) {
ret := _m.Called(user)
if len(ret) == 0 {
panic("no return value specified for CreateUser")
}