// Code generated by mockery v2.53.5. DO NOT EDIT. package mocks import ( context "context" ldap "github.com/go-ldap/ldap/v3" mock "github.com/stretchr/testify/mock" time "time" tls "crypto/tls" ) // Client is an autogenerated mock type for the Client type type Client struct { mock.Mock } type Client_Expecter struct { mock *mock.Mock } func (_m *Client) EXPECT() *Client_Expecter { return &Client_Expecter{mock: &_m.Mock} } // Add provides a mock function with given fields: _a0 func (_m *Client) Add(_a0 *ldap.AddRequest) error { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for Add") } var r0 error if rf, ok := ret.Get(0).(func(*ldap.AddRequest) error); ok { r0 = rf(_a0) } else { r0 = ret.Error(0) } return r0 } // Client_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' type Client_Add_Call struct { *mock.Call } // Add is a helper method to define mock.On call // - _a0 *ldap.AddRequest func (_e *Client_Expecter) Add(_a0 interface{}) *Client_Add_Call { return &Client_Add_Call{Call: _e.mock.On("Add", _a0)} } func (_c *Client_Add_Call) Run(run func(_a0 *ldap.AddRequest)) *Client_Add_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*ldap.AddRequest)) }) return _c } func (_c *Client_Add_Call) Return(_a0 error) *Client_Add_Call { _c.Call.Return(_a0) return _c } func (_c *Client_Add_Call) RunAndReturn(run func(*ldap.AddRequest) error) *Client_Add_Call { _c.Call.Return(run) return _c } // Bind provides a mock function with given fields: username, password func (_m *Client) Bind(username string, password string) error { ret := _m.Called(username, password) if len(ret) == 0 { panic("no return value specified for Bind") } var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(username, password) } else { r0 = ret.Error(0) } return r0 } // Client_Bind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Bind' type Client_Bind_Call struct { *mock.Call } // Bind is a helper method to define mock.On call // - username string // - password string func (_e *Client_Expecter) Bind(username interface{}, password interface{}) *Client_Bind_Call { return &Client_Bind_Call{Call: _e.mock.On("Bind", username, password)} } func (_c *Client_Bind_Call) Run(run func(username string, password string)) *Client_Bind_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(string), args[1].(string)) }) return _c } func (_c *Client_Bind_Call) Return(_a0 error) *Client_Bind_Call { _c.Call.Return(_a0) return _c } func (_c *Client_Bind_Call) RunAndReturn(run func(string, string) error) *Client_Bind_Call { _c.Call.Return(run) return _c } // Close provides a mock function with no fields func (_m *Client) Close() error { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for Close") } var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() } else { r0 = ret.Error(0) } return r0 } // Client_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' type Client_Close_Call struct { *mock.Call } // Close is a helper method to define mock.On call func (_e *Client_Expecter) Close() *Client_Close_Call { return &Client_Close_Call{Call: _e.mock.On("Close")} } func (_c *Client_Close_Call) Run(run func()) *Client_Close_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *Client_Close_Call) Return(_a0 error) *Client_Close_Call { _c.Call.Return(_a0) return _c } func (_c *Client_Close_Call) RunAndReturn(run func() error) *Client_Close_Call { _c.Call.Return(run) return _c } // Compare provides a mock function with given fields: dn, attribute, value func (_m *Client) Compare(dn string, attribute string, value string) (bool, error) { ret := _m.Called(dn, attribute, value) if len(ret) == 0 { panic("no return value specified for Compare") } var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string, string, string) (bool, error)); ok { return rf(dn, attribute, value) } if rf, ok := ret.Get(0).(func(string, string, string) bool); ok { r0 = rf(dn, attribute, value) } else { r0 = ret.Get(0).(bool) } if rf, ok := ret.Get(1).(func(string, string, string) error); ok { r1 = rf(dn, attribute, value) } else { r1 = ret.Error(1) } return r0, r1 } // Client_Compare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Compare' type Client_Compare_Call struct { *mock.Call } // Compare is a helper method to define mock.On call // - dn string // - attribute string // - value string func (_e *Client_Expecter) Compare(dn interface{}, attribute interface{}, value interface{}) *Client_Compare_Call { return &Client_Compare_Call{Call: _e.mock.On("Compare", dn, attribute, value)} } func (_c *Client_Compare_Call) Run(run func(dn string, attribute string, value string)) *Client_Compare_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(string), args[1].(string), args[2].(string)) }) return _c } func (_c *Client_Compare_Call) Return(_a0 bool, _a1 error) *Client_Compare_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *Client_Compare_Call) RunAndReturn(run func(string, string, string) (bool, error)) *Client_Compare_Call { _c.Call.Return(run) return _c } // Del provides a mock function with given fields: _a0 func (_m *Client) Del(_a0 *ldap.DelRequest) error { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for Del") } var r0 error if rf, ok := ret.Get(0).(func(*ldap.DelRequest) error); ok { r0 = rf(_a0) } else { r0 = ret.Error(0) } return r0 } // Client_Del_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Del' type Client_Del_Call struct { *mock.Call } // Del is a helper method to define mock.On call // - _a0 *ldap.DelRequest func (_e *Client_Expecter) Del(_a0 interface{}) *Client_Del_Call { return &Client_Del_Call{Call: _e.mock.On("Del", _a0)} } func (_c *Client_Del_Call) Run(run func(_a0 *ldap.DelRequest)) *Client_Del_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*ldap.DelRequest)) }) return _c } func (_c *Client_Del_Call) Return(_a0 error) *Client_Del_Call { _c.Call.Return(_a0) return _c } func (_c *Client_Del_Call) RunAndReturn(run func(*ldap.DelRequest) error) *Client_Del_Call { _c.Call.Return(run) return _c } // DirSync provides a mock function with given fields: searchRequest, flags, maxAttrCount, cookie func (_m *Client) DirSync(searchRequest *ldap.SearchRequest, flags int64, maxAttrCount int64, cookie []byte) (*ldap.SearchResult, error) { ret := _m.Called(searchRequest, flags, maxAttrCount, cookie) if len(ret) == 0 { panic("no return value specified for DirSync") } var r0 *ldap.SearchResult var r1 error if rf, ok := ret.Get(0).(func(*ldap.SearchRequest, int64, int64, []byte) (*ldap.SearchResult, error)); ok { return rf(searchRequest, flags, maxAttrCount, cookie) } if rf, ok := ret.Get(0).(func(*ldap.SearchRequest, int64, int64, []byte) *ldap.SearchResult); ok { r0 = rf(searchRequest, flags, maxAttrCount, cookie) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*ldap.SearchResult) } } if rf, ok := ret.Get(1).(func(*ldap.SearchRequest, int64, int64, []byte) error); ok { r1 = rf(searchRequest, flags, maxAttrCount, cookie) } else { r1 = ret.Error(1) } return r0, r1 } // Client_DirSync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DirSync' type Client_DirSync_Call struct { *mock.Call } // DirSync is a helper method to define mock.On call // - searchRequest *ldap.SearchRequest // - flags int64 // - maxAttrCount int64 // - cookie []byte func (_e *Client_Expecter) DirSync(searchRequest interface{}, flags interface{}, maxAttrCount interface{}, cookie interface{}) *Client_DirSync_Call { return &Client_DirSync_Call{Call: _e.mock.On("DirSync", searchRequest, flags, maxAttrCount, cookie)} } func (_c *Client_DirSync_Call) Run(run func(searchRequest *ldap.SearchRequest, flags int64, maxAttrCount int64, cookie []byte)) *Client_DirSync_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*ldap.SearchRequest), args[1].(int64), args[2].(int64), args[3].([]byte)) }) return _c } func (_c *Client_DirSync_Call) Return(_a0 *ldap.SearchResult, _a1 error) *Client_DirSync_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *Client_DirSync_Call) RunAndReturn(run func(*ldap.SearchRequest, int64, int64, []byte) (*ldap.SearchResult, error)) *Client_DirSync_Call { _c.Call.Return(run) return _c } // DirSyncAsync provides a mock function with given fields: ctx, searchRequest, bufferSize, flags, maxAttrCount, cookie func (_m *Client) DirSyncAsync(ctx context.Context, searchRequest *ldap.SearchRequest, bufferSize int, flags int64, maxAttrCount int64, cookie []byte) ldap.Response { ret := _m.Called(ctx, searchRequest, bufferSize, flags, maxAttrCount, cookie) if len(ret) == 0 { panic("no return value specified for DirSyncAsync") } var r0 ldap.Response if rf, ok := ret.Get(0).(func(context.Context, *ldap.SearchRequest, int, int64, int64, []byte) ldap.Response); ok { r0 = rf(ctx, searchRequest, bufferSize, flags, maxAttrCount, cookie) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(ldap.Response) } } return r0 } // Client_DirSyncAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DirSyncAsync' type Client_DirSyncAsync_Call struct { *mock.Call } // DirSyncAsync is a helper method to define mock.On call // - ctx context.Context // - searchRequest *ldap.SearchRequest // - bufferSize int // - flags int64 // - maxAttrCount int64 // - cookie []byte func (_e *Client_Expecter) DirSyncAsync(ctx interface{}, searchRequest interface{}, bufferSize interface{}, flags interface{}, maxAttrCount interface{}, cookie interface{}) *Client_DirSyncAsync_Call { return &Client_DirSyncAsync_Call{Call: _e.mock.On("DirSyncAsync", ctx, searchRequest, bufferSize, flags, maxAttrCount, cookie)} } func (_c *Client_DirSyncAsync_Call) Run(run func(ctx context.Context, searchRequest *ldap.SearchRequest, bufferSize int, flags int64, maxAttrCount int64, cookie []byte)) *Client_DirSyncAsync_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*ldap.SearchRequest), args[2].(int), args[3].(int64), args[4].(int64), args[5].([]byte)) }) return _c } func (_c *Client_DirSyncAsync_Call) Return(_a0 ldap.Response) *Client_DirSyncAsync_Call { _c.Call.Return(_a0) return _c } func (_c *Client_DirSyncAsync_Call) RunAndReturn(run func(context.Context, *ldap.SearchRequest, int, int64, int64, []byte) ldap.Response) *Client_DirSyncAsync_Call { _c.Call.Return(run) return _c } // Extended provides a mock function with given fields: _a0 func (_m *Client) Extended(_a0 *ldap.ExtendedRequest) (*ldap.ExtendedResponse, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for Extended") } var r0 *ldap.ExtendedResponse var r1 error if rf, ok := ret.Get(0).(func(*ldap.ExtendedRequest) (*ldap.ExtendedResponse, error)); ok { return rf(_a0) } if rf, ok := ret.Get(0).(func(*ldap.ExtendedRequest) *ldap.ExtendedResponse); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*ldap.ExtendedResponse) } } if rf, ok := ret.Get(1).(func(*ldap.ExtendedRequest) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) } return r0, r1 } // Client_Extended_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Extended' type Client_Extended_Call struct { *mock.Call } // Extended is a helper method to define mock.On call // - _a0 *ldap.ExtendedRequest func (_e *Client_Expecter) Extended(_a0 interface{}) *Client_Extended_Call { return &Client_Extended_Call{Call: _e.mock.On("Extended", _a0)} } func (_c *Client_Extended_Call) Run(run func(_a0 *ldap.ExtendedRequest)) *Client_Extended_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*ldap.ExtendedRequest)) }) return _c } func (_c *Client_Extended_Call) Return(_a0 *ldap.ExtendedResponse, _a1 error) *Client_Extended_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *Client_Extended_Call) RunAndReturn(run func(*ldap.ExtendedRequest) (*ldap.ExtendedResponse, error)) *Client_Extended_Call { _c.Call.Return(run) return _c } // ExternalBind provides a mock function with no fields func (_m *Client) ExternalBind() error { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for ExternalBind") } var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() } else { r0 = ret.Error(0) } return r0 } // Client_ExternalBind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExternalBind' type Client_ExternalBind_Call struct { *mock.Call } // ExternalBind is a helper method to define mock.On call func (_e *Client_Expecter) ExternalBind() *Client_ExternalBind_Call { return &Client_ExternalBind_Call{Call: _e.mock.On("ExternalBind")} } func (_c *Client_ExternalBind_Call) Run(run func()) *Client_ExternalBind_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *Client_ExternalBind_Call) Return(_a0 error) *Client_ExternalBind_Call { _c.Call.Return(_a0) return _c } func (_c *Client_ExternalBind_Call) RunAndReturn(run func() error) *Client_ExternalBind_Call { _c.Call.Return(run) return _c } // GetLastError provides a mock function with no fields func (_m *Client) GetLastError() error { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetLastError") } var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() } else { r0 = ret.Error(0) } return r0 } // Client_GetLastError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLastError' type Client_GetLastError_Call struct { *mock.Call } // GetLastError is a helper method to define mock.On call func (_e *Client_Expecter) GetLastError() *Client_GetLastError_Call { return &Client_GetLastError_Call{Call: _e.mock.On("GetLastError")} } func (_c *Client_GetLastError_Call) Run(run func()) *Client_GetLastError_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *Client_GetLastError_Call) Return(_a0 error) *Client_GetLastError_Call { _c.Call.Return(_a0) return _c } func (_c *Client_GetLastError_Call) RunAndReturn(run func() error) *Client_GetLastError_Call { _c.Call.Return(run) return _c } // IsClosing provides a mock function with no fields func (_m *Client) IsClosing() bool { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for IsClosing") } var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() } else { r0 = ret.Get(0).(bool) } return r0 } // Client_IsClosing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsClosing' type Client_IsClosing_Call struct { *mock.Call } // IsClosing is a helper method to define mock.On call func (_e *Client_Expecter) IsClosing() *Client_IsClosing_Call { return &Client_IsClosing_Call{Call: _e.mock.On("IsClosing")} } func (_c *Client_IsClosing_Call) Run(run func()) *Client_IsClosing_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *Client_IsClosing_Call) Return(_a0 bool) *Client_IsClosing_Call { _c.Call.Return(_a0) return _c } func (_c *Client_IsClosing_Call) RunAndReturn(run func() bool) *Client_IsClosing_Call { _c.Call.Return(run) return _c } // Modify provides a mock function with given fields: _a0 func (_m *Client) Modify(_a0 *ldap.ModifyRequest) error { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for Modify") } var r0 error if rf, ok := ret.Get(0).(func(*ldap.ModifyRequest) error); ok { r0 = rf(_a0) } else { r0 = ret.Error(0) } return r0 } // Client_Modify_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Modify' type Client_Modify_Call struct { *mock.Call } // Modify is a helper method to define mock.On call // - _a0 *ldap.ModifyRequest func (_e *Client_Expecter) Modify(_a0 interface{}) *Client_Modify_Call { return &Client_Modify_Call{Call: _e.mock.On("Modify", _a0)} } func (_c *Client_Modify_Call) Run(run func(_a0 *ldap.ModifyRequest)) *Client_Modify_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*ldap.ModifyRequest)) }) return _c } func (_c *Client_Modify_Call) Return(_a0 error) *Client_Modify_Call { _c.Call.Return(_a0) return _c } func (_c *Client_Modify_Call) RunAndReturn(run func(*ldap.ModifyRequest) error) *Client_Modify_Call { _c.Call.Return(run) return _c } // ModifyDN provides a mock function with given fields: _a0 func (_m *Client) ModifyDN(_a0 *ldap.ModifyDNRequest) error { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for ModifyDN") } var r0 error if rf, ok := ret.Get(0).(func(*ldap.ModifyDNRequest) error); ok { r0 = rf(_a0) } else { r0 = ret.Error(0) } return r0 } // Client_ModifyDN_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ModifyDN' type Client_ModifyDN_Call struct { *mock.Call } // ModifyDN is a helper method to define mock.On call // - _a0 *ldap.ModifyDNRequest func (_e *Client_Expecter) ModifyDN(_a0 interface{}) *Client_ModifyDN_Call { return &Client_ModifyDN_Call{Call: _e.mock.On("ModifyDN", _a0)} } func (_c *Client_ModifyDN_Call) Run(run func(_a0 *ldap.ModifyDNRequest)) *Client_ModifyDN_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*ldap.ModifyDNRequest)) }) return _c } func (_c *Client_ModifyDN_Call) Return(_a0 error) *Client_ModifyDN_Call { _c.Call.Return(_a0) return _c } func (_c *Client_ModifyDN_Call) RunAndReturn(run func(*ldap.ModifyDNRequest) error) *Client_ModifyDN_Call { _c.Call.Return(run) return _c } // ModifyWithResult provides a mock function with given fields: _a0 func (_m *Client) ModifyWithResult(_a0 *ldap.ModifyRequest) (*ldap.ModifyResult, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for ModifyWithResult") } var r0 *ldap.ModifyResult var r1 error if rf, ok := ret.Get(0).(func(*ldap.ModifyRequest) (*ldap.ModifyResult, error)); ok { return rf(_a0) } if rf, ok := ret.Get(0).(func(*ldap.ModifyRequest) *ldap.ModifyResult); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*ldap.ModifyResult) } } if rf, ok := ret.Get(1).(func(*ldap.ModifyRequest) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) } return r0, r1 } // Client_ModifyWithResult_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ModifyWithResult' type Client_ModifyWithResult_Call struct { *mock.Call } // ModifyWithResult is a helper method to define mock.On call // - _a0 *ldap.ModifyRequest func (_e *Client_Expecter) ModifyWithResult(_a0 interface{}) *Client_ModifyWithResult_Call { return &Client_ModifyWithResult_Call{Call: _e.mock.On("ModifyWithResult", _a0)} } func (_c *Client_ModifyWithResult_Call) Run(run func(_a0 *ldap.ModifyRequest)) *Client_ModifyWithResult_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*ldap.ModifyRequest)) }) return _c } func (_c *Client_ModifyWithResult_Call) Return(_a0 *ldap.ModifyResult, _a1 error) *Client_ModifyWithResult_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *Client_ModifyWithResult_Call) RunAndReturn(run func(*ldap.ModifyRequest) (*ldap.ModifyResult, error)) *Client_ModifyWithResult_Call { _c.Call.Return(run) return _c } // NTLMUnauthenticatedBind provides a mock function with given fields: domain, username func (_m *Client) NTLMUnauthenticatedBind(domain string, username string) error { ret := _m.Called(domain, username) if len(ret) == 0 { panic("no return value specified for NTLMUnauthenticatedBind") } var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(domain, username) } else { r0 = ret.Error(0) } return r0 } // Client_NTLMUnauthenticatedBind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NTLMUnauthenticatedBind' type Client_NTLMUnauthenticatedBind_Call struct { *mock.Call } // NTLMUnauthenticatedBind is a helper method to define mock.On call // - domain string // - username string func (_e *Client_Expecter) NTLMUnauthenticatedBind(domain interface{}, username interface{}) *Client_NTLMUnauthenticatedBind_Call { return &Client_NTLMUnauthenticatedBind_Call{Call: _e.mock.On("NTLMUnauthenticatedBind", domain, username)} } func (_c *Client_NTLMUnauthenticatedBind_Call) Run(run func(domain string, username string)) *Client_NTLMUnauthenticatedBind_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(string), args[1].(string)) }) return _c } func (_c *Client_NTLMUnauthenticatedBind_Call) Return(_a0 error) *Client_NTLMUnauthenticatedBind_Call { _c.Call.Return(_a0) return _c } func (_c *Client_NTLMUnauthenticatedBind_Call) RunAndReturn(run func(string, string) error) *Client_NTLMUnauthenticatedBind_Call { _c.Call.Return(run) return _c } // PasswordModify provides a mock function with given fields: _a0 func (_m *Client) PasswordModify(_a0 *ldap.PasswordModifyRequest) (*ldap.PasswordModifyResult, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for PasswordModify") } var r0 *ldap.PasswordModifyResult var r1 error if rf, ok := ret.Get(0).(func(*ldap.PasswordModifyRequest) (*ldap.PasswordModifyResult, error)); ok { return rf(_a0) } if rf, ok := ret.Get(0).(func(*ldap.PasswordModifyRequest) *ldap.PasswordModifyResult); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*ldap.PasswordModifyResult) } } if rf, ok := ret.Get(1).(func(*ldap.PasswordModifyRequest) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) } return r0, r1 } // Client_PasswordModify_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PasswordModify' type Client_PasswordModify_Call struct { *mock.Call } // PasswordModify is a helper method to define mock.On call // - _a0 *ldap.PasswordModifyRequest func (_e *Client_Expecter) PasswordModify(_a0 interface{}) *Client_PasswordModify_Call { return &Client_PasswordModify_Call{Call: _e.mock.On("PasswordModify", _a0)} } func (_c *Client_PasswordModify_Call) Run(run func(_a0 *ldap.PasswordModifyRequest)) *Client_PasswordModify_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*ldap.PasswordModifyRequest)) }) return _c } func (_c *Client_PasswordModify_Call) Return(_a0 *ldap.PasswordModifyResult, _a1 error) *Client_PasswordModify_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *Client_PasswordModify_Call) RunAndReturn(run func(*ldap.PasswordModifyRequest) (*ldap.PasswordModifyResult, error)) *Client_PasswordModify_Call { _c.Call.Return(run) return _c } // Search provides a mock function with given fields: _a0 func (_m *Client) Search(_a0 *ldap.SearchRequest) (*ldap.SearchResult, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for Search") } var r0 *ldap.SearchResult var r1 error if rf, ok := ret.Get(0).(func(*ldap.SearchRequest) (*ldap.SearchResult, error)); ok { return rf(_a0) } if rf, ok := ret.Get(0).(func(*ldap.SearchRequest) *ldap.SearchResult); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*ldap.SearchResult) } } if rf, ok := ret.Get(1).(func(*ldap.SearchRequest) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) } return r0, r1 } // Client_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search' type Client_Search_Call struct { *mock.Call } // Search is a helper method to define mock.On call // - _a0 *ldap.SearchRequest func (_e *Client_Expecter) Search(_a0 interface{}) *Client_Search_Call { return &Client_Search_Call{Call: _e.mock.On("Search", _a0)} } func (_c *Client_Search_Call) Run(run func(_a0 *ldap.SearchRequest)) *Client_Search_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*ldap.SearchRequest)) }) return _c } func (_c *Client_Search_Call) Return(_a0 *ldap.SearchResult, _a1 error) *Client_Search_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *Client_Search_Call) RunAndReturn(run func(*ldap.SearchRequest) (*ldap.SearchResult, error)) *Client_Search_Call { _c.Call.Return(run) return _c } // SearchAsync provides a mock function with given fields: ctx, searchRequest, bufferSize func (_m *Client) SearchAsync(ctx context.Context, searchRequest *ldap.SearchRequest, bufferSize int) ldap.Response { ret := _m.Called(ctx, searchRequest, bufferSize) if len(ret) == 0 { panic("no return value specified for SearchAsync") } var r0 ldap.Response if rf, ok := ret.Get(0).(func(context.Context, *ldap.SearchRequest, int) ldap.Response); ok { r0 = rf(ctx, searchRequest, bufferSize) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(ldap.Response) } } return r0 } // Client_SearchAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchAsync' type Client_SearchAsync_Call struct { *mock.Call } // SearchAsync is a helper method to define mock.On call // - ctx context.Context // - searchRequest *ldap.SearchRequest // - bufferSize int func (_e *Client_Expecter) SearchAsync(ctx interface{}, searchRequest interface{}, bufferSize interface{}) *Client_SearchAsync_Call { return &Client_SearchAsync_Call{Call: _e.mock.On("SearchAsync", ctx, searchRequest, bufferSize)} } func (_c *Client_SearchAsync_Call) Run(run func(ctx context.Context, searchRequest *ldap.SearchRequest, bufferSize int)) *Client_SearchAsync_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*ldap.SearchRequest), args[2].(int)) }) return _c } func (_c *Client_SearchAsync_Call) Return(_a0 ldap.Response) *Client_SearchAsync_Call { _c.Call.Return(_a0) return _c } func (_c *Client_SearchAsync_Call) RunAndReturn(run func(context.Context, *ldap.SearchRequest, int) ldap.Response) *Client_SearchAsync_Call { _c.Call.Return(run) return _c } // SearchWithPaging provides a mock function with given fields: searchRequest, pagingSize func (_m *Client) SearchWithPaging(searchRequest *ldap.SearchRequest, pagingSize uint32) (*ldap.SearchResult, error) { ret := _m.Called(searchRequest, pagingSize) if len(ret) == 0 { panic("no return value specified for SearchWithPaging") } var r0 *ldap.SearchResult var r1 error if rf, ok := ret.Get(0).(func(*ldap.SearchRequest, uint32) (*ldap.SearchResult, error)); ok { return rf(searchRequest, pagingSize) } if rf, ok := ret.Get(0).(func(*ldap.SearchRequest, uint32) *ldap.SearchResult); ok { r0 = rf(searchRequest, pagingSize) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*ldap.SearchResult) } } if rf, ok := ret.Get(1).(func(*ldap.SearchRequest, uint32) error); ok { r1 = rf(searchRequest, pagingSize) } else { r1 = ret.Error(1) } return r0, r1 } // Client_SearchWithPaging_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchWithPaging' type Client_SearchWithPaging_Call struct { *mock.Call } // SearchWithPaging is a helper method to define mock.On call // - searchRequest *ldap.SearchRequest // - pagingSize uint32 func (_e *Client_Expecter) SearchWithPaging(searchRequest interface{}, pagingSize interface{}) *Client_SearchWithPaging_Call { return &Client_SearchWithPaging_Call{Call: _e.mock.On("SearchWithPaging", searchRequest, pagingSize)} } func (_c *Client_SearchWithPaging_Call) Run(run func(searchRequest *ldap.SearchRequest, pagingSize uint32)) *Client_SearchWithPaging_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*ldap.SearchRequest), args[1].(uint32)) }) return _c } func (_c *Client_SearchWithPaging_Call) Return(_a0 *ldap.SearchResult, _a1 error) *Client_SearchWithPaging_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *Client_SearchWithPaging_Call) RunAndReturn(run func(*ldap.SearchRequest, uint32) (*ldap.SearchResult, error)) *Client_SearchWithPaging_Call { _c.Call.Return(run) return _c } // SetTimeout provides a mock function with given fields: _a0 func (_m *Client) SetTimeout(_a0 time.Duration) { _m.Called(_a0) } // Client_SetTimeout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTimeout' type Client_SetTimeout_Call struct { *mock.Call } // SetTimeout is a helper method to define mock.On call // - _a0 time.Duration func (_e *Client_Expecter) SetTimeout(_a0 interface{}) *Client_SetTimeout_Call { return &Client_SetTimeout_Call{Call: _e.mock.On("SetTimeout", _a0)} } func (_c *Client_SetTimeout_Call) Run(run func(_a0 time.Duration)) *Client_SetTimeout_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(time.Duration)) }) return _c } func (_c *Client_SetTimeout_Call) Return() *Client_SetTimeout_Call { _c.Call.Return() return _c } func (_c *Client_SetTimeout_Call) RunAndReturn(run func(time.Duration)) *Client_SetTimeout_Call { _c.Run(run) return _c } // SimpleBind provides a mock function with given fields: _a0 func (_m *Client) SimpleBind(_a0 *ldap.SimpleBindRequest) (*ldap.SimpleBindResult, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for SimpleBind") } var r0 *ldap.SimpleBindResult var r1 error if rf, ok := ret.Get(0).(func(*ldap.SimpleBindRequest) (*ldap.SimpleBindResult, error)); ok { return rf(_a0) } if rf, ok := ret.Get(0).(func(*ldap.SimpleBindRequest) *ldap.SimpleBindResult); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*ldap.SimpleBindResult) } } if rf, ok := ret.Get(1).(func(*ldap.SimpleBindRequest) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) } return r0, r1 } // Client_SimpleBind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SimpleBind' type Client_SimpleBind_Call struct { *mock.Call } // SimpleBind is a helper method to define mock.On call // - _a0 *ldap.SimpleBindRequest func (_e *Client_Expecter) SimpleBind(_a0 interface{}) *Client_SimpleBind_Call { return &Client_SimpleBind_Call{Call: _e.mock.On("SimpleBind", _a0)} } func (_c *Client_SimpleBind_Call) Run(run func(_a0 *ldap.SimpleBindRequest)) *Client_SimpleBind_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*ldap.SimpleBindRequest)) }) return _c } func (_c *Client_SimpleBind_Call) Return(_a0 *ldap.SimpleBindResult, _a1 error) *Client_SimpleBind_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *Client_SimpleBind_Call) RunAndReturn(run func(*ldap.SimpleBindRequest) (*ldap.SimpleBindResult, error)) *Client_SimpleBind_Call { _c.Call.Return(run) return _c } // Start provides a mock function with no fields func (_m *Client) Start() { _m.Called() } // Client_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' type Client_Start_Call struct { *mock.Call } // Start is a helper method to define mock.On call func (_e *Client_Expecter) Start() *Client_Start_Call { return &Client_Start_Call{Call: _e.mock.On("Start")} } func (_c *Client_Start_Call) Run(run func()) *Client_Start_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *Client_Start_Call) Return() *Client_Start_Call { _c.Call.Return() return _c } func (_c *Client_Start_Call) RunAndReturn(run func()) *Client_Start_Call { _c.Run(run) return _c } // StartTLS provides a mock function with given fields: _a0 func (_m *Client) StartTLS(_a0 *tls.Config) error { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for StartTLS") } var r0 error if rf, ok := ret.Get(0).(func(*tls.Config) error); ok { r0 = rf(_a0) } else { r0 = ret.Error(0) } return r0 } // Client_StartTLS_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartTLS' type Client_StartTLS_Call struct { *mock.Call } // StartTLS is a helper method to define mock.On call // - _a0 *tls.Config func (_e *Client_Expecter) StartTLS(_a0 interface{}) *Client_StartTLS_Call { return &Client_StartTLS_Call{Call: _e.mock.On("StartTLS", _a0)} } func (_c *Client_StartTLS_Call) Run(run func(_a0 *tls.Config)) *Client_StartTLS_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*tls.Config)) }) return _c } func (_c *Client_StartTLS_Call) Return(_a0 error) *Client_StartTLS_Call { _c.Call.Return(_a0) return _c } func (_c *Client_StartTLS_Call) RunAndReturn(run func(*tls.Config) error) *Client_StartTLS_Call { _c.Call.Return(run) return _c } // Syncrepl provides a mock function with given fields: ctx, searchRequest, bufferSize, mode, cookie, reloadHint func (_m *Client) Syncrepl(ctx context.Context, searchRequest *ldap.SearchRequest, bufferSize int, mode ldap.ControlSyncRequestMode, cookie []byte, reloadHint bool) ldap.Response { ret := _m.Called(ctx, searchRequest, bufferSize, mode, cookie, reloadHint) if len(ret) == 0 { panic("no return value specified for Syncrepl") } var r0 ldap.Response if rf, ok := ret.Get(0).(func(context.Context, *ldap.SearchRequest, int, ldap.ControlSyncRequestMode, []byte, bool) ldap.Response); ok { r0 = rf(ctx, searchRequest, bufferSize, mode, cookie, reloadHint) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(ldap.Response) } } return r0 } // Client_Syncrepl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Syncrepl' type Client_Syncrepl_Call struct { *mock.Call } // Syncrepl is a helper method to define mock.On call // - ctx context.Context // - searchRequest *ldap.SearchRequest // - bufferSize int // - mode ldap.ControlSyncRequestMode // - cookie []byte // - reloadHint bool func (_e *Client_Expecter) Syncrepl(ctx interface{}, searchRequest interface{}, bufferSize interface{}, mode interface{}, cookie interface{}, reloadHint interface{}) *Client_Syncrepl_Call { return &Client_Syncrepl_Call{Call: _e.mock.On("Syncrepl", ctx, searchRequest, bufferSize, mode, cookie, reloadHint)} } func (_c *Client_Syncrepl_Call) Run(run func(ctx context.Context, searchRequest *ldap.SearchRequest, bufferSize int, mode ldap.ControlSyncRequestMode, cookie []byte, reloadHint bool)) *Client_Syncrepl_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*ldap.SearchRequest), args[2].(int), args[3].(ldap.ControlSyncRequestMode), args[4].([]byte), args[5].(bool)) }) return _c } func (_c *Client_Syncrepl_Call) Return(_a0 ldap.Response) *Client_Syncrepl_Call { _c.Call.Return(_a0) return _c } func (_c *Client_Syncrepl_Call) RunAndReturn(run func(context.Context, *ldap.SearchRequest, int, ldap.ControlSyncRequestMode, []byte, bool) ldap.Response) *Client_Syncrepl_Call { _c.Call.Return(run) return _c } // TLSConnectionState provides a mock function with no fields func (_m *Client) TLSConnectionState() (tls.ConnectionState, bool) { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for TLSConnectionState") } var r0 tls.ConnectionState var r1 bool if rf, ok := ret.Get(0).(func() (tls.ConnectionState, bool)); ok { return rf() } if rf, ok := ret.Get(0).(func() tls.ConnectionState); ok { r0 = rf() } else { r0 = ret.Get(0).(tls.ConnectionState) } if rf, ok := ret.Get(1).(func() bool); ok { r1 = rf() } else { r1 = ret.Get(1).(bool) } return r0, r1 } // Client_TLSConnectionState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TLSConnectionState' type Client_TLSConnectionState_Call struct { *mock.Call } // TLSConnectionState is a helper method to define mock.On call func (_e *Client_Expecter) TLSConnectionState() *Client_TLSConnectionState_Call { return &Client_TLSConnectionState_Call{Call: _e.mock.On("TLSConnectionState")} } func (_c *Client_TLSConnectionState_Call) Run(run func()) *Client_TLSConnectionState_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *Client_TLSConnectionState_Call) Return(_a0 tls.ConnectionState, _a1 bool) *Client_TLSConnectionState_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *Client_TLSConnectionState_Call) RunAndReturn(run func() (tls.ConnectionState, bool)) *Client_TLSConnectionState_Call { _c.Call.Return(run) return _c } // UnauthenticatedBind provides a mock function with given fields: username func (_m *Client) UnauthenticatedBind(username string) error { ret := _m.Called(username) if len(ret) == 0 { panic("no return value specified for UnauthenticatedBind") } var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(username) } else { r0 = ret.Error(0) } return r0 } // Client_UnauthenticatedBind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnauthenticatedBind' type Client_UnauthenticatedBind_Call struct { *mock.Call } // UnauthenticatedBind is a helper method to define mock.On call // - username string func (_e *Client_Expecter) UnauthenticatedBind(username interface{}) *Client_UnauthenticatedBind_Call { return &Client_UnauthenticatedBind_Call{Call: _e.mock.On("UnauthenticatedBind", username)} } func (_c *Client_UnauthenticatedBind_Call) Run(run func(username string)) *Client_UnauthenticatedBind_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(string)) }) return _c } func (_c *Client_UnauthenticatedBind_Call) Return(_a0 error) *Client_UnauthenticatedBind_Call { _c.Call.Return(_a0) return _c } func (_c *Client_UnauthenticatedBind_Call) RunAndReturn(run func(string) error) *Client_UnauthenticatedBind_Call { _c.Call.Return(run) return _c } // Unbind provides a mock function with no fields func (_m *Client) Unbind() error { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for Unbind") } var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() } else { r0 = ret.Error(0) } return r0 } // Client_Unbind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unbind' type Client_Unbind_Call struct { *mock.Call } // Unbind is a helper method to define mock.On call func (_e *Client_Expecter) Unbind() *Client_Unbind_Call { return &Client_Unbind_Call{Call: _e.mock.On("Unbind")} } func (_c *Client_Unbind_Call) Run(run func()) *Client_Unbind_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *Client_Unbind_Call) Return(_a0 error) *Client_Unbind_Call { _c.Call.Return(_a0) return _c } func (_c *Client_Unbind_Call) RunAndReturn(run func() error) *Client_Unbind_Call { _c.Call.Return(run) return _c } // NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewClient(t interface { mock.TestingT Cleanup(func()) }) *Client { mock := &Client{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }