Skip to content
/ adc Public

Active Directory Golang client library

License

Notifications You must be signed in to change notification settings

dlampsi/adc

Repository files navigation

adc

Tests Linter codecov Go Reference

Active Directory client library that allows you to perform basic operations with users and groups: creation, deletion, search, changes to members and composition in groups.

The library is a wrapper around go-ldap/ldap module that provides a more convient client for Active Directory.

Usage

Import module in your go app:

import "github.com/dlampsi/adc"

Getting started

cfg := &adc.Config{
    URL: "ldaps://my.ad.site:636",
    Bind: &adc.BindAccount{
        DN:       "CN=admin,DC=company,DC=com",
        Password: "***",
    },
    SearchBase: "OU=default,DC=company,DC=com",
}

cl := adc.New(cfg)

if err := cl.Connect(); err != nil {
    // Handle error
}

// Do stuff ...

See examples directory for extended usage examples.

Contributing

  1. Fork this repositpry
  2. Create new PR from main branch
  3. Create PR from your fork
  4. Make sure tests and coverage tests pass
  5. Request review

License

MIT License.