Documentation ¶
Index ¶
- type FakeLDAPClient
- type FakeLDAPConnection
- func (f *FakeLDAPConnection) Add(addRequest *ldap.AddRequest) error
- func (f *FakeLDAPConnection) Bind(username, password string) error
- func (f *FakeLDAPConnection) Close()
- func (f *FakeLDAPConnection) Del(delRequest *ldap.DelRequest) error
- func (f *FakeLDAPConnection) Modify(modifyRequest *ldap.ModifyRequest) error
- func (f *FakeLDAPConnection) Search(searchRequest *ldap.SearchRequest) (*ldap.SearchResult, error)
- func (f *FakeLDAPConnection) SetTimeout(timeout time.Duration)
- func (f *FakeLDAPConnection) StartTLS(config *tls.Config) error
- func (f *FakeLDAPConnection) UnauthenticatedBind(username string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeLDAPClient ¶
type FakeLDAPClient struct {
ConnToReturn ldaputil.Connection
}
FakeLDAPClient can be used to inspect the LDAP requests that have been constructed, and to inject responses.
func (*FakeLDAPClient) Dial ¶
func (f *FakeLDAPClient) Dial(network, addr string) (ldaputil.Connection, error)
func (*FakeLDAPClient) DialTLS ¶
func (f *FakeLDAPClient) DialTLS(network, addr string, config *tls.Config) (ldaputil.Connection, error)
type FakeLDAPConnection ¶
type FakeLDAPConnection struct { ModifyRequestToExpect *ldap.ModifyRequest SearchRequestToExpect *ldap.SearchRequest SearchResultToReturn *ldap.SearchResult }
func (*FakeLDAPConnection) Add ¶ added in v0.11.1
func (f *FakeLDAPConnection) Add(addRequest *ldap.AddRequest) error
func (*FakeLDAPConnection) Bind ¶
func (f *FakeLDAPConnection) Bind(username, password string) error
func (*FakeLDAPConnection) Close ¶
func (f *FakeLDAPConnection) Close()
func (*FakeLDAPConnection) Del ¶ added in v0.11.1
func (f *FakeLDAPConnection) Del(delRequest *ldap.DelRequest) error
func (*FakeLDAPConnection) Modify ¶
func (f *FakeLDAPConnection) Modify(modifyRequest *ldap.ModifyRequest) error
func (*FakeLDAPConnection) Search ¶
func (f *FakeLDAPConnection) Search(searchRequest *ldap.SearchRequest) (*ldap.SearchResult, error)
func (*FakeLDAPConnection) SetTimeout ¶ added in v0.6.1
func (f *FakeLDAPConnection) SetTimeout(timeout time.Duration)
func (*FakeLDAPConnection) StartTLS ¶
func (f *FakeLDAPConnection) StartTLS(config *tls.Config) error
func (*FakeLDAPConnection) UnauthenticatedBind ¶
func (f *FakeLDAPConnection) UnauthenticatedBind(username string) error
Click to show internal directories.
Click to hide internal directories.