forked from mattermost/mattermost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
client_rpc_generated.go
3501 lines (2994 loc) · 102 KB
/
client_rpc_generated.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
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
// Code generated by "make pluginapi"
// DO NOT EDIT
package plugin
import (
"fmt"
"log"
"github.com/mattermost/mattermost-server/mlog"
"github.com/mattermost/mattermost-server/model"
)
func init() {
hookNameToId["OnDeactivate"] = OnDeactivateId
}
type Z_OnDeactivateArgs struct {
}
type Z_OnDeactivateReturns struct {
A error
}
func (g *hooksRPCClient) OnDeactivate() error {
_args := &Z_OnDeactivateArgs{}
_returns := &Z_OnDeactivateReturns{}
if g.implemented[OnDeactivateId] {
if err := g.client.Call("Plugin.OnDeactivate", _args, _returns); err != nil {
g.log.Error("RPC call OnDeactivate to plugin failed.", mlog.Err(err))
}
}
return _returns.A
}
func (s *hooksRPCServer) OnDeactivate(args *Z_OnDeactivateArgs, returns *Z_OnDeactivateReturns) error {
if hook, ok := s.impl.(interface {
OnDeactivate() error
}); ok {
returns.A = hook.OnDeactivate()
returns.A = encodableError(returns.A)
} else {
return encodableError(fmt.Errorf("Hook OnDeactivate called but not implemented."))
}
return nil
}
func init() {
hookNameToId["OnConfigurationChange"] = OnConfigurationChangeId
}
type Z_OnConfigurationChangeArgs struct {
}
type Z_OnConfigurationChangeReturns struct {
A error
}
func (g *hooksRPCClient) OnConfigurationChange() error {
_args := &Z_OnConfigurationChangeArgs{}
_returns := &Z_OnConfigurationChangeReturns{}
if g.implemented[OnConfigurationChangeId] {
if err := g.client.Call("Plugin.OnConfigurationChange", _args, _returns); err != nil {
g.log.Error("RPC call OnConfigurationChange to plugin failed.", mlog.Err(err))
}
}
return _returns.A
}
func (s *hooksRPCServer) OnConfigurationChange(args *Z_OnConfigurationChangeArgs, returns *Z_OnConfigurationChangeReturns) error {
if hook, ok := s.impl.(interface {
OnConfigurationChange() error
}); ok {
returns.A = hook.OnConfigurationChange()
returns.A = encodableError(returns.A)
} else {
return encodableError(fmt.Errorf("Hook OnConfigurationChange called but not implemented."))
}
return nil
}
func init() {
hookNameToId["ExecuteCommand"] = ExecuteCommandId
}
type Z_ExecuteCommandArgs struct {
A *Context
B *model.CommandArgs
}
type Z_ExecuteCommandReturns struct {
A *model.CommandResponse
B *model.AppError
}
func (g *hooksRPCClient) ExecuteCommand(c *Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError) {
_args := &Z_ExecuteCommandArgs{c, args}
_returns := &Z_ExecuteCommandReturns{}
if g.implemented[ExecuteCommandId] {
if err := g.client.Call("Plugin.ExecuteCommand", _args, _returns); err != nil {
g.log.Error("RPC call ExecuteCommand to plugin failed.", mlog.Err(err))
}
}
return _returns.A, _returns.B
}
func (s *hooksRPCServer) ExecuteCommand(args *Z_ExecuteCommandArgs, returns *Z_ExecuteCommandReturns) error {
if hook, ok := s.impl.(interface {
ExecuteCommand(c *Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError)
}); ok {
returns.A, returns.B = hook.ExecuteCommand(args.A, args.B)
} else {
return encodableError(fmt.Errorf("Hook ExecuteCommand called but not implemented."))
}
return nil
}
func init() {
hookNameToId["MessageWillBePosted"] = MessageWillBePostedId
}
type Z_MessageWillBePostedArgs struct {
A *Context
B *model.Post
}
type Z_MessageWillBePostedReturns struct {
A *model.Post
B string
}
func (g *hooksRPCClient) MessageWillBePosted(c *Context, post *model.Post) (*model.Post, string) {
_args := &Z_MessageWillBePostedArgs{c, post}
_returns := &Z_MessageWillBePostedReturns{}
if g.implemented[MessageWillBePostedId] {
if err := g.client.Call("Plugin.MessageWillBePosted", _args, _returns); err != nil {
g.log.Error("RPC call MessageWillBePosted to plugin failed.", mlog.Err(err))
}
}
return _returns.A, _returns.B
}
func (s *hooksRPCServer) MessageWillBePosted(args *Z_MessageWillBePostedArgs, returns *Z_MessageWillBePostedReturns) error {
if hook, ok := s.impl.(interface {
MessageWillBePosted(c *Context, post *model.Post) (*model.Post, string)
}); ok {
returns.A, returns.B = hook.MessageWillBePosted(args.A, args.B)
} else {
return encodableError(fmt.Errorf("Hook MessageWillBePosted called but not implemented."))
}
return nil
}
func init() {
hookNameToId["MessageWillBeUpdated"] = MessageWillBeUpdatedId
}
type Z_MessageWillBeUpdatedArgs struct {
A *Context
B *model.Post
C *model.Post
}
type Z_MessageWillBeUpdatedReturns struct {
A *model.Post
B string
}
func (g *hooksRPCClient) MessageWillBeUpdated(c *Context, newPost, oldPost *model.Post) (*model.Post, string) {
_args := &Z_MessageWillBeUpdatedArgs{c, newPost, oldPost}
_returns := &Z_MessageWillBeUpdatedReturns{}
if g.implemented[MessageWillBeUpdatedId] {
if err := g.client.Call("Plugin.MessageWillBeUpdated", _args, _returns); err != nil {
g.log.Error("RPC call MessageWillBeUpdated to plugin failed.", mlog.Err(err))
}
}
return _returns.A, _returns.B
}
func (s *hooksRPCServer) MessageWillBeUpdated(args *Z_MessageWillBeUpdatedArgs, returns *Z_MessageWillBeUpdatedReturns) error {
if hook, ok := s.impl.(interface {
MessageWillBeUpdated(c *Context, newPost, oldPost *model.Post) (*model.Post, string)
}); ok {
returns.A, returns.B = hook.MessageWillBeUpdated(args.A, args.B, args.C)
} else {
return encodableError(fmt.Errorf("Hook MessageWillBeUpdated called but not implemented."))
}
return nil
}
func init() {
hookNameToId["MessageHasBeenPosted"] = MessageHasBeenPostedId
}
type Z_MessageHasBeenPostedArgs struct {
A *Context
B *model.Post
}
type Z_MessageHasBeenPostedReturns struct {
}
func (g *hooksRPCClient) MessageHasBeenPosted(c *Context, post *model.Post) {
_args := &Z_MessageHasBeenPostedArgs{c, post}
_returns := &Z_MessageHasBeenPostedReturns{}
if g.implemented[MessageHasBeenPostedId] {
if err := g.client.Call("Plugin.MessageHasBeenPosted", _args, _returns); err != nil {
g.log.Error("RPC call MessageHasBeenPosted to plugin failed.", mlog.Err(err))
}
}
}
func (s *hooksRPCServer) MessageHasBeenPosted(args *Z_MessageHasBeenPostedArgs, returns *Z_MessageHasBeenPostedReturns) error {
if hook, ok := s.impl.(interface {
MessageHasBeenPosted(c *Context, post *model.Post)
}); ok {
hook.MessageHasBeenPosted(args.A, args.B)
} else {
return encodableError(fmt.Errorf("Hook MessageHasBeenPosted called but not implemented."))
}
return nil
}
func init() {
hookNameToId["MessageHasBeenUpdated"] = MessageHasBeenUpdatedId
}
type Z_MessageHasBeenUpdatedArgs struct {
A *Context
B *model.Post
C *model.Post
}
type Z_MessageHasBeenUpdatedReturns struct {
}
func (g *hooksRPCClient) MessageHasBeenUpdated(c *Context, newPost, oldPost *model.Post) {
_args := &Z_MessageHasBeenUpdatedArgs{c, newPost, oldPost}
_returns := &Z_MessageHasBeenUpdatedReturns{}
if g.implemented[MessageHasBeenUpdatedId] {
if err := g.client.Call("Plugin.MessageHasBeenUpdated", _args, _returns); err != nil {
g.log.Error("RPC call MessageHasBeenUpdated to plugin failed.", mlog.Err(err))
}
}
}
func (s *hooksRPCServer) MessageHasBeenUpdated(args *Z_MessageHasBeenUpdatedArgs, returns *Z_MessageHasBeenUpdatedReturns) error {
if hook, ok := s.impl.(interface {
MessageHasBeenUpdated(c *Context, newPost, oldPost *model.Post)
}); ok {
hook.MessageHasBeenUpdated(args.A, args.B, args.C)
} else {
return encodableError(fmt.Errorf("Hook MessageHasBeenUpdated called but not implemented."))
}
return nil
}
func init() {
hookNameToId["ChannelHasBeenCreated"] = ChannelHasBeenCreatedId
}
type Z_ChannelHasBeenCreatedArgs struct {
A *Context
B *model.Channel
}
type Z_ChannelHasBeenCreatedReturns struct {
}
func (g *hooksRPCClient) ChannelHasBeenCreated(c *Context, channel *model.Channel) {
_args := &Z_ChannelHasBeenCreatedArgs{c, channel}
_returns := &Z_ChannelHasBeenCreatedReturns{}
if g.implemented[ChannelHasBeenCreatedId] {
if err := g.client.Call("Plugin.ChannelHasBeenCreated", _args, _returns); err != nil {
g.log.Error("RPC call ChannelHasBeenCreated to plugin failed.", mlog.Err(err))
}
}
}
func (s *hooksRPCServer) ChannelHasBeenCreated(args *Z_ChannelHasBeenCreatedArgs, returns *Z_ChannelHasBeenCreatedReturns) error {
if hook, ok := s.impl.(interface {
ChannelHasBeenCreated(c *Context, channel *model.Channel)
}); ok {
hook.ChannelHasBeenCreated(args.A, args.B)
} else {
return encodableError(fmt.Errorf("Hook ChannelHasBeenCreated called but not implemented."))
}
return nil
}
func init() {
hookNameToId["UserHasJoinedChannel"] = UserHasJoinedChannelId
}
type Z_UserHasJoinedChannelArgs struct {
A *Context
B *model.ChannelMember
C *model.User
}
type Z_UserHasJoinedChannelReturns struct {
}
func (g *hooksRPCClient) UserHasJoinedChannel(c *Context, channelMember *model.ChannelMember, actor *model.User) {
_args := &Z_UserHasJoinedChannelArgs{c, channelMember, actor}
_returns := &Z_UserHasJoinedChannelReturns{}
if g.implemented[UserHasJoinedChannelId] {
if err := g.client.Call("Plugin.UserHasJoinedChannel", _args, _returns); err != nil {
g.log.Error("RPC call UserHasJoinedChannel to plugin failed.", mlog.Err(err))
}
}
}
func (s *hooksRPCServer) UserHasJoinedChannel(args *Z_UserHasJoinedChannelArgs, returns *Z_UserHasJoinedChannelReturns) error {
if hook, ok := s.impl.(interface {
UserHasJoinedChannel(c *Context, channelMember *model.ChannelMember, actor *model.User)
}); ok {
hook.UserHasJoinedChannel(args.A, args.B, args.C)
} else {
return encodableError(fmt.Errorf("Hook UserHasJoinedChannel called but not implemented."))
}
return nil
}
func init() {
hookNameToId["UserHasLeftChannel"] = UserHasLeftChannelId
}
type Z_UserHasLeftChannelArgs struct {
A *Context
B *model.ChannelMember
C *model.User
}
type Z_UserHasLeftChannelReturns struct {
}
func (g *hooksRPCClient) UserHasLeftChannel(c *Context, channelMember *model.ChannelMember, actor *model.User) {
_args := &Z_UserHasLeftChannelArgs{c, channelMember, actor}
_returns := &Z_UserHasLeftChannelReturns{}
if g.implemented[UserHasLeftChannelId] {
if err := g.client.Call("Plugin.UserHasLeftChannel", _args, _returns); err != nil {
g.log.Error("RPC call UserHasLeftChannel to plugin failed.", mlog.Err(err))
}
}
}
func (s *hooksRPCServer) UserHasLeftChannel(args *Z_UserHasLeftChannelArgs, returns *Z_UserHasLeftChannelReturns) error {
if hook, ok := s.impl.(interface {
UserHasLeftChannel(c *Context, channelMember *model.ChannelMember, actor *model.User)
}); ok {
hook.UserHasLeftChannel(args.A, args.B, args.C)
} else {
return encodableError(fmt.Errorf("Hook UserHasLeftChannel called but not implemented."))
}
return nil
}
func init() {
hookNameToId["UserHasJoinedTeam"] = UserHasJoinedTeamId
}
type Z_UserHasJoinedTeamArgs struct {
A *Context
B *model.TeamMember
C *model.User
}
type Z_UserHasJoinedTeamReturns struct {
}
func (g *hooksRPCClient) UserHasJoinedTeam(c *Context, teamMember *model.TeamMember, actor *model.User) {
_args := &Z_UserHasJoinedTeamArgs{c, teamMember, actor}
_returns := &Z_UserHasJoinedTeamReturns{}
if g.implemented[UserHasJoinedTeamId] {
if err := g.client.Call("Plugin.UserHasJoinedTeam", _args, _returns); err != nil {
g.log.Error("RPC call UserHasJoinedTeam to plugin failed.", mlog.Err(err))
}
}
}
func (s *hooksRPCServer) UserHasJoinedTeam(args *Z_UserHasJoinedTeamArgs, returns *Z_UserHasJoinedTeamReturns) error {
if hook, ok := s.impl.(interface {
UserHasJoinedTeam(c *Context, teamMember *model.TeamMember, actor *model.User)
}); ok {
hook.UserHasJoinedTeam(args.A, args.B, args.C)
} else {
return encodableError(fmt.Errorf("Hook UserHasJoinedTeam called but not implemented."))
}
return nil
}
func init() {
hookNameToId["UserHasLeftTeam"] = UserHasLeftTeamId
}
type Z_UserHasLeftTeamArgs struct {
A *Context
B *model.TeamMember
C *model.User
}
type Z_UserHasLeftTeamReturns struct {
}
func (g *hooksRPCClient) UserHasLeftTeam(c *Context, teamMember *model.TeamMember, actor *model.User) {
_args := &Z_UserHasLeftTeamArgs{c, teamMember, actor}
_returns := &Z_UserHasLeftTeamReturns{}
if g.implemented[UserHasLeftTeamId] {
if err := g.client.Call("Plugin.UserHasLeftTeam", _args, _returns); err != nil {
g.log.Error("RPC call UserHasLeftTeam to plugin failed.", mlog.Err(err))
}
}
}
func (s *hooksRPCServer) UserHasLeftTeam(args *Z_UserHasLeftTeamArgs, returns *Z_UserHasLeftTeamReturns) error {
if hook, ok := s.impl.(interface {
UserHasLeftTeam(c *Context, teamMember *model.TeamMember, actor *model.User)
}); ok {
hook.UserHasLeftTeam(args.A, args.B, args.C)
} else {
return encodableError(fmt.Errorf("Hook UserHasLeftTeam called but not implemented."))
}
return nil
}
func init() {
hookNameToId["UserWillLogIn"] = UserWillLogInId
}
type Z_UserWillLogInArgs struct {
A *Context
B *model.User
}
type Z_UserWillLogInReturns struct {
A string
}
func (g *hooksRPCClient) UserWillLogIn(c *Context, user *model.User) string {
_args := &Z_UserWillLogInArgs{c, user}
_returns := &Z_UserWillLogInReturns{}
if g.implemented[UserWillLogInId] {
if err := g.client.Call("Plugin.UserWillLogIn", _args, _returns); err != nil {
g.log.Error("RPC call UserWillLogIn to plugin failed.", mlog.Err(err))
}
}
return _returns.A
}
func (s *hooksRPCServer) UserWillLogIn(args *Z_UserWillLogInArgs, returns *Z_UserWillLogInReturns) error {
if hook, ok := s.impl.(interface {
UserWillLogIn(c *Context, user *model.User) string
}); ok {
returns.A = hook.UserWillLogIn(args.A, args.B)
} else {
return encodableError(fmt.Errorf("Hook UserWillLogIn called but not implemented."))
}
return nil
}
func init() {
hookNameToId["UserHasLoggedIn"] = UserHasLoggedInId
}
type Z_UserHasLoggedInArgs struct {
A *Context
B *model.User
}
type Z_UserHasLoggedInReturns struct {
}
func (g *hooksRPCClient) UserHasLoggedIn(c *Context, user *model.User) {
_args := &Z_UserHasLoggedInArgs{c, user}
_returns := &Z_UserHasLoggedInReturns{}
if g.implemented[UserHasLoggedInId] {
if err := g.client.Call("Plugin.UserHasLoggedIn", _args, _returns); err != nil {
g.log.Error("RPC call UserHasLoggedIn to plugin failed.", mlog.Err(err))
}
}
}
func (s *hooksRPCServer) UserHasLoggedIn(args *Z_UserHasLoggedInArgs, returns *Z_UserHasLoggedInReturns) error {
if hook, ok := s.impl.(interface {
UserHasLoggedIn(c *Context, user *model.User)
}); ok {
hook.UserHasLoggedIn(args.A, args.B)
} else {
return encodableError(fmt.Errorf("Hook UserHasLoggedIn called but not implemented."))
}
return nil
}
type Z_RegisterCommandArgs struct {
A *model.Command
}
type Z_RegisterCommandReturns struct {
A error
}
func (g *apiRPCClient) RegisterCommand(command *model.Command) error {
_args := &Z_RegisterCommandArgs{command}
_returns := &Z_RegisterCommandReturns{}
if err := g.client.Call("Plugin.RegisterCommand", _args, _returns); err != nil {
log.Printf("RPC call to RegisterCommand API failed: %s", err.Error())
}
return _returns.A
}
func (s *apiRPCServer) RegisterCommand(args *Z_RegisterCommandArgs, returns *Z_RegisterCommandReturns) error {
if hook, ok := s.impl.(interface {
RegisterCommand(command *model.Command) error
}); ok {
returns.A = hook.RegisterCommand(args.A)
} else {
return encodableError(fmt.Errorf("API RegisterCommand called but not implemented."))
}
return nil
}
type Z_UnregisterCommandArgs struct {
A string
B string
}
type Z_UnregisterCommandReturns struct {
A error
}
func (g *apiRPCClient) UnregisterCommand(teamId, trigger string) error {
_args := &Z_UnregisterCommandArgs{teamId, trigger}
_returns := &Z_UnregisterCommandReturns{}
if err := g.client.Call("Plugin.UnregisterCommand", _args, _returns); err != nil {
log.Printf("RPC call to UnregisterCommand API failed: %s", err.Error())
}
return _returns.A
}
func (s *apiRPCServer) UnregisterCommand(args *Z_UnregisterCommandArgs, returns *Z_UnregisterCommandReturns) error {
if hook, ok := s.impl.(interface {
UnregisterCommand(teamId, trigger string) error
}); ok {
returns.A = hook.UnregisterCommand(args.A, args.B)
} else {
return encodableError(fmt.Errorf("API UnregisterCommand called but not implemented."))
}
return nil
}
type Z_GetSessionArgs struct {
A string
}
type Z_GetSessionReturns struct {
A *model.Session
B *model.AppError
}
func (g *apiRPCClient) GetSession(sessionId string) (*model.Session, *model.AppError) {
_args := &Z_GetSessionArgs{sessionId}
_returns := &Z_GetSessionReturns{}
if err := g.client.Call("Plugin.GetSession", _args, _returns); err != nil {
log.Printf("RPC call to GetSession API failed: %s", err.Error())
}
return _returns.A, _returns.B
}
func (s *apiRPCServer) GetSession(args *Z_GetSessionArgs, returns *Z_GetSessionReturns) error {
if hook, ok := s.impl.(interface {
GetSession(sessionId string) (*model.Session, *model.AppError)
}); ok {
returns.A, returns.B = hook.GetSession(args.A)
} else {
return encodableError(fmt.Errorf("API GetSession called but not implemented."))
}
return nil
}
type Z_GetConfigArgs struct {
}
type Z_GetConfigReturns struct {
A *model.Config
}
func (g *apiRPCClient) GetConfig() *model.Config {
_args := &Z_GetConfigArgs{}
_returns := &Z_GetConfigReturns{}
if err := g.client.Call("Plugin.GetConfig", _args, _returns); err != nil {
log.Printf("RPC call to GetConfig API failed: %s", err.Error())
}
return _returns.A
}
func (s *apiRPCServer) GetConfig(args *Z_GetConfigArgs, returns *Z_GetConfigReturns) error {
if hook, ok := s.impl.(interface {
GetConfig() *model.Config
}); ok {
returns.A = hook.GetConfig()
} else {
return encodableError(fmt.Errorf("API GetConfig called but not implemented."))
}
return nil
}
type Z_SaveConfigArgs struct {
A *model.Config
}
type Z_SaveConfigReturns struct {
A *model.AppError
}
func (g *apiRPCClient) SaveConfig(config *model.Config) *model.AppError {
_args := &Z_SaveConfigArgs{config}
_returns := &Z_SaveConfigReturns{}
if err := g.client.Call("Plugin.SaveConfig", _args, _returns); err != nil {
log.Printf("RPC call to SaveConfig API failed: %s", err.Error())
}
return _returns.A
}
func (s *apiRPCServer) SaveConfig(args *Z_SaveConfigArgs, returns *Z_SaveConfigReturns) error {
if hook, ok := s.impl.(interface {
SaveConfig(config *model.Config) *model.AppError
}); ok {
returns.A = hook.SaveConfig(args.A)
} else {
return encodableError(fmt.Errorf("API SaveConfig called but not implemented."))
}
return nil
}
type Z_GetPluginConfigArgs struct {
}
type Z_GetPluginConfigReturns struct {
A map[string]interface{}
}
func (g *apiRPCClient) GetPluginConfig() map[string]interface{} {
_args := &Z_GetPluginConfigArgs{}
_returns := &Z_GetPluginConfigReturns{}
if err := g.client.Call("Plugin.GetPluginConfig", _args, _returns); err != nil {
log.Printf("RPC call to GetPluginConfig API failed: %s", err.Error())
}
return _returns.A
}
func (s *apiRPCServer) GetPluginConfig(args *Z_GetPluginConfigArgs, returns *Z_GetPluginConfigReturns) error {
if hook, ok := s.impl.(interface {
GetPluginConfig() map[string]interface{}
}); ok {
returns.A = hook.GetPluginConfig()
} else {
return encodableError(fmt.Errorf("API GetPluginConfig called but not implemented."))
}
return nil
}
type Z_SavePluginConfigArgs struct {
A map[string]interface{}
}
type Z_SavePluginConfigReturns struct {
A *model.AppError
}
func (g *apiRPCClient) SavePluginConfig(config map[string]interface{}) *model.AppError {
_args := &Z_SavePluginConfigArgs{config}
_returns := &Z_SavePluginConfigReturns{}
if err := g.client.Call("Plugin.SavePluginConfig", _args, _returns); err != nil {
log.Printf("RPC call to SavePluginConfig API failed: %s", err.Error())
}
return _returns.A
}
func (s *apiRPCServer) SavePluginConfig(args *Z_SavePluginConfigArgs, returns *Z_SavePluginConfigReturns) error {
if hook, ok := s.impl.(interface {
SavePluginConfig(config map[string]interface{}) *model.AppError
}); ok {
returns.A = hook.SavePluginConfig(args.A)
} else {
return encodableError(fmt.Errorf("API SavePluginConfig called but not implemented."))
}
return nil
}
type Z_GetServerVersionArgs struct {
}
type Z_GetServerVersionReturns struct {
A string
}
func (g *apiRPCClient) GetServerVersion() string {
_args := &Z_GetServerVersionArgs{}
_returns := &Z_GetServerVersionReturns{}
if err := g.client.Call("Plugin.GetServerVersion", _args, _returns); err != nil {
log.Printf("RPC call to GetServerVersion API failed: %s", err.Error())
}
return _returns.A
}
func (s *apiRPCServer) GetServerVersion(args *Z_GetServerVersionArgs, returns *Z_GetServerVersionReturns) error {
if hook, ok := s.impl.(interface {
GetServerVersion() string
}); ok {
returns.A = hook.GetServerVersion()
} else {
return encodableError(fmt.Errorf("API GetServerVersion called but not implemented."))
}
return nil
}
type Z_CreateUserArgs struct {
A *model.User
}
type Z_CreateUserReturns struct {
A *model.User
B *model.AppError
}
func (g *apiRPCClient) CreateUser(user *model.User) (*model.User, *model.AppError) {
_args := &Z_CreateUserArgs{user}
_returns := &Z_CreateUserReturns{}
if err := g.client.Call("Plugin.CreateUser", _args, _returns); err != nil {
log.Printf("RPC call to CreateUser API failed: %s", err.Error())
}
return _returns.A, _returns.B
}
func (s *apiRPCServer) CreateUser(args *Z_CreateUserArgs, returns *Z_CreateUserReturns) error {
if hook, ok := s.impl.(interface {
CreateUser(user *model.User) (*model.User, *model.AppError)
}); ok {
returns.A, returns.B = hook.CreateUser(args.A)
} else {
return encodableError(fmt.Errorf("API CreateUser called but not implemented."))
}
return nil
}
type Z_DeleteUserArgs struct {
A string
}
type Z_DeleteUserReturns struct {
A *model.AppError
}
func (g *apiRPCClient) DeleteUser(userId string) *model.AppError {
_args := &Z_DeleteUserArgs{userId}
_returns := &Z_DeleteUserReturns{}
if err := g.client.Call("Plugin.DeleteUser", _args, _returns); err != nil {
log.Printf("RPC call to DeleteUser API failed: %s", err.Error())
}
return _returns.A
}
func (s *apiRPCServer) DeleteUser(args *Z_DeleteUserArgs, returns *Z_DeleteUserReturns) error {
if hook, ok := s.impl.(interface {
DeleteUser(userId string) *model.AppError
}); ok {
returns.A = hook.DeleteUser(args.A)
} else {
return encodableError(fmt.Errorf("API DeleteUser called but not implemented."))
}
return nil
}
type Z_GetUserArgs struct {
A string
}
type Z_GetUserReturns struct {
A *model.User
B *model.AppError
}
func (g *apiRPCClient) GetUser(userId string) (*model.User, *model.AppError) {
_args := &Z_GetUserArgs{userId}
_returns := &Z_GetUserReturns{}
if err := g.client.Call("Plugin.GetUser", _args, _returns); err != nil {
log.Printf("RPC call to GetUser API failed: %s", err.Error())
}
return _returns.A, _returns.B
}
func (s *apiRPCServer) GetUser(args *Z_GetUserArgs, returns *Z_GetUserReturns) error {
if hook, ok := s.impl.(interface {
GetUser(userId string) (*model.User, *model.AppError)
}); ok {
returns.A, returns.B = hook.GetUser(args.A)
} else {
return encodableError(fmt.Errorf("API GetUser called but not implemented."))
}
return nil
}
type Z_GetUserByEmailArgs struct {
A string
}
type Z_GetUserByEmailReturns struct {
A *model.User
B *model.AppError
}
func (g *apiRPCClient) GetUserByEmail(email string) (*model.User, *model.AppError) {
_args := &Z_GetUserByEmailArgs{email}
_returns := &Z_GetUserByEmailReturns{}
if err := g.client.Call("Plugin.GetUserByEmail", _args, _returns); err != nil {
log.Printf("RPC call to GetUserByEmail API failed: %s", err.Error())
}
return _returns.A, _returns.B
}
func (s *apiRPCServer) GetUserByEmail(args *Z_GetUserByEmailArgs, returns *Z_GetUserByEmailReturns) error {
if hook, ok := s.impl.(interface {
GetUserByEmail(email string) (*model.User, *model.AppError)
}); ok {
returns.A, returns.B = hook.GetUserByEmail(args.A)
} else {
return encodableError(fmt.Errorf("API GetUserByEmail called but not implemented."))
}
return nil
}
type Z_GetUserByUsernameArgs struct {
A string
}
type Z_GetUserByUsernameReturns struct {
A *model.User
B *model.AppError
}
func (g *apiRPCClient) GetUserByUsername(name string) (*model.User, *model.AppError) {
_args := &Z_GetUserByUsernameArgs{name}
_returns := &Z_GetUserByUsernameReturns{}
if err := g.client.Call("Plugin.GetUserByUsername", _args, _returns); err != nil {
log.Printf("RPC call to GetUserByUsername API failed: %s", err.Error())
}
return _returns.A, _returns.B
}
func (s *apiRPCServer) GetUserByUsername(args *Z_GetUserByUsernameArgs, returns *Z_GetUserByUsernameReturns) error {
if hook, ok := s.impl.(interface {
GetUserByUsername(name string) (*model.User, *model.AppError)
}); ok {
returns.A, returns.B = hook.GetUserByUsername(args.A)
} else {
return encodableError(fmt.Errorf("API GetUserByUsername called but not implemented."))
}
return nil
}
type Z_GetUsersByUsernamesArgs struct {
A []string
}
type Z_GetUsersByUsernamesReturns struct {
A []*model.User
B *model.AppError
}
func (g *apiRPCClient) GetUsersByUsernames(usernames []string) ([]*model.User, *model.AppError) {
_args := &Z_GetUsersByUsernamesArgs{usernames}
_returns := &Z_GetUsersByUsernamesReturns{}
if err := g.client.Call("Plugin.GetUsersByUsernames", _args, _returns); err != nil {
log.Printf("RPC call to GetUsersByUsernames API failed: %s", err.Error())
}
return _returns.A, _returns.B
}
func (s *apiRPCServer) GetUsersByUsernames(args *Z_GetUsersByUsernamesArgs, returns *Z_GetUsersByUsernamesReturns) error {
if hook, ok := s.impl.(interface {
GetUsersByUsernames(usernames []string) ([]*model.User, *model.AppError)
}); ok {
returns.A, returns.B = hook.GetUsersByUsernames(args.A)
} else {
return encodableError(fmt.Errorf("API GetUsersByUsernames called but not implemented."))
}
return nil
}
type Z_GetUsersInTeamArgs struct {
A string
B int
C int
}
type Z_GetUsersInTeamReturns struct {
A []*model.User
B *model.AppError
}
func (g *apiRPCClient) GetUsersInTeam(teamId string, page int, perPage int) ([]*model.User, *model.AppError) {
_args := &Z_GetUsersInTeamArgs{teamId, page, perPage}
_returns := &Z_GetUsersInTeamReturns{}
if err := g.client.Call("Plugin.GetUsersInTeam", _args, _returns); err != nil {
log.Printf("RPC call to GetUsersInTeam API failed: %s", err.Error())
}
return _returns.A, _returns.B
}
func (s *apiRPCServer) GetUsersInTeam(args *Z_GetUsersInTeamArgs, returns *Z_GetUsersInTeamReturns) error {
if hook, ok := s.impl.(interface {
GetUsersInTeam(teamId string, page int, perPage int) ([]*model.User, *model.AppError)
}); ok {
returns.A, returns.B = hook.GetUsersInTeam(args.A, args.B, args.C)
} else {
return encodableError(fmt.Errorf("API GetUsersInTeam called but not implemented."))
}
return nil
}
type Z_GetTeamIconArgs struct {
A string
}
type Z_GetTeamIconReturns struct {
A []byte
B *model.AppError
}
func (g *apiRPCClient) GetTeamIcon(teamId string) ([]byte, *model.AppError) {
_args := &Z_GetTeamIconArgs{teamId}
_returns := &Z_GetTeamIconReturns{}
if err := g.client.Call("Plugin.GetTeamIcon", _args, _returns); err != nil {
log.Printf("RPC call to GetTeamIcon API failed: %s", err.Error())
}
return _returns.A, _returns.B
}
func (s *apiRPCServer) GetTeamIcon(args *Z_GetTeamIconArgs, returns *Z_GetTeamIconReturns) error {
if hook, ok := s.impl.(interface {
GetTeamIcon(teamId string) ([]byte, *model.AppError)
}); ok {
returns.A, returns.B = hook.GetTeamIcon(args.A)
} else {
return encodableError(fmt.Errorf("API GetTeamIcon called but not implemented."))
}
return nil
}
type Z_SetTeamIconArgs struct {
A string
B []byte
}
type Z_SetTeamIconReturns struct {
A *model.AppError
}
func (g *apiRPCClient) SetTeamIcon(teamId string, data []byte) *model.AppError {
_args := &Z_SetTeamIconArgs{teamId, data}
_returns := &Z_SetTeamIconReturns{}
if err := g.client.Call("Plugin.SetTeamIcon", _args, _returns); err != nil {
log.Printf("RPC call to SetTeamIcon API failed: %s", err.Error())
}
return _returns.A
}
func (s *apiRPCServer) SetTeamIcon(args *Z_SetTeamIconArgs, returns *Z_SetTeamIconReturns) error {
if hook, ok := s.impl.(interface {
SetTeamIcon(teamId string, data []byte) *model.AppError
}); ok {
returns.A = hook.SetTeamIcon(args.A, args.B)
} else {
return encodableError(fmt.Errorf("API SetTeamIcon called but not implemented."))
}
return nil