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.

27 lines
737 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. Compare(dn, attribute, value string) (bool, error)
  18. PasswordModify(passwordModifyRequest *PasswordModifyRequest) (*PasswordModifyResult, error)
  19. Search(searchRequest *SearchRequest) (*SearchResult, error)
  20. SearchWithPaging(searchRequest *SearchRequest, pagingSize uint32) (*SearchResult, error)
  21. }