github.com/vnforks/kid/v5@v5.22.1-0.20200408055009-b89d99c65676/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/vnforks/kid/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  // GetAllLdapUsers provides a mock function with given fields:
    91  func (_m *LdapInterface) GetAllLdapUsers() ([]*model.User, *model.AppError) {
    92  	ret := _m.Called()
    93  
    94  	var r0 []*model.User
    95  	if rf, ok := ret.Get(0).(func() []*model.User); ok {
    96  		r0 = rf()
    97  	} else {
    98  		if ret.Get(0) != nil {
    99  			r0 = ret.Get(0).([]*model.User)
   100  		}
   101  	}
   102  
   103  	var r1 *model.AppError
   104  	if rf, ok := ret.Get(1).(func() *model.AppError); ok {
   105  		r1 = rf()
   106  	} else {
   107  		if ret.Get(1) != nil {
   108  			r1 = ret.Get(1).(*model.AppError)
   109  		}
   110  	}
   111  
   112  	return r0, r1
   113  }
   114  
   115  // GetUser provides a mock function with given fields: id
   116  func (_m *LdapInterface) GetUser(id string) (*model.User, *model.AppError) {
   117  	ret := _m.Called(id)
   118  
   119  	var r0 *model.User
   120  	if rf, ok := ret.Get(0).(func(string) *model.User); ok {
   121  		r0 = rf(id)
   122  	} else {
   123  		if ret.Get(0) != nil {
   124  			r0 = ret.Get(0).(*model.User)
   125  		}
   126  	}
   127  
   128  	var r1 *model.AppError
   129  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
   130  		r1 = rf(id)
   131  	} else {
   132  		if ret.Get(1) != nil {
   133  			r1 = ret.Get(1).(*model.AppError)
   134  		}
   135  	}
   136  
   137  	return r0, r1
   138  }
   139  
   140  // GetUserAttributes provides a mock function with given fields: id, attributes
   141  func (_m *LdapInterface) GetUserAttributes(id string, attributes []string) (map[string]string, *model.AppError) {
   142  	ret := _m.Called(id, attributes)
   143  
   144  	var r0 map[string]string
   145  	if rf, ok := ret.Get(0).(func(string, []string) map[string]string); ok {
   146  		r0 = rf(id, attributes)
   147  	} else {
   148  		if ret.Get(0) != nil {
   149  			r0 = ret.Get(0).(map[string]string)
   150  		}
   151  	}
   152  
   153  	var r1 *model.AppError
   154  	if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok {
   155  		r1 = rf(id, attributes)
   156  	} else {
   157  		if ret.Get(1) != nil {
   158  			r1 = ret.Get(1).(*model.AppError)
   159  		}
   160  	}
   161  
   162  	return r0, r1
   163  }
   164  
   165  // MigrateIDAttribute provides a mock function with given fields: toAttribute
   166  func (_m *LdapInterface) MigrateIDAttribute(toAttribute string) error {
   167  	ret := _m.Called(toAttribute)
   168  
   169  	var r0 error
   170  	if rf, ok := ret.Get(0).(func(string) error); ok {
   171  		r0 = rf(toAttribute)
   172  	} else {
   173  		r0 = ret.Error(0)
   174  	}
   175  
   176  	return r0
   177  }
   178  
   179  // RunTest provides a mock function with given fields:
   180  func (_m *LdapInterface) RunTest() *model.AppError {
   181  	ret := _m.Called()
   182  
   183  	var r0 *model.AppError
   184  	if rf, ok := ret.Get(0).(func() *model.AppError); ok {
   185  		r0 = rf()
   186  	} else {
   187  		if ret.Get(0) != nil {
   188  			r0 = ret.Get(0).(*model.AppError)
   189  		}
   190  	}
   191  
   192  	return r0
   193  }
   194  
   195  // StartSynchronizeJob provides a mock function with given fields: waitForJobToFinish
   196  func (_m *LdapInterface) StartSynchronizeJob(waitForJobToFinish bool) (*model.Job, *model.AppError) {
   197  	ret := _m.Called(waitForJobToFinish)
   198  
   199  	var r0 *model.Job
   200  	if rf, ok := ret.Get(0).(func(bool) *model.Job); ok {
   201  		r0 = rf(waitForJobToFinish)
   202  	} else {
   203  		if ret.Get(0) != nil {
   204  			r0 = ret.Get(0).(*model.Job)
   205  		}
   206  	}
   207  
   208  	var r1 *model.AppError
   209  	if rf, ok := ret.Get(1).(func(bool) *model.AppError); ok {
   210  		r1 = rf(waitForJobToFinish)
   211  	} else {
   212  		if ret.Get(1) != nil {
   213  			r1 = ret.Get(1).(*model.AppError)
   214  		}
   215  	}
   216  
   217  	return r0, r1
   218  }
   219  
   220  // SwitchToLdap provides a mock function with given fields: userId, ldapId, ldapPassword
   221  func (_m *LdapInterface) SwitchToLdap(userId string, ldapId string, ldapPassword string) *model.AppError {
   222  	ret := _m.Called(userId, ldapId, ldapPassword)
   223  
   224  	var r0 *model.AppError
   225  	if rf, ok := ret.Get(0).(func(string, string, string) *model.AppError); ok {
   226  		r0 = rf(userId, ldapId, ldapPassword)
   227  	} else {
   228  		if ret.Get(0) != nil {
   229  			r0 = ret.Get(0).(*model.AppError)
   230  		}
   231  	}
   232  
   233  	return r0
   234  }