github.com/mattermosttest/mattermost-server/v5@v5.0.0-20200917143240-9dfa12e121f9/einterfaces/mocks/LdapInterface.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  // Regenerate this file using `make einterfaces-mocks`.
     4  
     5  package mocks
     6  
     7  import (
     8  	model "github.com/mattermost/mattermost-server/v5/model"
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // LdapInterface is an autogenerated mock type for the LdapInterface type
    13  type LdapInterface struct {
    14  	mock.Mock
    15  }
    16  
    17  // CheckPassword provides a mock function with given fields: id, password
    18  func (_m *LdapInterface) CheckPassword(id string, password string) *model.AppError {
    19  	ret := _m.Called(id, password)
    20  
    21  	var r0 *model.AppError
    22  	if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok {
    23  		r0 = rf(id, password)
    24  	} else {
    25  		if ret.Get(0) != nil {
    26  			r0 = ret.Get(0).(*model.AppError)
    27  		}
    28  	}
    29  
    30  	return r0
    31  }
    32  
    33  // CheckPasswordAuthData provides a mock function with given fields: authData, password
    34  func (_m *LdapInterface) CheckPasswordAuthData(authData string, password string) *model.AppError {
    35  	ret := _m.Called(authData, password)
    36  
    37  	var r0 *model.AppError
    38  	if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok {
    39  		r0 = rf(authData, password)
    40  	} else {
    41  		if ret.Get(0) != nil {
    42  			r0 = ret.Get(0).(*model.AppError)
    43  		}
    44  	}
    45  
    46  	return r0
    47  }
    48  
    49  // DoLogin provides a mock function with given fields: id, password
    50  func (_m *LdapInterface) DoLogin(id string, password string) (*model.User, *model.AppError) {
    51  	ret := _m.Called(id, password)
    52  
    53  	var r0 *model.User
    54  	if rf, ok := ret.Get(0).(func(string, string) *model.User); ok {
    55  		r0 = rf(id, password)
    56  	} else {
    57  		if ret.Get(0) != nil {
    58  			r0 = ret.Get(0).(*model.User)
    59  		}
    60  	}
    61  
    62  	var r1 *model.AppError
    63  	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
    64  		r1 = rf(id, password)
    65  	} else {
    66  		if ret.Get(1) != nil {
    67  			r1 = ret.Get(1).(*model.AppError)
    68  		}
    69  	}
    70  
    71  	return r0, r1
    72  }
    73  
    74  // FirstLoginSync provides a mock function with given fields: userID, userAuthService, userAuthData, email
    75  func (_m *LdapInterface) FirstLoginSync(userID string, userAuthService string, userAuthData string, email string) *model.AppError {
    76  	ret := _m.Called(userID, userAuthService, userAuthData, email)
    77  
    78  	var r0 *model.AppError
    79  	if rf, ok := ret.Get(0).(func(string, string, string, string) *model.AppError); ok {
    80  		r0 = rf(userID, userAuthService, userAuthData, email)
    81  	} else {
    82  		if ret.Get(0) != nil {
    83  			r0 = ret.Get(0).(*model.AppError)
    84  		}
    85  	}
    86  
    87  	return r0
    88  }
    89  
    90  // GetADLdapIdFromSAMLId provides a mock function with given fields: authData
    91  func (_m *LdapInterface) GetADLdapIdFromSAMLId(authData string) string {
    92  	ret := _m.Called(authData)
    93  
    94  	var r0 string
    95  	if rf, ok := ret.Get(0).(func(string) string); ok {
    96  		r0 = rf(authData)
    97  	} else {
    98  		r0 = ret.Get(0).(string)
    99  	}
   100  
   101  	return r0
   102  }
   103  
   104  // GetAllGroupsPage provides a mock function with given fields: page, perPage, opts
   105  func (_m *LdapInterface) GetAllGroupsPage(page int, perPage int, opts model.LdapGroupSearchOpts) ([]*model.Group, int, *model.AppError) {
   106  	ret := _m.Called(page, perPage, opts)
   107  
   108  	var r0 []*model.Group
   109  	if rf, ok := ret.Get(0).(func(int, int, model.LdapGroupSearchOpts) []*model.Group); ok {
   110  		r0 = rf(page, perPage, opts)
   111  	} else {
   112  		if ret.Get(0) != nil {
   113  			r0 = ret.Get(0).([]*model.Group)
   114  		}
   115  	}
   116  
   117  	var r1 int
   118  	if rf, ok := ret.Get(1).(func(int, int, model.LdapGroupSearchOpts) int); ok {
   119  		r1 = rf(page, perPage, opts)
   120  	} else {
   121  		r1 = ret.Get(1).(int)
   122  	}
   123  
   124  	var r2 *model.AppError
   125  	if rf, ok := ret.Get(2).(func(int, int, model.LdapGroupSearchOpts) *model.AppError); ok {
   126  		r2 = rf(page, perPage, opts)
   127  	} else {
   128  		if ret.Get(2) != nil {
   129  			r2 = ret.Get(2).(*model.AppError)
   130  		}
   131  	}
   132  
   133  	return r0, r1, r2
   134  }
   135  
   136  // GetAllLdapUsers provides a mock function with given fields:
   137  func (_m *LdapInterface) GetAllLdapUsers() ([]*model.User, *model.AppError) {
   138  	ret := _m.Called()
   139  
   140  	var r0 []*model.User
   141  	if rf, ok := ret.Get(0).(func() []*model.User); ok {
   142  		r0 = rf()
   143  	} else {
   144  		if ret.Get(0) != nil {
   145  			r0 = ret.Get(0).([]*model.User)
   146  		}
   147  	}
   148  
   149  	var r1 *model.AppError
   150  	if rf, ok := ret.Get(1).(func() *model.AppError); ok {
   151  		r1 = rf()
   152  	} else {
   153  		if ret.Get(1) != nil {
   154  			r1 = ret.Get(1).(*model.AppError)
   155  		}
   156  	}
   157  
   158  	return r0, r1
   159  }
   160  
   161  // GetGroup provides a mock function with given fields: groupUID
   162  func (_m *LdapInterface) GetGroup(groupUID string) (*model.Group, *model.AppError) {
   163  	ret := _m.Called(groupUID)
   164  
   165  	var r0 *model.Group
   166  	if rf, ok := ret.Get(0).(func(string) *model.Group); ok {
   167  		r0 = rf(groupUID)
   168  	} else {
   169  		if ret.Get(0) != nil {
   170  			r0 = ret.Get(0).(*model.Group)
   171  		}
   172  	}
   173  
   174  	var r1 *model.AppError
   175  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
   176  		r1 = rf(groupUID)
   177  	} else {
   178  		if ret.Get(1) != nil {
   179  			r1 = ret.Get(1).(*model.AppError)
   180  		}
   181  	}
   182  
   183  	return r0, r1
   184  }
   185  
   186  // GetUser provides a mock function with given fields: id
   187  func (_m *LdapInterface) GetUser(id string) (*model.User, *model.AppError) {
   188  	ret := _m.Called(id)
   189  
   190  	var r0 *model.User
   191  	if rf, ok := ret.Get(0).(func(string) *model.User); ok {
   192  		r0 = rf(id)
   193  	} else {
   194  		if ret.Get(0) != nil {
   195  			r0 = ret.Get(0).(*model.User)
   196  		}
   197  	}
   198  
   199  	var r1 *model.AppError
   200  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
   201  		r1 = rf(id)
   202  	} else {
   203  		if ret.Get(1) != nil {
   204  			r1 = ret.Get(1).(*model.AppError)
   205  		}
   206  	}
   207  
   208  	return r0, r1
   209  }
   210  
   211  // GetUserAttributes provides a mock function with given fields: id, attributes
   212  func (_m *LdapInterface) GetUserAttributes(id string, attributes []string) (map[string]string, *model.AppError) {
   213  	ret := _m.Called(id, attributes)
   214  
   215  	var r0 map[string]string
   216  	if rf, ok := ret.Get(0).(func(string, []string) map[string]string); ok {
   217  		r0 = rf(id, attributes)
   218  	} else {
   219  		if ret.Get(0) != nil {
   220  			r0 = ret.Get(0).(map[string]string)
   221  		}
   222  	}
   223  
   224  	var r1 *model.AppError
   225  	if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok {
   226  		r1 = rf(id, attributes)
   227  	} else {
   228  		if ret.Get(1) != nil {
   229  			r1 = ret.Get(1).(*model.AppError)
   230  		}
   231  	}
   232  
   233  	return r0, r1
   234  }
   235  
   236  // MigrateIDAttribute provides a mock function with given fields: toAttribute
   237  func (_m *LdapInterface) MigrateIDAttribute(toAttribute string) error {
   238  	ret := _m.Called(toAttribute)
   239  
   240  	var r0 error
   241  	if rf, ok := ret.Get(0).(func(string) error); ok {
   242  		r0 = rf(toAttribute)
   243  	} else {
   244  		r0 = ret.Error(0)
   245  	}
   246  
   247  	return r0
   248  }
   249  
   250  // RunTest provides a mock function with given fields:
   251  func (_m *LdapInterface) RunTest() *model.AppError {
   252  	ret := _m.Called()
   253  
   254  	var r0 *model.AppError
   255  	if rf, ok := ret.Get(0).(func() *model.AppError); ok {
   256  		r0 = rf()
   257  	} else {
   258  		if ret.Get(0) != nil {
   259  			r0 = ret.Get(0).(*model.AppError)
   260  		}
   261  	}
   262  
   263  	return r0
   264  }
   265  
   266  // StartSynchronizeJob provides a mock function with given fields: waitForJobToFinish
   267  func (_m *LdapInterface) StartSynchronizeJob(waitForJobToFinish bool) (*model.Job, *model.AppError) {
   268  	ret := _m.Called(waitForJobToFinish)
   269  
   270  	var r0 *model.Job
   271  	if rf, ok := ret.Get(0).(func(bool) *model.Job); ok {
   272  		r0 = rf(waitForJobToFinish)
   273  	} else {
   274  		if ret.Get(0) != nil {
   275  			r0 = ret.Get(0).(*model.Job)
   276  		}
   277  	}
   278  
   279  	var r1 *model.AppError
   280  	if rf, ok := ret.Get(1).(func(bool) *model.AppError); ok {
   281  		r1 = rf(waitForJobToFinish)
   282  	} else {
   283  		if ret.Get(1) != nil {
   284  			r1 = ret.Get(1).(*model.AppError)
   285  		}
   286  	}
   287  
   288  	return r0, r1
   289  }
   290  
   291  // SwitchToLdap provides a mock function with given fields: userId, ldapId, ldapPassword
   292  func (_m *LdapInterface) SwitchToLdap(userId string, ldapId string, ldapPassword string) *model.AppError {
   293  	ret := _m.Called(userId, ldapId, ldapPassword)
   294  
   295  	var r0 *model.AppError
   296  	if rf, ok := ret.Get(0).(func(string, string, string) *model.AppError); ok {
   297  		r0 = rf(userId, ldapId, ldapPassword)
   298  	} else {
   299  		if ret.Get(0) != nil {
   300  			r0 = ret.Get(0).(*model.AppError)
   301  		}
   302  	}
   303  
   304  	return r0
   305  }
   306  
   307  // UpdateProfilePictureIfNecessary provides a mock function with given fields: _a0, _a1
   308  func (_m *LdapInterface) UpdateProfilePictureIfNecessary(_a0 *model.User, _a1 *model.Session) {
   309  	_m.Called(_a0, _a1)
   310  }