paddle v0.1.3 Paddle.SchemaParser

Module used to parse *.schema files and generate Paddle classes.

Summary

Functions

Get the attributes names of an object class or a list of object classes

Get the required attributes names of an object class or a list of object classes

Functions

attributes(object_classes)
attributes(binary | [binary]) :: [atom]

Get the attributes names of an object class or a list of object classes.

Example:

iex> Paddle.SchemaParser.attributes "account"
[:description, :seeAlso, :l, :o, :ou, :host, :uid]

iex> Paddle.SchemaParser.attributes ["posixAccount", "account"]
[:userPassword, :loginShell, :gecos, :description, :cn, :uid, :uidNumber,
 :gidNumber, :homeDirectory, :seeAlso, :l, :o, :ou, :host]
required_attributes(object_classes)
required_attributes(binary | [binary]) :: [atom]

Get the required attributes names of an object class or a list of object classes.

Example:

iex> Paddle.SchemaParser.required_attributes "account"
[:uid]
iex> Paddle.SchemaParser.required_attributes ["posixAccount", "account"]
[:cn, :uid, :uidNumber, :gidNumber, :homeDirectory]