module Ldap_schema: sig
.. end
A library for parsing rfc2252 schemas as returned by directory
servers
module Oid: sig
.. end
module Oidset: sig
.. end
module Oidmap: sig
.. end
val format_oid : Oid.t -> unit
val format_oidset : Oidset.t -> unit
module Lcstring: sig
.. end
module Lcmap: sig
.. end
val format_lcstring : Lcstring.t -> unit
type
octype =
| |
Abstract |
| |
Structural |
| |
Auxiliary |
type
objectclass = {
|
oc_name : string list ; |
|
oc_oid : Oid.t ; |
|
oc_desc : string ; |
|
oc_obsolete : bool ; |
|
oc_sup : string list ; |
|
oc_must : string list ; |
|
oc_may : string list ; |
|
oc_type : octype ; |
|
oc_xattr : string list ; |
}
The type representing an objectclass definition
type
attribute = {
|
at_name : string list ; |
|
at_desc : string ; |
|
at_oid : Oid.t ; |
|
at_equality : Oid.t option ; |
|
at_ordering : Oid.t option ; |
|
at_substr : Oid.t option ; |
|
at_syntax : Oid.t ; |
|
at_length : Int64.t ; |
|
at_obsolete : bool ; |
|
at_single_value : bool ; |
|
at_collective : bool ; |
|
at_no_user_modification : bool ; |
|
at_usage : string ; |
|
at_sup : string list ; |
|
at_xattr : string list ; |
}
the type representing an attribute definition
type
schema = {
}
val schema_print_depth : int Pervasives.ref
This reference controls the dept of printing for the schema in the
toplevel. The default is 10 keys from each table will be printed. OID
tables are not currently printed.
val format_schema : schema -> unit
A formatter for the schema, prints the structure, and expands the
hashtbls to show the keys. The number of keys printed is controled by
schema_print_depth.
exception Parse_error_oc of Lexing.lexbuf * objectclass * string
exception Parse_error_at of Lexing.lexbuf * attribute * string
exception Syntax_error_oc of Lexing.lexbuf * objectclass * string
exception Syntax_error_at of Lexing.lexbuf * attribute * string
Schema Access Functions
A set of functions which should be
used to access the schema. All functions on Oid types are O(1),
all functions dealing with names are O(1) for canonical names, and
O(n) for non canonical names. Functions which return names will
always return the canonical name.
exception Invalid_objectclass of string
exception Non_unique_objectclass_alias of string
exception Invalid_attribute of string
exception Non_unique_attribute_alias of string
val readSchema : string list -> string list -> schema
readSchema attribute_list objectclass_list, parse the schema into
a schema type given a list of attribute definition lines, and
objectclass definition lines.
val attrNameToOid : schema -> string -> Oid.t
given a name of an attribute name (canonical or otherwise), return
its oid
val oidToAttr : schema -> Oid.t -> attribute
given the oid of an attribute, return its record
val oidToAttrName : schema -> Oid.t -> string
given the oid of an attribute, return its canonical name
val attrNameToAttr : schema -> string -> attribute
get an attr structure by one of its names (canonical or otherwise)
val ocNameToOc : schema -> string -> objectclass
get an objectclass structure by one of its names (canonical or
otherwise).
val ocNameToOid : schema -> string -> Oid.t
given a name of an objectclass (canonical or otherwise), return
its oid.
val oidToOc : schema -> Oid.t -> objectclass
given the oid of an objectclass, return its objectclass structure
val oidToOcName : schema -> Oid.t -> string
given the oid of an objectclass, return its canonical name
val compareAttrs : schema -> string -> string -> int
compare attributes by oid.
val compareOcs : schema -> string -> string -> int
compare objectclasses by oid.
val lookupMatchingRule : schema ->
[< `Equality | `Ordering | `Substring ] ->
attribute -> Oid.t option
lookup matching rules, taking into account the higherarchical
relationship of attributes