diff options
author | Joram Wilander <jwawilander@gmail.com> | 2018-08-29 14:07:27 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2018-08-29 11:07:27 -0700 |
commit | 9c76d9ba0031ee4175db6960024d61c23cc98659 (patch) | |
tree | 798c48c4064fcafe2401516436967af208288b1d /plugin/client_rpc_generated.go | |
parent | 0da5c852f05faf6c08026b9a16f8362564b27915 (diff) | |
download | chat-9c76d9ba0031ee4175db6960024d61c23cc98659.tar.gz chat-9c76d9ba0031ee4175db6960024d61c23cc98659.tar.bz2 chat-9c76d9ba0031ee4175db6960024d61c23cc98659.zip |
Add GetLDAPUserAttributes method to the plugin API (#9326)
Diffstat (limited to 'plugin/client_rpc_generated.go')
-rw-r--r-- | plugin/client_rpc_generated.go | 30 |
1 files changed, 30 insertions, 0 deletions
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 } |