You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
787 B

  1. package ldap
  2. import (
  3. "crypto/tls"
  4. "time"
  5. )
  6. // Client knows how to interact with an LDAP server
  7. type Client interface {
  8. Start()
  9. StartTLS(config *tls.Config) error
  10. Close()
  11. SetTimeout(time.Duration)
  12. Bind(username, password string) error
  13. SimpleBind(simpleBindRequest *SimpleBindRequest) (*SimpleBindResult, error)
  14. Add(addRequest *AddRequest) error
  15. Del(delRequest *DelRequest) error
  16. Modify(modifyRequest *ModifyRequest) error
  17. ModifyDN(modifyDNRequest *ModifyDNRequest) error
  18. Compare(dn, attribute, value string) (bool, error)
  19. PasswordModify(passwordModifyRequest *PasswordModifyRequest) (*PasswordModifyResult, error)
  20. Search(searchRequest *SearchRequest) (*SearchResult, error)
  21. SearchWithPaging(searchRequest *SearchRequest, pagingSize uint32) (*SearchResult, error)
  22. }