Files
opencloud/services/graph/pkg/identity/mocks/ldapclient.go
06kellyjac 2a3a20693a build: Modify mockery config to work with v3
Maintaining the positioning of the files from v2 to reduce cognitive
load.
Indentation of yaml files now matches `.editorconfig`.
All mock files regenerated.
Added empty `{}` following convention from `mockery init` etc.
Removed directory specification where it would already match.
2025-06-19 16:25:39 +01:00

1569 lines
44 KiB
Go

// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
package mocks
import (
"context"
"crypto/tls"
"time"
"github.com/go-ldap/ldap/v3"
mock "github.com/stretchr/testify/mock"
)
// 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
}
// 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 for the type Client
func (_mock *Client) Add(addRequest *ldap.AddRequest) error {
ret := _mock.Called(addRequest)
if len(ret) == 0 {
panic("no return value specified for Add")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(*ldap.AddRequest) error); ok {
r0 = returnFunc(addRequest)
} 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
// - addRequest *ldap.AddRequest
func (_e *Client_Expecter) Add(addRequest interface{}) *Client_Add_Call {
return &Client_Add_Call{Call: _e.mock.On("Add", addRequest)}
}
func (_c *Client_Add_Call) Run(run func(addRequest *ldap.AddRequest)) *Client_Add_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 *ldap.AddRequest
if args[0] != nil {
arg0 = args[0].(*ldap.AddRequest)
}
run(
arg0,
)
})
return _c
}
func (_c *Client_Add_Call) Return(err error) *Client_Add_Call {
_c.Call.Return(err)
return _c
}
func (_c *Client_Add_Call) RunAndReturn(run func(addRequest *ldap.AddRequest) error) *Client_Add_Call {
_c.Call.Return(run)
return _c
}
// Bind provides a mock function for the type Client
func (_mock *Client) Bind(username string, password string) error {
ret := _mock.Called(username, password)
if len(ret) == 0 {
panic("no return value specified for Bind")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string, string) error); ok {
r0 = returnFunc(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) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
var arg1 string
if args[1] != nil {
arg1 = args[1].(string)
}
run(
arg0,
arg1,
)
})
return _c
}
func (_c *Client_Bind_Call) Return(err error) *Client_Bind_Call {
_c.Call.Return(err)
return _c
}
func (_c *Client_Bind_Call) RunAndReturn(run func(username string, password string) error) *Client_Bind_Call {
_c.Call.Return(run)
return _c
}
// Close provides a mock function for the type Client
func (_mock *Client) Close() error {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for Close")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func() error); ok {
r0 = returnFunc()
} 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(err error) *Client_Close_Call {
_c.Call.Return(err)
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 for the type Client
func (_mock *Client) Compare(dn string, attribute string, value string) (bool, error) {
ret := _mock.Called(dn, attribute, value)
if len(ret) == 0 {
panic("no return value specified for Compare")
}
var r0 bool
var r1 error
if returnFunc, ok := ret.Get(0).(func(string, string, string) (bool, error)); ok {
return returnFunc(dn, attribute, value)
}
if returnFunc, ok := ret.Get(0).(func(string, string, string) bool); ok {
r0 = returnFunc(dn, attribute, value)
} else {
r0 = ret.Get(0).(bool)
}
if returnFunc, ok := ret.Get(1).(func(string, string, string) error); ok {
r1 = returnFunc(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) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
var arg1 string
if args[1] != nil {
arg1 = args[1].(string)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *Client_Compare_Call) Return(b bool, err error) *Client_Compare_Call {
_c.Call.Return(b, err)
return _c
}
func (_c *Client_Compare_Call) RunAndReturn(run func(dn string, attribute string, value string) (bool, error)) *Client_Compare_Call {
_c.Call.Return(run)
return _c
}
// Del provides a mock function for the type Client
func (_mock *Client) Del(delRequest *ldap.DelRequest) error {
ret := _mock.Called(delRequest)
if len(ret) == 0 {
panic("no return value specified for Del")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(*ldap.DelRequest) error); ok {
r0 = returnFunc(delRequest)
} 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
// - delRequest *ldap.DelRequest
func (_e *Client_Expecter) Del(delRequest interface{}) *Client_Del_Call {
return &Client_Del_Call{Call: _e.mock.On("Del", delRequest)}
}
func (_c *Client_Del_Call) Run(run func(delRequest *ldap.DelRequest)) *Client_Del_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 *ldap.DelRequest
if args[0] != nil {
arg0 = args[0].(*ldap.DelRequest)
}
run(
arg0,
)
})
return _c
}
func (_c *Client_Del_Call) Return(err error) *Client_Del_Call {
_c.Call.Return(err)
return _c
}
func (_c *Client_Del_Call) RunAndReturn(run func(delRequest *ldap.DelRequest) error) *Client_Del_Call {
_c.Call.Return(run)
return _c
}
// DirSync provides a mock function for the type Client
func (_mock *Client) DirSync(searchRequest *ldap.SearchRequest, flags int64, maxAttrCount int64, cookie []byte) (*ldap.SearchResult, error) {
ret := _mock.Called(searchRequest, flags, maxAttrCount, cookie)
if len(ret) == 0 {
panic("no return value specified for DirSync")
}
var r0 *ldap.SearchResult
var r1 error
if returnFunc, ok := ret.Get(0).(func(*ldap.SearchRequest, int64, int64, []byte) (*ldap.SearchResult, error)); ok {
return returnFunc(searchRequest, flags, maxAttrCount, cookie)
}
if returnFunc, ok := ret.Get(0).(func(*ldap.SearchRequest, int64, int64, []byte) *ldap.SearchResult); ok {
r0 = returnFunc(searchRequest, flags, maxAttrCount, cookie)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*ldap.SearchResult)
}
}
if returnFunc, ok := ret.Get(1).(func(*ldap.SearchRequest, int64, int64, []byte) error); ok {
r1 = returnFunc(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) {
var arg0 *ldap.SearchRequest
if args[0] != nil {
arg0 = args[0].(*ldap.SearchRequest)
}
var arg1 int64
if args[1] != nil {
arg1 = args[1].(int64)
}
var arg2 int64
if args[2] != nil {
arg2 = args[2].(int64)
}
var arg3 []byte
if args[3] != nil {
arg3 = args[3].([]byte)
}
run(
arg0,
arg1,
arg2,
arg3,
)
})
return _c
}
func (_c *Client_DirSync_Call) Return(searchResult *ldap.SearchResult, err error) *Client_DirSync_Call {
_c.Call.Return(searchResult, err)
return _c
}
func (_c *Client_DirSync_Call) RunAndReturn(run func(searchRequest *ldap.SearchRequest, flags int64, maxAttrCount int64, cookie []byte) (*ldap.SearchResult, error)) *Client_DirSync_Call {
_c.Call.Return(run)
return _c
}
// DirSyncAsync provides a mock function for the type Client
func (_mock *Client) DirSyncAsync(ctx context.Context, searchRequest *ldap.SearchRequest, bufferSize int, flags int64, maxAttrCount int64, cookie []byte) ldap.Response {
ret := _mock.Called(ctx, searchRequest, bufferSize, flags, maxAttrCount, cookie)
if len(ret) == 0 {
panic("no return value specified for DirSyncAsync")
}
var r0 ldap.Response
if returnFunc, ok := ret.Get(0).(func(context.Context, *ldap.SearchRequest, int, int64, int64, []byte) ldap.Response); ok {
r0 = returnFunc(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) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 *ldap.SearchRequest
if args[1] != nil {
arg1 = args[1].(*ldap.SearchRequest)
}
var arg2 int
if args[2] != nil {
arg2 = args[2].(int)
}
var arg3 int64
if args[3] != nil {
arg3 = args[3].(int64)
}
var arg4 int64
if args[4] != nil {
arg4 = args[4].(int64)
}
var arg5 []byte
if args[5] != nil {
arg5 = args[5].([]byte)
}
run(
arg0,
arg1,
arg2,
arg3,
arg4,
arg5,
)
})
return _c
}
func (_c *Client_DirSyncAsync_Call) Return(response ldap.Response) *Client_DirSyncAsync_Call {
_c.Call.Return(response)
return _c
}
func (_c *Client_DirSyncAsync_Call) RunAndReturn(run func(ctx context.Context, searchRequest *ldap.SearchRequest, bufferSize int, flags int64, maxAttrCount int64, cookie []byte) ldap.Response) *Client_DirSyncAsync_Call {
_c.Call.Return(run)
return _c
}
// Extended provides a mock function for the type Client
func (_mock *Client) Extended(extendedRequest *ldap.ExtendedRequest) (*ldap.ExtendedResponse, error) {
ret := _mock.Called(extendedRequest)
if len(ret) == 0 {
panic("no return value specified for Extended")
}
var r0 *ldap.ExtendedResponse
var r1 error
if returnFunc, ok := ret.Get(0).(func(*ldap.ExtendedRequest) (*ldap.ExtendedResponse, error)); ok {
return returnFunc(extendedRequest)
}
if returnFunc, ok := ret.Get(0).(func(*ldap.ExtendedRequest) *ldap.ExtendedResponse); ok {
r0 = returnFunc(extendedRequest)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*ldap.ExtendedResponse)
}
}
if returnFunc, ok := ret.Get(1).(func(*ldap.ExtendedRequest) error); ok {
r1 = returnFunc(extendedRequest)
} 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
// - extendedRequest *ldap.ExtendedRequest
func (_e *Client_Expecter) Extended(extendedRequest interface{}) *Client_Extended_Call {
return &Client_Extended_Call{Call: _e.mock.On("Extended", extendedRequest)}
}
func (_c *Client_Extended_Call) Run(run func(extendedRequest *ldap.ExtendedRequest)) *Client_Extended_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 *ldap.ExtendedRequest
if args[0] != nil {
arg0 = args[0].(*ldap.ExtendedRequest)
}
run(
arg0,
)
})
return _c
}
func (_c *Client_Extended_Call) Return(extendedResponse *ldap.ExtendedResponse, err error) *Client_Extended_Call {
_c.Call.Return(extendedResponse, err)
return _c
}
func (_c *Client_Extended_Call) RunAndReturn(run func(extendedRequest *ldap.ExtendedRequest) (*ldap.ExtendedResponse, error)) *Client_Extended_Call {
_c.Call.Return(run)
return _c
}
// ExternalBind provides a mock function for the type Client
func (_mock *Client) ExternalBind() error {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for ExternalBind")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func() error); ok {
r0 = returnFunc()
} 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(err error) *Client_ExternalBind_Call {
_c.Call.Return(err)
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 for the type Client
func (_mock *Client) GetLastError() error {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for GetLastError")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func() error); ok {
r0 = returnFunc()
} 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(err error) *Client_GetLastError_Call {
_c.Call.Return(err)
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 for the type Client
func (_mock *Client) IsClosing() bool {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for IsClosing")
}
var r0 bool
if returnFunc, ok := ret.Get(0).(func() bool); ok {
r0 = returnFunc()
} 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(b bool) *Client_IsClosing_Call {
_c.Call.Return(b)
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 for the type Client
func (_mock *Client) Modify(modifyRequest *ldap.ModifyRequest) error {
ret := _mock.Called(modifyRequest)
if len(ret) == 0 {
panic("no return value specified for Modify")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(*ldap.ModifyRequest) error); ok {
r0 = returnFunc(modifyRequest)
} 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
// - modifyRequest *ldap.ModifyRequest
func (_e *Client_Expecter) Modify(modifyRequest interface{}) *Client_Modify_Call {
return &Client_Modify_Call{Call: _e.mock.On("Modify", modifyRequest)}
}
func (_c *Client_Modify_Call) Run(run func(modifyRequest *ldap.ModifyRequest)) *Client_Modify_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 *ldap.ModifyRequest
if args[0] != nil {
arg0 = args[0].(*ldap.ModifyRequest)
}
run(
arg0,
)
})
return _c
}
func (_c *Client_Modify_Call) Return(err error) *Client_Modify_Call {
_c.Call.Return(err)
return _c
}
func (_c *Client_Modify_Call) RunAndReturn(run func(modifyRequest *ldap.ModifyRequest) error) *Client_Modify_Call {
_c.Call.Return(run)
return _c
}
// ModifyDN provides a mock function for the type Client
func (_mock *Client) ModifyDN(modifyDNRequest *ldap.ModifyDNRequest) error {
ret := _mock.Called(modifyDNRequest)
if len(ret) == 0 {
panic("no return value specified for ModifyDN")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(*ldap.ModifyDNRequest) error); ok {
r0 = returnFunc(modifyDNRequest)
} 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
// - modifyDNRequest *ldap.ModifyDNRequest
func (_e *Client_Expecter) ModifyDN(modifyDNRequest interface{}) *Client_ModifyDN_Call {
return &Client_ModifyDN_Call{Call: _e.mock.On("ModifyDN", modifyDNRequest)}
}
func (_c *Client_ModifyDN_Call) Run(run func(modifyDNRequest *ldap.ModifyDNRequest)) *Client_ModifyDN_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 *ldap.ModifyDNRequest
if args[0] != nil {
arg0 = args[0].(*ldap.ModifyDNRequest)
}
run(
arg0,
)
})
return _c
}
func (_c *Client_ModifyDN_Call) Return(err error) *Client_ModifyDN_Call {
_c.Call.Return(err)
return _c
}
func (_c *Client_ModifyDN_Call) RunAndReturn(run func(modifyDNRequest *ldap.ModifyDNRequest) error) *Client_ModifyDN_Call {
_c.Call.Return(run)
return _c
}
// ModifyWithResult provides a mock function for the type Client
func (_mock *Client) ModifyWithResult(modifyRequest *ldap.ModifyRequest) (*ldap.ModifyResult, error) {
ret := _mock.Called(modifyRequest)
if len(ret) == 0 {
panic("no return value specified for ModifyWithResult")
}
var r0 *ldap.ModifyResult
var r1 error
if returnFunc, ok := ret.Get(0).(func(*ldap.ModifyRequest) (*ldap.ModifyResult, error)); ok {
return returnFunc(modifyRequest)
}
if returnFunc, ok := ret.Get(0).(func(*ldap.ModifyRequest) *ldap.ModifyResult); ok {
r0 = returnFunc(modifyRequest)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*ldap.ModifyResult)
}
}
if returnFunc, ok := ret.Get(1).(func(*ldap.ModifyRequest) error); ok {
r1 = returnFunc(modifyRequest)
} 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
// - modifyRequest *ldap.ModifyRequest
func (_e *Client_Expecter) ModifyWithResult(modifyRequest interface{}) *Client_ModifyWithResult_Call {
return &Client_ModifyWithResult_Call{Call: _e.mock.On("ModifyWithResult", modifyRequest)}
}
func (_c *Client_ModifyWithResult_Call) Run(run func(modifyRequest *ldap.ModifyRequest)) *Client_ModifyWithResult_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 *ldap.ModifyRequest
if args[0] != nil {
arg0 = args[0].(*ldap.ModifyRequest)
}
run(
arg0,
)
})
return _c
}
func (_c *Client_ModifyWithResult_Call) Return(modifyResult *ldap.ModifyResult, err error) *Client_ModifyWithResult_Call {
_c.Call.Return(modifyResult, err)
return _c
}
func (_c *Client_ModifyWithResult_Call) RunAndReturn(run func(modifyRequest *ldap.ModifyRequest) (*ldap.ModifyResult, error)) *Client_ModifyWithResult_Call {
_c.Call.Return(run)
return _c
}
// NTLMUnauthenticatedBind provides a mock function for the type Client
func (_mock *Client) NTLMUnauthenticatedBind(domain string, username string) error {
ret := _mock.Called(domain, username)
if len(ret) == 0 {
panic("no return value specified for NTLMUnauthenticatedBind")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string, string) error); ok {
r0 = returnFunc(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) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
var arg1 string
if args[1] != nil {
arg1 = args[1].(string)
}
run(
arg0,
arg1,
)
})
return _c
}
func (_c *Client_NTLMUnauthenticatedBind_Call) Return(err error) *Client_NTLMUnauthenticatedBind_Call {
_c.Call.Return(err)
return _c
}
func (_c *Client_NTLMUnauthenticatedBind_Call) RunAndReturn(run func(domain string, username string) error) *Client_NTLMUnauthenticatedBind_Call {
_c.Call.Return(run)
return _c
}
// PasswordModify provides a mock function for the type Client
func (_mock *Client) PasswordModify(passwordModifyRequest *ldap.PasswordModifyRequest) (*ldap.PasswordModifyResult, error) {
ret := _mock.Called(passwordModifyRequest)
if len(ret) == 0 {
panic("no return value specified for PasswordModify")
}
var r0 *ldap.PasswordModifyResult
var r1 error
if returnFunc, ok := ret.Get(0).(func(*ldap.PasswordModifyRequest) (*ldap.PasswordModifyResult, error)); ok {
return returnFunc(passwordModifyRequest)
}
if returnFunc, ok := ret.Get(0).(func(*ldap.PasswordModifyRequest) *ldap.PasswordModifyResult); ok {
r0 = returnFunc(passwordModifyRequest)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*ldap.PasswordModifyResult)
}
}
if returnFunc, ok := ret.Get(1).(func(*ldap.PasswordModifyRequest) error); ok {
r1 = returnFunc(passwordModifyRequest)
} 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
// - passwordModifyRequest *ldap.PasswordModifyRequest
func (_e *Client_Expecter) PasswordModify(passwordModifyRequest interface{}) *Client_PasswordModify_Call {
return &Client_PasswordModify_Call{Call: _e.mock.On("PasswordModify", passwordModifyRequest)}
}
func (_c *Client_PasswordModify_Call) Run(run func(passwordModifyRequest *ldap.PasswordModifyRequest)) *Client_PasswordModify_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 *ldap.PasswordModifyRequest
if args[0] != nil {
arg0 = args[0].(*ldap.PasswordModifyRequest)
}
run(
arg0,
)
})
return _c
}
func (_c *Client_PasswordModify_Call) Return(passwordModifyResult *ldap.PasswordModifyResult, err error) *Client_PasswordModify_Call {
_c.Call.Return(passwordModifyResult, err)
return _c
}
func (_c *Client_PasswordModify_Call) RunAndReturn(run func(passwordModifyRequest *ldap.PasswordModifyRequest) (*ldap.PasswordModifyResult, error)) *Client_PasswordModify_Call {
_c.Call.Return(run)
return _c
}
// Search provides a mock function for the type Client
func (_mock *Client) Search(searchRequest *ldap.SearchRequest) (*ldap.SearchResult, error) {
ret := _mock.Called(searchRequest)
if len(ret) == 0 {
panic("no return value specified for Search")
}
var r0 *ldap.SearchResult
var r1 error
if returnFunc, ok := ret.Get(0).(func(*ldap.SearchRequest) (*ldap.SearchResult, error)); ok {
return returnFunc(searchRequest)
}
if returnFunc, ok := ret.Get(0).(func(*ldap.SearchRequest) *ldap.SearchResult); ok {
r0 = returnFunc(searchRequest)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*ldap.SearchResult)
}
}
if returnFunc, ok := ret.Get(1).(func(*ldap.SearchRequest) error); ok {
r1 = returnFunc(searchRequest)
} 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
// - searchRequest *ldap.SearchRequest
func (_e *Client_Expecter) Search(searchRequest interface{}) *Client_Search_Call {
return &Client_Search_Call{Call: _e.mock.On("Search", searchRequest)}
}
func (_c *Client_Search_Call) Run(run func(searchRequest *ldap.SearchRequest)) *Client_Search_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 *ldap.SearchRequest
if args[0] != nil {
arg0 = args[0].(*ldap.SearchRequest)
}
run(
arg0,
)
})
return _c
}
func (_c *Client_Search_Call) Return(searchResult *ldap.SearchResult, err error) *Client_Search_Call {
_c.Call.Return(searchResult, err)
return _c
}
func (_c *Client_Search_Call) RunAndReturn(run func(searchRequest *ldap.SearchRequest) (*ldap.SearchResult, error)) *Client_Search_Call {
_c.Call.Return(run)
return _c
}
// SearchAsync provides a mock function for the type Client
func (_mock *Client) SearchAsync(ctx context.Context, searchRequest *ldap.SearchRequest, bufferSize int) ldap.Response {
ret := _mock.Called(ctx, searchRequest, bufferSize)
if len(ret) == 0 {
panic("no return value specified for SearchAsync")
}
var r0 ldap.Response
if returnFunc, ok := ret.Get(0).(func(context.Context, *ldap.SearchRequest, int) ldap.Response); ok {
r0 = returnFunc(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) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 *ldap.SearchRequest
if args[1] != nil {
arg1 = args[1].(*ldap.SearchRequest)
}
var arg2 int
if args[2] != nil {
arg2 = args[2].(int)
}
run(
arg0,
arg1,
arg2,
)
})
return _c
}
func (_c *Client_SearchAsync_Call) Return(response ldap.Response) *Client_SearchAsync_Call {
_c.Call.Return(response)
return _c
}
func (_c *Client_SearchAsync_Call) RunAndReturn(run func(ctx context.Context, searchRequest *ldap.SearchRequest, bufferSize int) ldap.Response) *Client_SearchAsync_Call {
_c.Call.Return(run)
return _c
}
// SearchWithPaging provides a mock function for the type Client
func (_mock *Client) SearchWithPaging(searchRequest *ldap.SearchRequest, pagingSize uint32) (*ldap.SearchResult, error) {
ret := _mock.Called(searchRequest, pagingSize)
if len(ret) == 0 {
panic("no return value specified for SearchWithPaging")
}
var r0 *ldap.SearchResult
var r1 error
if returnFunc, ok := ret.Get(0).(func(*ldap.SearchRequest, uint32) (*ldap.SearchResult, error)); ok {
return returnFunc(searchRequest, pagingSize)
}
if returnFunc, ok := ret.Get(0).(func(*ldap.SearchRequest, uint32) *ldap.SearchResult); ok {
r0 = returnFunc(searchRequest, pagingSize)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*ldap.SearchResult)
}
}
if returnFunc, ok := ret.Get(1).(func(*ldap.SearchRequest, uint32) error); ok {
r1 = returnFunc(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) {
var arg0 *ldap.SearchRequest
if args[0] != nil {
arg0 = args[0].(*ldap.SearchRequest)
}
var arg1 uint32
if args[1] != nil {
arg1 = args[1].(uint32)
}
run(
arg0,
arg1,
)
})
return _c
}
func (_c *Client_SearchWithPaging_Call) Return(searchResult *ldap.SearchResult, err error) *Client_SearchWithPaging_Call {
_c.Call.Return(searchResult, err)
return _c
}
func (_c *Client_SearchWithPaging_Call) RunAndReturn(run func(searchRequest *ldap.SearchRequest, pagingSize uint32) (*ldap.SearchResult, error)) *Client_SearchWithPaging_Call {
_c.Call.Return(run)
return _c
}
// SetTimeout provides a mock function for the type Client
func (_mock *Client) SetTimeout(duration time.Duration) {
_mock.Called(duration)
return
}
// 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
// - duration time.Duration
func (_e *Client_Expecter) SetTimeout(duration interface{}) *Client_SetTimeout_Call {
return &Client_SetTimeout_Call{Call: _e.mock.On("SetTimeout", duration)}
}
func (_c *Client_SetTimeout_Call) Run(run func(duration time.Duration)) *Client_SetTimeout_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 time.Duration
if args[0] != nil {
arg0 = args[0].(time.Duration)
}
run(
arg0,
)
})
return _c
}
func (_c *Client_SetTimeout_Call) Return() *Client_SetTimeout_Call {
_c.Call.Return()
return _c
}
func (_c *Client_SetTimeout_Call) RunAndReturn(run func(duration time.Duration)) *Client_SetTimeout_Call {
_c.Run(run)
return _c
}
// SimpleBind provides a mock function for the type Client
func (_mock *Client) SimpleBind(simpleBindRequest *ldap.SimpleBindRequest) (*ldap.SimpleBindResult, error) {
ret := _mock.Called(simpleBindRequest)
if len(ret) == 0 {
panic("no return value specified for SimpleBind")
}
var r0 *ldap.SimpleBindResult
var r1 error
if returnFunc, ok := ret.Get(0).(func(*ldap.SimpleBindRequest) (*ldap.SimpleBindResult, error)); ok {
return returnFunc(simpleBindRequest)
}
if returnFunc, ok := ret.Get(0).(func(*ldap.SimpleBindRequest) *ldap.SimpleBindResult); ok {
r0 = returnFunc(simpleBindRequest)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*ldap.SimpleBindResult)
}
}
if returnFunc, ok := ret.Get(1).(func(*ldap.SimpleBindRequest) error); ok {
r1 = returnFunc(simpleBindRequest)
} 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
// - simpleBindRequest *ldap.SimpleBindRequest
func (_e *Client_Expecter) SimpleBind(simpleBindRequest interface{}) *Client_SimpleBind_Call {
return &Client_SimpleBind_Call{Call: _e.mock.On("SimpleBind", simpleBindRequest)}
}
func (_c *Client_SimpleBind_Call) Run(run func(simpleBindRequest *ldap.SimpleBindRequest)) *Client_SimpleBind_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 *ldap.SimpleBindRequest
if args[0] != nil {
arg0 = args[0].(*ldap.SimpleBindRequest)
}
run(
arg0,
)
})
return _c
}
func (_c *Client_SimpleBind_Call) Return(simpleBindResult *ldap.SimpleBindResult, err error) *Client_SimpleBind_Call {
_c.Call.Return(simpleBindResult, err)
return _c
}
func (_c *Client_SimpleBind_Call) RunAndReturn(run func(simpleBindRequest *ldap.SimpleBindRequest) (*ldap.SimpleBindResult, error)) *Client_SimpleBind_Call {
_c.Call.Return(run)
return _c
}
// Start provides a mock function for the type Client
func (_mock *Client) Start() {
_mock.Called()
return
}
// 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 for the type Client
func (_mock *Client) StartTLS(config *tls.Config) error {
ret := _mock.Called(config)
if len(ret) == 0 {
panic("no return value specified for StartTLS")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(*tls.Config) error); ok {
r0 = returnFunc(config)
} 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
// - config *tls.Config
func (_e *Client_Expecter) StartTLS(config interface{}) *Client_StartTLS_Call {
return &Client_StartTLS_Call{Call: _e.mock.On("StartTLS", config)}
}
func (_c *Client_StartTLS_Call) Run(run func(config *tls.Config)) *Client_StartTLS_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 *tls.Config
if args[0] != nil {
arg0 = args[0].(*tls.Config)
}
run(
arg0,
)
})
return _c
}
func (_c *Client_StartTLS_Call) Return(err error) *Client_StartTLS_Call {
_c.Call.Return(err)
return _c
}
func (_c *Client_StartTLS_Call) RunAndReturn(run func(config *tls.Config) error) *Client_StartTLS_Call {
_c.Call.Return(run)
return _c
}
// Syncrepl provides a mock function for the type Client
func (_mock *Client) Syncrepl(ctx context.Context, searchRequest *ldap.SearchRequest, bufferSize int, mode ldap.ControlSyncRequestMode, cookie []byte, reloadHint bool) ldap.Response {
ret := _mock.Called(ctx, searchRequest, bufferSize, mode, cookie, reloadHint)
if len(ret) == 0 {
panic("no return value specified for Syncrepl")
}
var r0 ldap.Response
if returnFunc, ok := ret.Get(0).(func(context.Context, *ldap.SearchRequest, int, ldap.ControlSyncRequestMode, []byte, bool) ldap.Response); ok {
r0 = returnFunc(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) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 *ldap.SearchRequest
if args[1] != nil {
arg1 = args[1].(*ldap.SearchRequest)
}
var arg2 int
if args[2] != nil {
arg2 = args[2].(int)
}
var arg3 ldap.ControlSyncRequestMode
if args[3] != nil {
arg3 = args[3].(ldap.ControlSyncRequestMode)
}
var arg4 []byte
if args[4] != nil {
arg4 = args[4].([]byte)
}
var arg5 bool
if args[5] != nil {
arg5 = args[5].(bool)
}
run(
arg0,
arg1,
arg2,
arg3,
arg4,
arg5,
)
})
return _c
}
func (_c *Client_Syncrepl_Call) Return(response ldap.Response) *Client_Syncrepl_Call {
_c.Call.Return(response)
return _c
}
func (_c *Client_Syncrepl_Call) RunAndReturn(run func(ctx context.Context, searchRequest *ldap.SearchRequest, bufferSize int, mode ldap.ControlSyncRequestMode, cookie []byte, reloadHint bool) ldap.Response) *Client_Syncrepl_Call {
_c.Call.Return(run)
return _c
}
// TLSConnectionState provides a mock function for the type Client
func (_mock *Client) TLSConnectionState() (tls.ConnectionState, bool) {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for TLSConnectionState")
}
var r0 tls.ConnectionState
var r1 bool
if returnFunc, ok := ret.Get(0).(func() (tls.ConnectionState, bool)); ok {
return returnFunc()
}
if returnFunc, ok := ret.Get(0).(func() tls.ConnectionState); ok {
r0 = returnFunc()
} else {
r0 = ret.Get(0).(tls.ConnectionState)
}
if returnFunc, ok := ret.Get(1).(func() bool); ok {
r1 = returnFunc()
} 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(connectionState tls.ConnectionState, b bool) *Client_TLSConnectionState_Call {
_c.Call.Return(connectionState, b)
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 for the type Client
func (_mock *Client) UnauthenticatedBind(username string) error {
ret := _mock.Called(username)
if len(ret) == 0 {
panic("no return value specified for UnauthenticatedBind")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string) error); ok {
r0 = returnFunc(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) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
run(
arg0,
)
})
return _c
}
func (_c *Client_UnauthenticatedBind_Call) Return(err error) *Client_UnauthenticatedBind_Call {
_c.Call.Return(err)
return _c
}
func (_c *Client_UnauthenticatedBind_Call) RunAndReturn(run func(username string) error) *Client_UnauthenticatedBind_Call {
_c.Call.Return(run)
return _c
}
// Unbind provides a mock function for the type Client
func (_mock *Client) Unbind() error {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for Unbind")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func() error); ok {
r0 = returnFunc()
} 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(err error) *Client_Unbind_Call {
_c.Call.Return(err)
return _c
}
func (_c *Client_Unbind_Call) RunAndReturn(run func() error) *Client_Unbind_Call {
_c.Call.Return(run)
return _c
}