mocks

package
v2.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LDAPClient

type LDAPClient struct {
	mock.Mock
}

LDAPClient is an autogenerated mock type for the LDAPClient type

func NewLDAPClient

func NewLDAPClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *LDAPClient

NewLDAPClient creates a new instance of LDAPClient. 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 (*LDAPClient) CreateEphemeralConnection

func (_m *LDAPClient) CreateEphemeralConnection() (ldapauth.LDAPConn, error)

CreateEphemeralConnection provides a mock function with given fields:

func (*LDAPClient) EXPECT added in v2.15.0

func (_m *LDAPClient) EXPECT() *LDAPClient_Expecter

type LDAPClient_CreateEphemeralConnection_Call added in v2.15.0

type LDAPClient_CreateEphemeralConnection_Call struct {
	*mock.Call
}

LDAPClient_CreateEphemeralConnection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateEphemeralConnection'

func (*LDAPClient_CreateEphemeralConnection_Call) Return added in v2.15.0

func (*LDAPClient_CreateEphemeralConnection_Call) Run added in v2.15.0

func (*LDAPClient_CreateEphemeralConnection_Call) RunAndReturn added in v2.15.0

type LDAPClient_Expecter added in v2.15.0

type LDAPClient_Expecter struct {
	// contains filtered or unexported fields
}

func (*LDAPClient_Expecter) CreateEphemeralConnection added in v2.15.0

func (_e *LDAPClient_Expecter) CreateEphemeralConnection() *LDAPClient_CreateEphemeralConnection_Call

CreateEphemeralConnection is a helper method to define mock.On call

type LDAPConn

type LDAPConn struct {
	mock.Mock
}

LDAPConn is an autogenerated mock type for the LDAPConn type

func NewLDAPConn

func NewLDAPConn(t interface {
	mock.TestingT
	Cleanup(func())
}) *LDAPConn

NewLDAPConn creates a new instance of LDAPConn. 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 (*LDAPConn) Bind

func (_m *LDAPConn) Bind(username string, password string) error

Bind provides a mock function with given fields: username, password

func (*LDAPConn) Close

func (_m *LDAPConn) Close() error

Close provides a mock function with given fields:

func (*LDAPConn) EXPECT added in v2.15.0

func (_m *LDAPConn) EXPECT() *LDAPConn_Expecter

func (*LDAPConn) Search

func (_m *LDAPConn) Search(searchRequest *ldap.SearchRequest) (*ldap.SearchResult, error)

Search provides a mock function with given fields: searchRequest

type LDAPConn_Bind_Call added in v2.15.0

type LDAPConn_Bind_Call struct {
	*mock.Call
}

LDAPConn_Bind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Bind'

func (*LDAPConn_Bind_Call) Return added in v2.15.0

func (_c *LDAPConn_Bind_Call) Return(_a0 error) *LDAPConn_Bind_Call

func (*LDAPConn_Bind_Call) Run added in v2.15.0

func (_c *LDAPConn_Bind_Call) Run(run func(username string, password string)) *LDAPConn_Bind_Call

func (*LDAPConn_Bind_Call) RunAndReturn added in v2.15.0

func (_c *LDAPConn_Bind_Call) RunAndReturn(run func(string, string) error) *LDAPConn_Bind_Call

type LDAPConn_Close_Call added in v2.15.0

type LDAPConn_Close_Call struct {
	*mock.Call
}

LDAPConn_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'

func (*LDAPConn_Close_Call) Return added in v2.15.0

func (*LDAPConn_Close_Call) Run added in v2.15.0

func (_c *LDAPConn_Close_Call) Run(run func()) *LDAPConn_Close_Call

func (*LDAPConn_Close_Call) RunAndReturn added in v2.15.0

func (_c *LDAPConn_Close_Call) RunAndReturn(run func() error) *LDAPConn_Close_Call

type LDAPConn_Expecter added in v2.15.0

type LDAPConn_Expecter struct {
	// contains filtered or unexported fields
}

func (*LDAPConn_Expecter) Bind added in v2.15.0

func (_e *LDAPConn_Expecter) Bind(username interface{}, password interface{}) *LDAPConn_Bind_Call

Bind is a helper method to define mock.On call

  • username string
  • password string

func (*LDAPConn_Expecter) Close added in v2.15.0

Close is a helper method to define mock.On call

func (*LDAPConn_Expecter) Search added in v2.15.0

func (_e *LDAPConn_Expecter) Search(searchRequest interface{}) *LDAPConn_Search_Call

Search is a helper method to define mock.On call

  • searchRequest *ldap.SearchRequest

type LDAPConn_Search_Call added in v2.15.0

type LDAPConn_Search_Call struct {
	*mock.Call
}

LDAPConn_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search'

func (*LDAPConn_Search_Call) Return added in v2.15.0

func (*LDAPConn_Search_Call) Run added in v2.15.0

func (_c *LDAPConn_Search_Call) Run(run func(searchRequest *ldap.SearchRequest)) *LDAPConn_Search_Call

func (*LDAPConn_Search_Call) RunAndReturn added in v2.15.0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL