From 9c76d9ba0031ee4175db6960024d61c23cc98659 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Wed, 29 Aug 2018 14:07:27 -0400 Subject: Add GetLDAPUserAttributes method to the plugin API (#9326) --- plugin/client_rpc_generated.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'plugin/client_rpc_generated.go') diff --git a/plugin/client_rpc_generated.go b/plugin/client_rpc_generated.go index ab41c66d9..d0d576f8d 100644 --- a/plugin/client_rpc_generated.go +++ b/plugin/client_rpc_generated.go @@ -903,6 +903,36 @@ func (s *apiRPCServer) UpdateUserStatus(args *Z_UpdateUserStatusArgs, returns *Z return nil } +type Z_GetLDAPUserAttributesArgs struct { + A string + B []string +} + +type Z_GetLDAPUserAttributesReturns struct { + A map[string]string + B *model.AppError +} + +func (g *apiRPCClient) GetLDAPUserAttributes(userId string, attributes []string) (map[string]string, *model.AppError) { + _args := &Z_GetLDAPUserAttributesArgs{userId, attributes} + _returns := &Z_GetLDAPUserAttributesReturns{} + if err := g.client.Call("Plugin.GetLDAPUserAttributes", _args, _returns); err != nil { + log.Printf("RPC call to GetLDAPUserAttributes API failed: %s", err.Error()) + } + return _returns.A, _returns.B +} + +func (s *apiRPCServer) GetLDAPUserAttributes(args *Z_GetLDAPUserAttributesArgs, returns *Z_GetLDAPUserAttributesReturns) error { + if hook, ok := s.impl.(interface { + GetLDAPUserAttributes(userId string, attributes []string) (map[string]string, *model.AppError) + }); ok { + returns.A, returns.B = hook.GetLDAPUserAttributes(args.A, args.B) + } else { + return fmt.Errorf("API GetLDAPUserAttributes called but not implemented.") + } + return nil +} + type Z_CreateTeamArgs struct { A *model.Team } -- cgit v1.2.3-1-g7c22