From da28db3a539a21a6969e92a5b3a0ed16ec7cfaf4 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Thu, 28 Sep 2023 20:02:42 +0200 Subject: [PATCH] add lualdap - see https://lualdap.github.io/lualdap - see https://luarocks.org/modules/fperrad/lualdap --- types/lualdap/lualdap.d.tl | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 types/lualdap/lualdap.d.tl diff --git a/types/lualdap/lualdap.d.tl b/types/lualdap/lualdap.d.tl new file mode 100644 index 0000000..ee8cfad --- /dev/null +++ b/types/lualdap/lualdap.d.tl @@ -0,0 +1,46 @@ +-- +-- https://luarocks.org/modules/fperrad/lualdap +-- + +local record LuaLDAP + _COPYRIGHT: string + _DESCRIPTION: string + _VERSION: string + + type DistinguishedName = string + + record Cnx + userdata + + record Search + enum Scope + "base" + "onelevel" + "subtree" + "" + end + + attrs: string|{string} + attrsonly: boolean + base: DistinguishedName + filter: string + scope: Scope + sizelimit: integer + timeout: number + end + + add: function(self: Cnx, name: DistinguishedName, table_of_attributes: {string:string|{string}}): function(): boolean, string + bind_simple: function(self: Cnx, who: DistinguishedName, password: string): Cnx, string + close: function(self: Cnx): integer + compare: function(self: Cnx, name: DistinguishedName, attribute: string, value: string): function(): boolean, string + delete: function(self: Cnx, name: DistinguishedName): function(): boolean, string + modify: function(self: Cnx, ...: DistinguishedName|{integer|string:string|{string}}): function(): boolean, string + rename: function(self: Cnx, name: DistinguishedName, new_relative_dn: DistinguishedName, new_parent: DistinguishedName, delete_old: integer): function(): boolean, string + search: function(self: Cnx, params: Search): function(): DistinguishedName, {string:string|{string}} + end + + open: function(hostname: string, usetls:boolean, timeout: number): Cnx, string + open_simple: function(hostname: string, who: DistinguishedName, password: string, usetls: boolean, timeout: number): Cnx, string +end + +return LuaLDAP