summaryrefslogtreecommitdiffstats
path: root/plugin/client_rpc_generated.go
diff options
context:
space:
mode:
authorDaniel Hodan <daniel.hodan@czertbytes.de>2018-10-17 16:37:52 +0200
committerJesse Hallam <jesse.hallam@gmail.com>2018-10-17 10:37:52 -0400
commite8c9ccaa7e47f1cba3d2b126f6ebbb092fa43235 (patch)
tree4c82fde308452da5f591eec5dc6d076fae7c5756 /plugin/client_rpc_generated.go
parent722675983107d0a8d5004bc1e076962786d603f0 (diff)
downloadchat-e8c9ccaa7e47f1cba3d2b126f6ebbb092fa43235.tar.gz
chat-e8c9ccaa7e47f1cba3d2b126f6ebbb092fa43235.tar.bz2
chat-e8c9ccaa7e47f1cba3d2b126f6ebbb092fa43235.zip
GH-9607: Add GetTeamsForUser to plugin API (#9644)
* add GetTeamsForUser to plugin api * Add version comment, fix comment typo
Diffstat (limited to 'plugin/client_rpc_generated.go')
-rw-r--r--plugin/client_rpc_generated.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/plugin/client_rpc_generated.go b/plugin/client_rpc_generated.go
index b53f10aff..5c14f4d4a 100644
--- a/plugin/client_rpc_generated.go
+++ b/plugin/client_rpc_generated.go
@@ -1177,6 +1177,35 @@ func (s *apiRPCServer) UpdateTeam(args *Z_UpdateTeamArgs, returns *Z_UpdateTeamR
return nil
}
+type Z_GetTeamsForUserArgs struct {
+ A string
+}
+
+type Z_GetTeamsForUserReturns struct {
+ A []*model.Team
+ B *model.AppError
+}
+
+func (g *apiRPCClient) GetTeamsForUser(userId string) ([]*model.Team, *model.AppError) {
+ _args := &Z_GetTeamsForUserArgs{userId}
+ _returns := &Z_GetTeamsForUserReturns{}
+ if err := g.client.Call("Plugin.GetTeamsForUser", _args, _returns); err != nil {
+ log.Printf("RPC call to GetTeamsForUser API failed: %s", err.Error())
+ }
+ return _returns.A, _returns.B
+}
+
+func (s *apiRPCServer) GetTeamsForUser(args *Z_GetTeamsForUserArgs, returns *Z_GetTeamsForUserReturns) error {
+ if hook, ok := s.impl.(interface {
+ GetTeamsForUser(userId string) ([]*model.Team, *model.AppError)
+ }); ok {
+ returns.A, returns.B = hook.GetTeamsForUser(args.A)
+ } else {
+ return encodableError(fmt.Errorf("API GetTeamsForUser called but not implemented."))
+ }
+ return nil
+}
+
type Z_CreateTeamMemberArgs struct {
A string
B string