Versions in this module Expand all Collapse all v0 v0.2.0 Sep 22, 2026 v0.1.0 Sep 21, 2026 Changes in this version + const DefaultSizeLimit + var ErrAlreadyExists error = kindSentinel + var ErrConstraint error = kindSentinel + var ErrDenied error = kindSentinel + var ErrInvalidAttribute error = kindSentinel + var ErrNotFound error = kindSentinel + var ErrPassword error = kindSentinel + var ErrReferral error = kindSentinel + var ErrReplication error = kindSentinel + var ErrSchema error = kindSentinel + var ErrTooManyResults error = kindSentinel + var ErrTransient error = kindSentinel + var ErrTransport error = kindSentinel + var ErrUnsupported error = kindSentinel + func And(terms ...string) string + func Backoff(ctx context.Context, cfg RetryConfig, attempt int) error + func Bool(b bool) *bool + func CanonicalACEKey(a ACE) string + func ContainerOf(dn string) (string, error) + func Equal(attr, value string) string + func EqualFoldDN(a, b string) (bool, error) + func EscapeFilter(filter string) string + func EscapeValue(v string) string + func IdentityArg(id Identity) string + func IdentityForm(id Identity) string + func Int(i int) *int + func Parent(dn string) (string, error) + func RevealSecret(s Secret) string + func SplitDN(dn string) ([]string, error) + func String(s string) *string + func ValidateContainer(op, container string) error + func ValidateName(op, name string) error + func WithIdentity(err error, op string, id Identity) error + type ACE struct + Inheritance Inheritance + Inherited bool + InheritedObjectType string + ObjectType string + Rights []Right + Trustee string + Type ACEType + type ACESpec struct + ObjectClass string + ObjectType string + Rights []Right + Scope Inheritance + Type ACEType + type ACEType string + const ACEAllow + const ACEDeny + type ACLDirectory interface + Get func(ctx context.Context, id Identity) ([]ACE, error) + Grant func(ctx context.Context, id Identity, aces []ACE) error + Revoke func(ctx context.Context, id Identity, aces []ACE) error + type AttributeTypeAndValue struct + Type string + Value string + type Computer struct + AccountExpiration *time.Time + AllowedToDelegateTo []string + Container string + DN string + DNSHostName string + Description string + DisplayName string + Enabled bool + GUID string + KerberosEncryptionType []string + Location string + ManagedBy string + Name string + OperatingSystem string + OperatingSystemServicePack string + OperatingSystemVersion string + PrincipalsAllowed []string + SID string + SamAccountName string + ServicePrincipalNames []string + TrustedForDelegation bool + type ComputerDirectory interface + Create func(ctx context.Context, spec ComputerSpec) (*Computer, error) + Delete func(ctx context.Context, id Identity) error + Get func(ctx context.Context, id Identity) (*Computer, error) + Search func(ctx context.Context, q Query) ([]Computer, error) + Update func(ctx context.Context, id Identity, spec ComputerSpec) (*Computer, error) + type ComputerSpec struct + AccountExpiration OptTime + AllowedToDelegateTo *[]string + Container string + DNSHostName *string + Description *string + DisplayName *string + Enabled *bool + KerberosEncryptionType *[]string + Location *string + ManagedBy *string + Name string + PrincipalsAllowed []Identity + SamAccountName string + ServicePrincipalNames *[]string + TrustedForDelegation *bool + func (s ComputerSpec) Validate(op string, forCreate bool) error + type DN struct + RDNs []RelativeDN + func ParseDN(str string) (*DN, error) + func (d *DN) AncestorOfFold(other *DN) bool + func (d *DN) EqualFold(other *DN) bool + func (d *DN) Parent() *DN + func (d *DN) String() string + type Delegation struct + func (d *Delegation) Template(task DelegationTask) ([]ACESpec, error) + type DelegationTask string + const TaskManageGroups + const TaskManageUsers + const TaskModifyGroupMembership + const TaskResetUserPasswords + func Tasks() []DelegationTask + type DeleteOptions struct + Unprotect bool + type Directory struct + ACL ACLDirectory + Closer io.Closer + Computer ComputerDirectory + DNC string + Group GroupDirectory + OU OUDirectory + Schema SchemaDirectory + Server string + ServiceAccount ServiceAccountDirectory + User UserDirectory + func (d Directory) Close() error + type Error struct + Code int + Err error + ExceptionType string + FQID string + Identity string + Kind Kind + Op string + ServerMessage string + Target string + Tombstoned bool + func (e *Error) Error() string + func (e *Error) Is(target error) bool + func (e *Error) Unwrap() error + type GMSA struct + AccountExpiration *time.Time + Container string + DN string + DNSHostName string + Description string + DisplayName string + Enabled bool + GUID string + KerberosEncryptionType []string + ManagedPasswordIntervalInDays int + Name string + PrincipalsAllowed []string + SID string + SamAccountName string + ServicePrincipalNames []string + TrustedForDelegation bool + type GMSASpec struct + AccountExpiration OptTime + Container string + DNSHostName *string + Description *string + DisplayName *string + Enabled *bool + KerberosEncryptionType *[]string + ManagedPasswordIntervalInDays *int + Name string + PrincipalsAllowed []Identity + SamAccountName string + ServicePrincipalNames *[]string + TrustedForDelegation *bool + func (s GMSASpec) Validate(op string, forCreate bool) error + type Group struct + Category GroupCategory + Container string + DN string + Description string + GUID string + ManagedBy string + Name string + SID string + SamAccountName string + Scope GroupScope + type GroupCategory string + const GroupCategoryDistribution + const GroupCategorySecurity + type GroupDirectory interface + AddMembers func(ctx context.Context, id Identity, members []Identity) error + Create func(ctx context.Context, spec GroupSpec) (*Group, error) + Delete func(ctx context.Context, id Identity) error + Get func(ctx context.Context, id Identity) (*Group, error) + IsMember func(ctx context.Context, id, member Identity) (bool, error) + Members func(ctx context.Context, id Identity) ([]Member, error) + MembersRecursive func(ctx context.Context, id Identity) ([]Member, error) + RemoveMembers func(ctx context.Context, id Identity, members []Identity) error + Search func(ctx context.Context, q Query) ([]Group, error) + Update func(ctx context.Context, id Identity, spec GroupSpec) (*Group, error) + type GroupScope string + const GroupScopeDomainLocal + const GroupScopeGlobal + const GroupScopeUniversal + type GroupSpec struct + Category GroupCategory + Container string + Description *string + ManagedBy *string + Name string + SamAccountName string + Scope GroupScope + func (s GroupSpec) Validate(op string, forCreate bool) error + type Identity interface + String func() string + func ByDN(dn string) Identity + func ByGUID(guid string) Identity + func BySAM(sam string) Identity + func BySID(sid string) Identity + type Inheritance string + const InheritanceChildren + const InheritanceDescendants + const InheritanceThis + type KeyedMutex struct + func NewKeyedMutex() *KeyedMutex + func (k *KeyedMutex) Lock(key string) (unlock func()) + func (k *KeyedMutex) Size() int + type Kind int + const KindAlreadyExists + const KindConstraint + const KindDenied + const KindInvalidAttribute + const KindNotFound + const KindPassword + const KindReferral + const KindReplication + const KindSchema + const KindTooManyResults + const KindTransient + const KindTransport + const KindUnknown + const KindUnsupported + func ClassifyCode(code int) (Kind, bool) + func (k Kind) Retryable() bool + func (k Kind) String() string + type Member struct + Class string + DN string + GUID string + SID string + type OU struct + Container string + DN string + Description string + GUID string + Name string + Protected bool + type OUDirectory interface + Create func(ctx context.Context, spec OUSpec) (*OU, error) + Delete func(ctx context.Context, id Identity, opts DeleteOptions) error + Get func(ctx context.Context, id Identity) (*OU, error) + Search func(ctx context.Context, q Query) ([]OU, error) + Update func(ctx context.Context, id Identity, spec OUSpec) (*OU, error) + type OUSpec struct + Container string + Description *string + Name string + Protected *bool + type OptTime struct + func ClearTime() OptTime + func SetTime(t time.Time) OptTime + func (o OptTime) IsClear() bool + func (o OptTime) IsSet() bool + func (o OptTime) Value() time.Time + type PresenceCheck struct + ErrorCode int + ExceptionType string + Kind Kind + Message string + Present bool + func (p PresenceCheck) ConfirmAbsent(op string, id Identity, dn string) error + type Query struct + Filter string + Scope SearchScope + SearchBase string + SizeLimit int + func (q Query) WithDefaults(dnc string) Query + type RelativeDN struct + Attributes []AttributeTypeAndValue + type RetryConfig struct + InitialBackoff time.Duration + Jitter float64 + MaxAttempts int + MaxBackoff time.Duration + func (r RetryConfig) WithDefaults() RetryConfig + type Right string + type SchemaDirectory interface + Resolve func(ctx context.Context, refs []SchemaRef) (map[SchemaRef]string, error) + type SchemaRef struct + Kind SchemaRefKind + Name string + type SchemaRefKind string + const RefAttribute + const RefClass + const RefExtendedRight + type SearchScope string + const SearchScopeBase + const SearchScopeOneLevel + const SearchScopeSubtree + type Secret struct + func NewSecret(s string) Secret + func (Secret) GoString() string + func (Secret) MarshalJSON() ([]byte, error) + func (Secret) String() string + func (s Secret) Format(f fmt.State, verb rune) + func (s Secret) IsZero() bool + type ServiceAccountDirectory interface + Create func(ctx context.Context, spec GMSASpec) (*GMSA, error) + Delete func(ctx context.Context, id Identity) error + Get func(ctx context.Context, id Identity) (*GMSA, error) + Search func(ctx context.Context, q Query) ([]GMSA, error) + Update func(ctx context.Context, id Identity, spec GMSASpec) (*GMSA, error) + type User struct + AccountExpiration *time.Time + CanChangePassword bool + ChangePasswordAtLogon bool + Container string + DN string + Description string + DisplayName string + Enabled bool + GUID string + GivenName string + Name string + PasswordExpires bool + SID string + SamAccountName string + Surname string + UserPrincipalName string + type UserDirectory interface + Create func(ctx context.Context, spec UserSpec) (*User, error) + Delete func(ctx context.Context, id Identity) error + Get func(ctx context.Context, id Identity) (*User, error) + Search func(ctx context.Context, q Query) ([]User, error) + SetPassword func(ctx context.Context, id Identity, password Secret) error + Update func(ctx context.Context, id Identity, spec UserSpec) (*User, error) + type UserSpec struct + AccountExpiration OptTime + CanChangePassword *bool + ChangePasswordAtLogon *bool + Container string + Description *string + DisplayName *string + Enabled *bool + GivenName *string + Name *string + Password *Secret + PasswordExpires *bool + SamAccountName string + Surname *string + UserPrincipalName *string + func (s UserSpec) Validate(op string) error