client_rpc_generated.go 68.7 KB
Newer Older
1 2 3 4 5 6 7 8 9
// 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 (
10
	"fmt"
11
	"log"
12

13 14 15 16 17
	"github.com/mattermost/mattermost-server/mlog"
	"github.com/mattermost/mattermost-server/model"
)

func init() {
18
	hookNameToId["OnDeactivate"] = OnDeactivateId
19 20
}

21
type Z_OnDeactivateArgs struct {
22 23
}

24
type Z_OnDeactivateReturns struct {
25 26 27
	A error
}

28 29 30
func (g *hooksRPCClient) OnDeactivate() error {
	_args := &Z_OnDeactivateArgs{}
	_returns := &Z_OnDeactivateReturns{}
31 32 33 34 35 36 37 38
	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
}

39
func (s *hooksRPCServer) OnDeactivate(args *Z_OnDeactivateArgs, returns *Z_OnDeactivateReturns) error {
40 41 42 43
	if hook, ok := s.impl.(interface {
		OnDeactivate() error
	}); ok {
		returns.A = hook.OnDeactivate()
44
		returns.A = encodableError(returns.A)
45
	} else {
46
		return encodableError(fmt.Errorf("Hook OnDeactivate called but not implemented."))
47 48 49 50 51
	}
	return nil
}

func init() {
52
	hookNameToId["OnConfigurationChange"] = OnConfigurationChangeId
53 54
}

55
type Z_OnConfigurationChangeArgs struct {
56 57
}

58
type Z_OnConfigurationChangeReturns struct {
59 60 61
	A error
}

62 63 64
func (g *hooksRPCClient) OnConfigurationChange() error {
	_args := &Z_OnConfigurationChangeArgs{}
	_returns := &Z_OnConfigurationChangeReturns{}
65 66 67 68 69 70 71 72
	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
}

73
func (s *hooksRPCServer) OnConfigurationChange(args *Z_OnConfigurationChangeArgs, returns *Z_OnConfigurationChangeReturns) error {
74 75 76 77
	if hook, ok := s.impl.(interface {
		OnConfigurationChange() error
	}); ok {
		returns.A = hook.OnConfigurationChange()
78
		returns.A = encodableError(returns.A)
79
	} else {
80
		return encodableError(fmt.Errorf("Hook OnConfigurationChange called but not implemented."))
81 82 83 84 85
	}
	return nil
}

func init() {
86
	hookNameToId["ExecuteCommand"] = ExecuteCommandId
87 88
}

89
type Z_ExecuteCommandArgs struct {
90 91
	A *Context
	B *model.CommandArgs
92 93
}

94
type Z_ExecuteCommandReturns struct {
95 96 97 98
	A *model.CommandResponse
	B *model.AppError
}

99 100 101
func (g *hooksRPCClient) ExecuteCommand(c *Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError) {
	_args := &Z_ExecuteCommandArgs{c, args}
	_returns := &Z_ExecuteCommandReturns{}
102 103 104 105 106 107 108 109
	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
}

110
func (s *hooksRPCServer) ExecuteCommand(args *Z_ExecuteCommandArgs, returns *Z_ExecuteCommandReturns) error {
111
	if hook, ok := s.impl.(interface {
112
		ExecuteCommand(c *Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError)
113
	}); ok {
114
		returns.A, returns.B = hook.ExecuteCommand(args.A, args.B)
115

116
	} else {
117
		return encodableError(fmt.Errorf("Hook ExecuteCommand called but not implemented."))
118 119 120 121 122
	}
	return nil
}

func init() {
123
	hookNameToId["MessageWillBePosted"] = MessageWillBePostedId
124 125
}

126
type Z_MessageWillBePostedArgs struct {
127 128
	A *Context
	B *model.Post
129 130
}

131
type Z_MessageWillBePostedReturns struct {
132 133 134 135
	A *model.Post
	B string
}

136 137 138
func (g *hooksRPCClient) MessageWillBePosted(c *Context, post *model.Post) (*model.Post, string) {
	_args := &Z_MessageWillBePostedArgs{c, post}
	_returns := &Z_MessageWillBePostedReturns{}
139 140 141 142 143 144 145 146
	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
}

147
func (s *hooksRPCServer) MessageWillBePosted(args *Z_MessageWillBePostedArgs, returns *Z_MessageWillBePostedReturns) error {
148
	if hook, ok := s.impl.(interface {
149
		MessageWillBePosted(c *Context, post *model.Post) (*model.Post, string)
150
	}); ok {
151
		returns.A, returns.B = hook.MessageWillBePosted(args.A, args.B)
152

153
	} else {
154
		return encodableError(fmt.Errorf("Hook MessageWillBePosted called but not implemented."))
155 156 157 158 159
	}
	return nil
}

func init() {
160
	hookNameToId["MessageWillBeUpdated"] = MessageWillBeUpdatedId
161 162
}

163
type Z_MessageWillBeUpdatedArgs struct {
164
	A *Context
165
	B *model.Post
166
	C *model.Post
167 168
}

169
type Z_MessageWillBeUpdatedReturns struct {
170 171 172 173
	A *model.Post
	B string
}

174 175 176
func (g *hooksRPCClient) MessageWillBeUpdated(c *Context, newPost, oldPost *model.Post) (*model.Post, string) {
	_args := &Z_MessageWillBeUpdatedArgs{c, newPost, oldPost}
	_returns := &Z_MessageWillBeUpdatedReturns{}
177 178 179 180 181 182 183 184
	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
}

185
func (s *hooksRPCServer) MessageWillBeUpdated(args *Z_MessageWillBeUpdatedArgs, returns *Z_MessageWillBeUpdatedReturns) error {
186
	if hook, ok := s.impl.(interface {
187
		MessageWillBeUpdated(c *Context, newPost, oldPost *model.Post) (*model.Post, string)
188
	}); ok {
189
		returns.A, returns.B = hook.MessageWillBeUpdated(args.A, args.B, args.C)
190

191
	} else {
192
		return encodableError(fmt.Errorf("Hook MessageWillBeUpdated called but not implemented."))
193 194 195 196 197
	}
	return nil
}

func init() {
198
	hookNameToId["MessageHasBeenPosted"] = MessageHasBeenPostedId
199 200
}

201
type Z_MessageHasBeenPostedArgs struct {
202 203
	A *Context
	B *model.Post
204 205
}

206
type Z_MessageHasBeenPostedReturns struct {
207 208
}

209 210 211
func (g *hooksRPCClient) MessageHasBeenPosted(c *Context, post *model.Post) {
	_args := &Z_MessageHasBeenPostedArgs{c, post}
	_returns := &Z_MessageHasBeenPostedReturns{}
212 213 214 215 216
	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))
		}
	}
217

218 219
}

220
func (s *hooksRPCServer) MessageHasBeenPosted(args *Z_MessageHasBeenPostedArgs, returns *Z_MessageHasBeenPostedReturns) error {
221
	if hook, ok := s.impl.(interface {
222
		MessageHasBeenPosted(c *Context, post *model.Post)
223
	}); ok {
224
		hook.MessageHasBeenPosted(args.A, args.B)
225

226
	} else {
227
		return encodableError(fmt.Errorf("Hook MessageHasBeenPosted called but not implemented."))
228 229 230 231 232
	}
	return nil
}

func init() {
233
	hookNameToId["MessageHasBeenUpdated"] = MessageHasBeenUpdatedId
234 235
}

236
type Z_MessageHasBeenUpdatedArgs struct {
237
	A *Context
238
	B *model.Post
239
	C *model.Post
240 241
}

242
type Z_MessageHasBeenUpdatedReturns struct {
243 244
}

245 246 247
func (g *hooksRPCClient) MessageHasBeenUpdated(c *Context, newPost, oldPost *model.Post) {
	_args := &Z_MessageHasBeenUpdatedArgs{c, newPost, oldPost}
	_returns := &Z_MessageHasBeenUpdatedReturns{}
248 249 250 251 252
	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))
		}
	}
253

254 255
}

256
func (s *hooksRPCServer) MessageHasBeenUpdated(args *Z_MessageHasBeenUpdatedArgs, returns *Z_MessageHasBeenUpdatedReturns) error {
257
	if hook, ok := s.impl.(interface {
258
		MessageHasBeenUpdated(c *Context, newPost, oldPost *model.Post)
259
	}); ok {
260
		hook.MessageHasBeenUpdated(args.A, args.B, args.C)
261

262
	} else {
263
		return encodableError(fmt.Errorf("Hook MessageHasBeenUpdated called but not implemented."))
264 265 266 267
	}
	return nil
}

268
func init() {
269
	hookNameToId["ChannelHasBeenCreated"] = ChannelHasBeenCreatedId
270 271
}

272
type Z_ChannelHasBeenCreatedArgs struct {
273 274 275 276
	A *Context
	B *model.Channel
}

277
type Z_ChannelHasBeenCreatedReturns struct {
278 279
}

280 281 282
func (g *hooksRPCClient) ChannelHasBeenCreated(c *Context, channel *model.Channel) {
	_args := &Z_ChannelHasBeenCreatedArgs{c, channel}
	_returns := &Z_ChannelHasBeenCreatedReturns{}
283 284 285 286 287
	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))
		}
	}
288

289 290
}

291
func (s *hooksRPCServer) ChannelHasBeenCreated(args *Z_ChannelHasBeenCreatedArgs, returns *Z_ChannelHasBeenCreatedReturns) error {
292 293 294 295
	if hook, ok := s.impl.(interface {
		ChannelHasBeenCreated(c *Context, channel *model.Channel)
	}); ok {
		hook.ChannelHasBeenCreated(args.A, args.B)
296

297
	} else {
298
		return encodableError(fmt.Errorf("Hook ChannelHasBeenCreated called but not implemented."))
299 300 301 302 303
	}
	return nil
}

func init() {
304
	hookNameToId["UserHasJoinedChannel"] = UserHasJoinedChannelId
305 306
}

307
type Z_UserHasJoinedChannelArgs struct {
308 309 310 311 312
	A *Context
	B *model.ChannelMember
	C *model.User
}

313
type Z_UserHasJoinedChannelReturns struct {
314 315
}

316 317 318
func (g *hooksRPCClient) UserHasJoinedChannel(c *Context, channelMember *model.ChannelMember, actor *model.User) {
	_args := &Z_UserHasJoinedChannelArgs{c, channelMember, actor}
	_returns := &Z_UserHasJoinedChannelReturns{}
319 320 321 322 323
	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))
		}
	}
324

325 326
}

327
func (s *hooksRPCServer) UserHasJoinedChannel(args *Z_UserHasJoinedChannelArgs, returns *Z_UserHasJoinedChannelReturns) error {
328 329 330 331
	if hook, ok := s.impl.(interface {
		UserHasJoinedChannel(c *Context, channelMember *model.ChannelMember, actor *model.User)
	}); ok {
		hook.UserHasJoinedChannel(args.A, args.B, args.C)
332

333
	} else {
334
		return encodableError(fmt.Errorf("Hook UserHasJoinedChannel called but not implemented."))
335 336 337 338 339
	}
	return nil
}

func init() {
340
	hookNameToId["UserHasLeftChannel"] = UserHasLeftChannelId
341 342
}

343
type Z_UserHasLeftChannelArgs struct {
344 345 346 347 348
	A *Context
	B *model.ChannelMember
	C *model.User
}

349
type Z_UserHasLeftChannelReturns struct {
350 351
}

352 353 354
func (g *hooksRPCClient) UserHasLeftChannel(c *Context, channelMember *model.ChannelMember, actor *model.User) {
	_args := &Z_UserHasLeftChannelArgs{c, channelMember, actor}
	_returns := &Z_UserHasLeftChannelReturns{}
355 356 357 358 359
	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))
		}
	}
360

361 362
}

363
func (s *hooksRPCServer) UserHasLeftChannel(args *Z_UserHasLeftChannelArgs, returns *Z_UserHasLeftChannelReturns) error {
364 365 366 367
	if hook, ok := s.impl.(interface {
		UserHasLeftChannel(c *Context, channelMember *model.ChannelMember, actor *model.User)
	}); ok {
		hook.UserHasLeftChannel(args.A, args.B, args.C)
368

369
	} else {
370
		return encodableError(fmt.Errorf("Hook UserHasLeftChannel called but not implemented."))
371 372 373 374 375
	}
	return nil
}

func init() {
376
	hookNameToId["UserHasJoinedTeam"] = UserHasJoinedTeamId
377 378
}

379
type Z_UserHasJoinedTeamArgs struct {
380 381 382 383 384
	A *Context
	B *model.TeamMember
	C *model.User
}

385
type Z_UserHasJoinedTeamReturns struct {
386 387
}

388 389 390
func (g *hooksRPCClient) UserHasJoinedTeam(c *Context, teamMember *model.TeamMember, actor *model.User) {
	_args := &Z_UserHasJoinedTeamArgs{c, teamMember, actor}
	_returns := &Z_UserHasJoinedTeamReturns{}
391 392 393 394 395
	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))
		}
	}
396

397 398
}

399
func (s *hooksRPCServer) UserHasJoinedTeam(args *Z_UserHasJoinedTeamArgs, returns *Z_UserHasJoinedTeamReturns) error {
400 401 402 403
	if hook, ok := s.impl.(interface {
		UserHasJoinedTeam(c *Context, teamMember *model.TeamMember, actor *model.User)
	}); ok {
		hook.UserHasJoinedTeam(args.A, args.B, args.C)
404

405
	} else {
406
		return encodableError(fmt.Errorf("Hook UserHasJoinedTeam called but not implemented."))
407 408 409 410 411
	}
	return nil
}

func init() {
412
	hookNameToId["UserHasLeftTeam"] = UserHasLeftTeamId
413 414
}

415
type Z_UserHasLeftTeamArgs struct {
416 417 418 419 420
	A *Context
	B *model.TeamMember
	C *model.User
}

421
type Z_UserHasLeftTeamReturns struct {
422 423
}

424 425 426
func (g *hooksRPCClient) UserHasLeftTeam(c *Context, teamMember *model.TeamMember, actor *model.User) {
	_args := &Z_UserHasLeftTeamArgs{c, teamMember, actor}
	_returns := &Z_UserHasLeftTeamReturns{}
427 428 429 430 431
	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))
		}
	}
432

433 434
}

435
func (s *hooksRPCServer) UserHasLeftTeam(args *Z_UserHasLeftTeamArgs, returns *Z_UserHasLeftTeamReturns) error {
436 437 438 439
	if hook, ok := s.impl.(interface {
		UserHasLeftTeam(c *Context, teamMember *model.TeamMember, actor *model.User)
	}); ok {
		hook.UserHasLeftTeam(args.A, args.B, args.C)
440

441
	} else {
442
		return encodableError(fmt.Errorf("Hook UserHasLeftTeam called but not implemented."))
443 444 445 446
	}
	return nil
}

Daniel Schalla's avatar
Daniel Schalla committed
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
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)
476

Daniel Schalla's avatar
Daniel Schalla committed
477
	} else {
478
		return encodableError(fmt.Errorf("Hook UserWillLogIn called but not implemented."))
Daniel Schalla's avatar
Daniel Schalla committed
479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502
	}
	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))
		}
	}
503

Daniel Schalla's avatar
Daniel Schalla committed
504 505 506 507 508 509 510
}

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)
511

Daniel Schalla's avatar
Daniel Schalla committed
512
	} else {
513
		return encodableError(fmt.Errorf("Hook UserHasLoggedIn called but not implemented."))
Daniel Schalla's avatar
Daniel Schalla committed
514 515 516 517
	}
	return nil
}

518
type Z_RegisterCommandArgs struct {
519 520 521
	A *model.Command
}

522
type Z_RegisterCommandReturns struct {
523 524 525
	A error
}

526 527 528
func (g *apiRPCClient) RegisterCommand(command *model.Command) error {
	_args := &Z_RegisterCommandArgs{command}
	_returns := &Z_RegisterCommandReturns{}
529
	if err := g.client.Call("Plugin.RegisterCommand", _args, _returns); err != nil {
530
		log.Printf("RPC call to RegisterCommand API failed: %s", err.Error())
531 532 533 534
	}
	return _returns.A
}

535
func (s *apiRPCServer) RegisterCommand(args *Z_RegisterCommandArgs, returns *Z_RegisterCommandReturns) error {
536 537 538 539
	if hook, ok := s.impl.(interface {
		RegisterCommand(command *model.Command) error
	}); ok {
		returns.A = hook.RegisterCommand(args.A)
540
	} else {
541
		return encodableError(fmt.Errorf("API RegisterCommand called but not implemented."))
542 543 544 545
	}
	return nil
}

546
type Z_UnregisterCommandArgs struct {
547 548 549 550
	A string
	B string
}

551
type Z_UnregisterCommandReturns struct {
552 553 554
	A error
}

555 556 557
func (g *apiRPCClient) UnregisterCommand(teamId, trigger string) error {
	_args := &Z_UnregisterCommandArgs{teamId, trigger}
	_returns := &Z_UnregisterCommandReturns{}
558
	if err := g.client.Call("Plugin.UnregisterCommand", _args, _returns); err != nil {
559
		log.Printf("RPC call to UnregisterCommand API failed: %s", err.Error())
560 561 562 563
	}
	return _returns.A
}

564
func (s *apiRPCServer) UnregisterCommand(args *Z_UnregisterCommandArgs, returns *Z_UnregisterCommandReturns) error {
565 566 567 568
	if hook, ok := s.impl.(interface {
		UnregisterCommand(teamId, trigger string) error
	}); ok {
		returns.A = hook.UnregisterCommand(args.A, args.B)
569
	} else {
570
		return encodableError(fmt.Errorf("API UnregisterCommand called but not implemented."))
571 572 573 574
	}
	return nil
}

575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598
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 {
599
		return encodableError(fmt.Errorf("API GetSession called but not implemented."))
600 601 602 603
	}
	return nil
}

604
type Z_GetConfigArgs struct {
605 606
}

607
type Z_GetConfigReturns struct {
608 609 610
	A *model.Config
}

611 612 613
func (g *apiRPCClient) GetConfig() *model.Config {
	_args := &Z_GetConfigArgs{}
	_returns := &Z_GetConfigReturns{}
614
	if err := g.client.Call("Plugin.GetConfig", _args, _returns); err != nil {
615
		log.Printf("RPC call to GetConfig API failed: %s", err.Error())
616 617 618 619
	}
	return _returns.A
}

620
func (s *apiRPCServer) GetConfig(args *Z_GetConfigArgs, returns *Z_GetConfigReturns) error {
621 622 623 624 625
	if hook, ok := s.impl.(interface {
		GetConfig() *model.Config
	}); ok {
		returns.A = hook.GetConfig()
	} else {
626
		return encodableError(fmt.Errorf("API GetConfig called but not implemented."))
627 628 629 630
	}
	return nil
}

631
type Z_SaveConfigArgs struct {
632 633 634
	A *model.Config
}

635
type Z_SaveConfigReturns struct {
636 637 638
	A *model.AppError
}

639 640 641
func (g *apiRPCClient) SaveConfig(config *model.Config) *model.AppError {
	_args := &Z_SaveConfigArgs{config}
	_returns := &Z_SaveConfigReturns{}
642
	if err := g.client.Call("Plugin.SaveConfig", _args, _returns); err != nil {
643
		log.Printf("RPC call to SaveConfig API failed: %s", err.Error())
644 645 646 647
	}
	return _returns.A
}

648
func (s *apiRPCServer) SaveConfig(args *Z_SaveConfigArgs, returns *Z_SaveConfigReturns) error {
649 650 651 652 653
	if hook, ok := s.impl.(interface {
		SaveConfig(config *model.Config) *model.AppError
	}); ok {
		returns.A = hook.SaveConfig(args.A)
	} else {
654
		return encodableError(fmt.Errorf("API SaveConfig called but not implemented."))
655 656 657 658
	}
	return nil
}

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
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
}

686
type Z_CreateUserArgs struct {
687 688 689
	A *model.User
}

690
type Z_CreateUserReturns struct {
691 692 693 694
	A *model.User
	B *model.AppError
}

695 696 697
func (g *apiRPCClient) CreateUser(user *model.User) (*model.User, *model.AppError) {
	_args := &Z_CreateUserArgs{user}
	_returns := &Z_CreateUserReturns{}
698
	if err := g.client.Call("Plugin.CreateUser", _args, _returns); err != nil {
699
		log.Printf("RPC call to CreateUser API failed: %s", err.Error())
700 701 702 703
	}
	return _returns.A, _returns.B
}

704
func (s *apiRPCServer) CreateUser(args *Z_CreateUserArgs, returns *Z_CreateUserReturns) error {
705 706 707 708
	if hook, ok := s.impl.(interface {
		CreateUser(user *model.User) (*model.User, *model.AppError)
	}); ok {
		returns.A, returns.B = hook.CreateUser(args.A)
709
	} else {
710
		return encodableError(fmt.Errorf("API CreateUser called but not implemented."))
711 712 713 714
	}
	return nil
}

715
type Z_DeleteUserArgs struct {
716 717 718
	A string
}

719
type Z_DeleteUserReturns struct {
720 721 722
	A *model.AppError
}

723 724 725
func (g *apiRPCClient) DeleteUser(userId string) *model.AppError {
	_args := &Z_DeleteUserArgs{userId}
	_returns := &Z_DeleteUserReturns{}
726
	if err := g.client.Call("Plugin.DeleteUser", _args, _returns); err != nil {
727
		log.Printf("RPC call to DeleteUser API failed: %s", err.Error())
728 729 730 731
	}
	return _returns.A
}

732
func (s *apiRPCServer) DeleteUser(args *Z_DeleteUserArgs, returns *Z_DeleteUserReturns) error {
733 734 735 736
	if hook, ok := s.impl.(interface {
		DeleteUser(userId string) *model.AppError
	}); ok {
		returns.A = hook.DeleteUser(args.A)
737
	} else {
738
		return encodableError(fmt.Errorf("API DeleteUser called but not implemented."))
739 740 741 742
	}
	return nil
}

743
type Z_GetUserArgs struct {
744 745 746
	A string
}

747
type Z_GetUserReturns struct {
748 749 750 751
	A *model.User
	B *model.AppError
}

752 753 754
func (g *apiRPCClient) GetUser(userId string) (*model.User, *model.AppError) {
	_args := &Z_GetUserArgs{userId}
	_returns := &Z_GetUserReturns{}
755
	if err := g.client.Call("Plugin.GetUser", _args, _returns); err != nil {
756
		log.Printf("RPC call to GetUser API failed: %s", err.Error())
757 758 759 760
	}
	return _returns.A, _returns.B
}

761
func (s *apiRPCServer) GetUser(args *Z_GetUserArgs, returns *Z_GetUserReturns) error {
762 763 764 765
	if hook, ok := s.impl.(interface {
		GetUser(userId string) (*model.User, *model.AppError)
	}); ok {
		returns.A, returns.B = hook.GetUser(args.A)
766
	} else {
767
		return encodableError(fmt.Errorf("API GetUser called but not implemented."))
768 769 770 771
	}
	return nil
}

772
type Z_GetUserByEmailArgs struct {
773 774 775
	A string
}

776
type Z_GetUserByEmailReturns struct {
777 778 779 780
	A *model.User
	B *model.AppError
}

781 782 783
func (g *apiRPCClient) GetUserByEmail(email string) (*model.User, *model.AppError) {
	_args := &Z_GetUserByEmailArgs{email}
	_returns := &Z_GetUserByEmailReturns{}
784
	if err := g.client.Call("Plugin.GetUserByEmail", _args, _returns); err != nil {
785
		log.Printf("RPC call to GetUserByEmail API failed: %s", err.Error())
786 787 788 789
	}
	return _returns.A, _returns.B
}

790
func (s *apiRPCServer) GetUserByEmail(args *Z_GetUserByEmailArgs, returns *Z_GetUserByEmailReturns) error {
791 792 793 794
	if hook, ok := s.impl.(interface {
		GetUserByEmail(email string) (*model.User, *model.AppError)
	}); ok {
		returns.A, returns.B = hook.GetUserByEmail(args.A)
795
	} else {
796
		return encodableError(fmt.Errorf("API GetUserByEmail called but not implemented."))
797 798 799 800
	}
	return nil
}

801
type Z_GetUserByUsernameArgs struct {
802 803 804
	A string
}

805
type Z_GetUserByUsernameReturns struct {
806 807 808 809
	A *model.User
	B *model.AppError
}

810 811 812
func (g *apiRPCClient) GetUserByUsername(name string) (*model.User, *model.AppError) {
	_args := &Z_GetUserByUsernameArgs{name}
	_returns := &Z_GetUserByUsernameReturns{}
813
	if err := g.client.Call("Plugin.GetUserByUsername", _args, _returns); err != nil {
814
		log.Printf("RPC call to GetUserByUsername API failed: %s", err.Error())
815 816 817 818
	}
	return _returns.A, _returns.B
}

819
func (s *apiRPCServer) GetUserByUsername(args *Z_GetUserByUsernameArgs, returns *Z_GetUserByUsernameReturns) error {
820 821 822 823
	if hook, ok := s.impl.(interface {
		GetUserByUsername(name string) (*model.User, *model.AppError)
	}); ok {
		returns.A, returns.B = hook.GetUserByUsername(args.A)
824
	} else {
825
		return encodableError(fmt.Errorf("API GetUserByUsername called but not implemented."))
826 827 828 829
	}
	return nil
}

830
type Z_UpdateUserArgs struct {
831 832 833
	A *model.User
}

834
type Z_UpdateUserReturns struct {
835 836 837 838
	A *model.User
	B *model.AppError
}

839 840 841
func (g *apiRPCClient) UpdateUser(user *model.User) (*model.User, *model.AppError) {
	_args := &Z_UpdateUserArgs{user}
	_returns := &Z_UpdateUserReturns{}
842
	if err := g.client.Call("Plugin.UpdateUser", _args, _returns); err != nil {
843
		log.Printf("RPC call to UpdateUser API failed: %s", err.Error())
844 845 846 847
	}
	return _returns.A, _returns.B
}

848
func (s *apiRPCServer) UpdateUser(args *Z_UpdateUserArgs, returns *Z_UpdateUserReturns) error {
849 850 851 852
	if hook, ok := s.impl.(interface {
		UpdateUser(user *model.User) (*model.User, *model.AppError)
	}); ok {
		returns.A, returns.B = hook.UpdateUser(args.A)
853
	} else {
854
		return encodableError(fmt.Errorf("API UpdateUser called but not implemented."))
855 856 857 858
	}
	return nil
}

859 860 861 862 863 864 865 866 867 868 869 870 871
type Z_GetUserStatusArgs struct {
	A string
}

type Z_GetUserStatusReturns struct {
	A *model.Status
	B *model.AppError
}

func (g *apiRPCClient) GetUserStatus(userId string) (*model.Status, *model.AppError) {
	_args := &Z_GetUserStatusArgs{userId}
	_returns := &Z_GetUserStatusReturns{}
	if err := g.client.Call("Plugin.GetUserStatus", _args, _returns); err != nil {
872
		log.Printf("RPC call to GetUserStatus API failed: %s", err.Error())