Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add lualdap #49

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions types/lualdap/lualdap.d.tl
Original file line number Diff line number Diff line change
@@ -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