https://github.com/dlampsi/adc
Active Directory Golang client library
https://github.com/dlampsi/adc
active-directory activedirectory adc go golang golang-module ldap
Last synced: 10 months ago
JSON representation
Active Directory Golang client library
- Host: GitHub
- URL: https://github.com/dlampsi/adc
- Owner: dlampsi
- License: mit
- Created: 2021-02-28T10:30:26.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-02-28T20:03:13.000Z (over 1 year ago)
- Last Synced: 2025-03-29T05:23:23.541Z (about 1 year ago)
- Topics: active-directory, activedirectory, adc, go, golang, golang-module, ldap
- Language: Go
- Homepage:
- Size: 108 KB
- Stars: 27
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# adc
[](https://github.com/dlampsi/adc/actions/workflows/tests.yml)
[](https://github.com/dlampsi/adc/actions/workflows/linter.yml)
[](https://codecov.io/gh/dlampsi/adc)
[](https://pkg.go.dev/github.com/dlampsi/adc)
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](https://github.com/go-ldap/ldap) module that provides a more convient client for Active Directory.
## Usage
Import module in your go app:
```go
import "github.com/dlampsi/adc"
```
### Getting started
```go
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](examples) directory for extended usage examples.
## Contributing
1. Fork this repositpry
2. Create new PR from `main` branch
2. Create PR from your fork
3. Make sure tests and coverage tests pass
4. Request review
## License
[MIT License](LICENSE).