client.go 737 B

12345678910111213141516171819202122232425262728
  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. }