go-ruby-activeldap documentation¶
Pure-Go (CGO=0), MRI-faithful reimplementation of the ActiveLdap gem — an ActiveRecord-style object–LDAP mapper (attribute mapping, search/find, CRUD, validations, associations, LDIF) over Net::LDAP.
go-ruby-activeldap/activeldap is a faithful, pure-Go (zero cgo) reimplementation of
Ruby's activeldap, matching reference Ruby (MRI) behaviour. The module path is
github.com/go-ruby-activeldap/activeldap.
It maps LDAP directory entries to objects the ActiveRecord way — declare a base
DN and object classes, then find, search, build, validate and save entries —
speaking to the directory over a Net::LDAP connection. It is a standalone,
reusable library importable by any Go program, and the backend bound into
go-embedded-ruby by rbgo as a
native module — the same pattern as
go-ruby-yaml. The dependency runs the
other way: this library has no dependency on the Ruby runtime.
Status: pure-Go, CGO=0, differential-tested
A faithful pure-Go port of Ruby's activeldap, validated against reference Ruby,
at 100% coverage, gofmt + go vet clean, CI green across the six 64-bit Go
targets and three OSes.
Install¶
Repositories¶
| Repo | What it is |
|---|---|
activeldap |
the library — Ruby's activeldap in pure Go |
docs |
this documentation site (MkDocs Material, versioned with mike) |
go-ruby-activeldap.github.io |
the organization landing page (Hugo) |
brand |
logo and brand assets |
What it maps¶
- Attribute mapping — LDAP object classes and their attributes are surfaced as
object fields, with the aliasing, multi-valued and required-attribute rules
reference
activeldapapplies. - Search & find —
find,find(:all)andsearchbuild RFC 4515 filters over a base DN and scope, mirroring the gem's query surface. - CRUD — build,
save, update anddestroyentries, with dirty tracking and the DN-composition rules of the reference. - Validations — required attributes and object-class constraints are checked before a write, the ActiveModel way.
- Associations —
belongs_to/has_manyover DN and member attributes (for example groups and their members). - LDIF — import and export entries as LDIF.
Principles¶
- Pure Go,
CGO_ENABLED=0— trivial cross-compilation, a single static binary, no C toolchain. - Reference-faithful. Behaviour matches reference Ruby (MRI), validated by a differential oracle rather than approximated.
- Standalone & reusable. No dependency on the Ruby runtime — the dependency
runs the other way;
rbgobinds this module. - 100% test coverage is the target, enforced as a CI gate, across 6 arches.
Where to go next¶
- Why pure Go — why this slice of Ruby lives as a standalone, interpreter-independent Go library.
- Reference — install, import path and the API reference.
Source lives at github.com/go-ruby-activeldap/activeldap.