github.com/mattermosttest/mattermost-server/v5@v5.0.0-20200917143240-9dfa12e121f9/services/searchengine/mocks/SearchEngineInterface.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 // Regenerate this file using `make searchengine-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 time "time" 12 ) 13 14 // SearchEngineInterface is an autogenerated mock type for the SearchEngineInterface type 15 type SearchEngineInterface struct { 16 mock.Mock 17 } 18 19 // DataRetentionDeleteIndexes provides a mock function with given fields: cutoff 20 func (_m *SearchEngineInterface) DataRetentionDeleteIndexes(cutoff time.Time) *model.AppError { 21 ret := _m.Called(cutoff) 22 23 var r0 *model.AppError 24 if rf, ok := ret.Get(0).(func(time.Time) *model.AppError); ok { 25 r0 = rf(cutoff) 26 } else { 27 if ret.Get(0) != nil { 28 r0 = ret.Get(0).(*model.AppError) 29 } 30 } 31 32 return r0 33 } 34 35 // DeleteChannel provides a mock function with given fields: channel 36 func (_m *SearchEngineInterface) DeleteChannel(channel *model.Channel) *model.AppError { 37 ret := _m.Called(channel) 38 39 var r0 *model.AppError 40 if rf, ok := ret.Get(0).(func(*model.Channel) *model.AppError); ok { 41 r0 = rf(channel) 42 } else { 43 if ret.Get(0) != nil { 44 r0 = ret.Get(0).(*model.AppError) 45 } 46 } 47 48 return r0 49 } 50 51 // DeleteChannelPosts provides a mock function with given fields: channelID 52 func (_m *SearchEngineInterface) DeleteChannelPosts(channelID string) *model.AppError { 53 ret := _m.Called(channelID) 54 55 var r0 *model.AppError 56 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 57 r0 = rf(channelID) 58 } else { 59 if ret.Get(0) != nil { 60 r0 = ret.Get(0).(*model.AppError) 61 } 62 } 63 64 return r0 65 } 66 67 // DeletePost provides a mock function with given fields: post 68 func (_m *SearchEngineInterface) DeletePost(post *model.Post) *model.AppError { 69 ret := _m.Called(post) 70 71 var r0 *model.AppError 72 if rf, ok := ret.Get(0).(func(*model.Post) *model.AppError); ok { 73 r0 = rf(post) 74 } else { 75 if ret.Get(0) != nil { 76 r0 = ret.Get(0).(*model.AppError) 77 } 78 } 79 80 return r0 81 } 82 83 // DeleteUser provides a mock function with given fields: user 84 func (_m *SearchEngineInterface) DeleteUser(user *model.User) *model.AppError { 85 ret := _m.Called(user) 86 87 var r0 *model.AppError 88 if rf, ok := ret.Get(0).(func(*model.User) *model.AppError); ok { 89 r0 = rf(user) 90 } else { 91 if ret.Get(0) != nil { 92 r0 = ret.Get(0).(*model.AppError) 93 } 94 } 95 96 return r0 97 } 98 99 // DeleteUserPosts provides a mock function with given fields: userID 100 func (_m *SearchEngineInterface) DeleteUserPosts(userID string) *model.AppError { 101 ret := _m.Called(userID) 102 103 var r0 *model.AppError 104 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 105 r0 = rf(userID) 106 } else { 107 if ret.Get(0) != nil { 108 r0 = ret.Get(0).(*model.AppError) 109 } 110 } 111 112 return r0 113 } 114 115 // GetName provides a mock function with given fields: 116 func (_m *SearchEngineInterface) GetName() string { 117 ret := _m.Called() 118 119 var r0 string 120 if rf, ok := ret.Get(0).(func() string); ok { 121 r0 = rf() 122 } else { 123 r0 = ret.Get(0).(string) 124 } 125 126 return r0 127 } 128 129 // GetVersion provides a mock function with given fields: 130 func (_m *SearchEngineInterface) GetVersion() int { 131 ret := _m.Called() 132 133 var r0 int 134 if rf, ok := ret.Get(0).(func() int); ok { 135 r0 = rf() 136 } else { 137 r0 = ret.Get(0).(int) 138 } 139 140 return r0 141 } 142 143 // IndexChannel provides a mock function with given fields: channel 144 func (_m *SearchEngineInterface) IndexChannel(channel *model.Channel) *model.AppError { 145 ret := _m.Called(channel) 146 147 var r0 *model.AppError 148 if rf, ok := ret.Get(0).(func(*model.Channel) *model.AppError); ok { 149 r0 = rf(channel) 150 } else { 151 if ret.Get(0) != nil { 152 r0 = ret.Get(0).(*model.AppError) 153 } 154 } 155 156 return r0 157 } 158 159 // IndexPost provides a mock function with given fields: post, teamId 160 func (_m *SearchEngineInterface) IndexPost(post *model.Post, teamId string) *model.AppError { 161 ret := _m.Called(post, teamId) 162 163 var r0 *model.AppError 164 if rf, ok := ret.Get(0).(func(*model.Post, string) *model.AppError); ok { 165 r0 = rf(post, teamId) 166 } else { 167 if ret.Get(0) != nil { 168 r0 = ret.Get(0).(*model.AppError) 169 } 170 } 171 172 return r0 173 } 174 175 // IndexUser provides a mock function with given fields: user, teamsIds, channelsIds 176 func (_m *SearchEngineInterface) IndexUser(user *model.User, teamsIds []string, channelsIds []string) *model.AppError { 177 ret := _m.Called(user, teamsIds, channelsIds) 178 179 var r0 *model.AppError 180 if rf, ok := ret.Get(0).(func(*model.User, []string, []string) *model.AppError); ok { 181 r0 = rf(user, teamsIds, channelsIds) 182 } else { 183 if ret.Get(0) != nil { 184 r0 = ret.Get(0).(*model.AppError) 185 } 186 } 187 188 return r0 189 } 190 191 // IsActive provides a mock function with given fields: 192 func (_m *SearchEngineInterface) IsActive() bool { 193 ret := _m.Called() 194 195 var r0 bool 196 if rf, ok := ret.Get(0).(func() bool); ok { 197 r0 = rf() 198 } else { 199 r0 = ret.Get(0).(bool) 200 } 201 202 return r0 203 } 204 205 // IsAutocompletionEnabled provides a mock function with given fields: 206 func (_m *SearchEngineInterface) IsAutocompletionEnabled() bool { 207 ret := _m.Called() 208 209 var r0 bool 210 if rf, ok := ret.Get(0).(func() bool); ok { 211 r0 = rf() 212 } else { 213 r0 = ret.Get(0).(bool) 214 } 215 216 return r0 217 } 218 219 // IsIndexingEnabled provides a mock function with given fields: 220 func (_m *SearchEngineInterface) IsIndexingEnabled() bool { 221 ret := _m.Called() 222 223 var r0 bool 224 if rf, ok := ret.Get(0).(func() bool); ok { 225 r0 = rf() 226 } else { 227 r0 = ret.Get(0).(bool) 228 } 229 230 return r0 231 } 232 233 // IsIndexingSync provides a mock function with given fields: 234 func (_m *SearchEngineInterface) IsIndexingSync() bool { 235 ret := _m.Called() 236 237 var r0 bool 238 if rf, ok := ret.Get(0).(func() bool); ok { 239 r0 = rf() 240 } else { 241 r0 = ret.Get(0).(bool) 242 } 243 244 return r0 245 } 246 247 // IsSearchEnabled provides a mock function with given fields: 248 func (_m *SearchEngineInterface) IsSearchEnabled() bool { 249 ret := _m.Called() 250 251 var r0 bool 252 if rf, ok := ret.Get(0).(func() bool); ok { 253 r0 = rf() 254 } else { 255 r0 = ret.Get(0).(bool) 256 } 257 258 return r0 259 } 260 261 // PurgeIndexes provides a mock function with given fields: 262 func (_m *SearchEngineInterface) PurgeIndexes() *model.AppError { 263 ret := _m.Called() 264 265 var r0 *model.AppError 266 if rf, ok := ret.Get(0).(func() *model.AppError); ok { 267 r0 = rf() 268 } else { 269 if ret.Get(0) != nil { 270 r0 = ret.Get(0).(*model.AppError) 271 } 272 } 273 274 return r0 275 } 276 277 // RefreshIndexes provides a mock function with given fields: 278 func (_m *SearchEngineInterface) RefreshIndexes() *model.AppError { 279 ret := _m.Called() 280 281 var r0 *model.AppError 282 if rf, ok := ret.Get(0).(func() *model.AppError); ok { 283 r0 = rf() 284 } else { 285 if ret.Get(0) != nil { 286 r0 = ret.Get(0).(*model.AppError) 287 } 288 } 289 290 return r0 291 } 292 293 // SearchChannels provides a mock function with given fields: teamId, term 294 func (_m *SearchEngineInterface) SearchChannels(teamId string, term string) ([]string, *model.AppError) { 295 ret := _m.Called(teamId, term) 296 297 var r0 []string 298 if rf, ok := ret.Get(0).(func(string, string) []string); ok { 299 r0 = rf(teamId, term) 300 } else { 301 if ret.Get(0) != nil { 302 r0 = ret.Get(0).([]string) 303 } 304 } 305 306 var r1 *model.AppError 307 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 308 r1 = rf(teamId, term) 309 } else { 310 if ret.Get(1) != nil { 311 r1 = ret.Get(1).(*model.AppError) 312 } 313 } 314 315 return r0, r1 316 } 317 318 // SearchPosts provides a mock function with given fields: channels, searchParams, page, perPage 319 func (_m *SearchEngineInterface) SearchPosts(channels *model.ChannelList, searchParams []*model.SearchParams, page int, perPage int) ([]string, model.PostSearchMatches, *model.AppError) { 320 ret := _m.Called(channels, searchParams, page, perPage) 321 322 var r0 []string 323 if rf, ok := ret.Get(0).(func(*model.ChannelList, []*model.SearchParams, int, int) []string); ok { 324 r0 = rf(channels, searchParams, page, perPage) 325 } else { 326 if ret.Get(0) != nil { 327 r0 = ret.Get(0).([]string) 328 } 329 } 330 331 var r1 model.PostSearchMatches 332 if rf, ok := ret.Get(1).(func(*model.ChannelList, []*model.SearchParams, int, int) model.PostSearchMatches); ok { 333 r1 = rf(channels, searchParams, page, perPage) 334 } else { 335 if ret.Get(1) != nil { 336 r1 = ret.Get(1).(model.PostSearchMatches) 337 } 338 } 339 340 var r2 *model.AppError 341 if rf, ok := ret.Get(2).(func(*model.ChannelList, []*model.SearchParams, int, int) *model.AppError); ok { 342 r2 = rf(channels, searchParams, page, perPage) 343 } else { 344 if ret.Get(2) != nil { 345 r2 = ret.Get(2).(*model.AppError) 346 } 347 } 348 349 return r0, r1, r2 350 } 351 352 // SearchUsersInChannel provides a mock function with given fields: teamId, channelId, restrictedToChannels, term, options 353 func (_m *SearchEngineInterface) SearchUsersInChannel(teamId string, channelId string, restrictedToChannels []string, term string, options *model.UserSearchOptions) ([]string, []string, *model.AppError) { 354 ret := _m.Called(teamId, channelId, restrictedToChannels, term, options) 355 356 var r0 []string 357 if rf, ok := ret.Get(0).(func(string, string, []string, string, *model.UserSearchOptions) []string); ok { 358 r0 = rf(teamId, channelId, restrictedToChannels, term, options) 359 } else { 360 if ret.Get(0) != nil { 361 r0 = ret.Get(0).([]string) 362 } 363 } 364 365 var r1 []string 366 if rf, ok := ret.Get(1).(func(string, string, []string, string, *model.UserSearchOptions) []string); ok { 367 r1 = rf(teamId, channelId, restrictedToChannels, term, options) 368 } else { 369 if ret.Get(1) != nil { 370 r1 = ret.Get(1).([]string) 371 } 372 } 373 374 var r2 *model.AppError 375 if rf, ok := ret.Get(2).(func(string, string, []string, string, *model.UserSearchOptions) *model.AppError); ok { 376 r2 = rf(teamId, channelId, restrictedToChannels, term, options) 377 } else { 378 if ret.Get(2) != nil { 379 r2 = ret.Get(2).(*model.AppError) 380 } 381 } 382 383 return r0, r1, r2 384 } 385 386 // SearchUsersInTeam provides a mock function with given fields: teamId, restrictedToChannels, term, options 387 func (_m *SearchEngineInterface) SearchUsersInTeam(teamId string, restrictedToChannels []string, term string, options *model.UserSearchOptions) ([]string, *model.AppError) { 388 ret := _m.Called(teamId, restrictedToChannels, term, options) 389 390 var r0 []string 391 if rf, ok := ret.Get(0).(func(string, []string, string, *model.UserSearchOptions) []string); ok { 392 r0 = rf(teamId, restrictedToChannels, term, options) 393 } else { 394 if ret.Get(0) != nil { 395 r0 = ret.Get(0).([]string) 396 } 397 } 398 399 var r1 *model.AppError 400 if rf, ok := ret.Get(1).(func(string, []string, string, *model.UserSearchOptions) *model.AppError); ok { 401 r1 = rf(teamId, restrictedToChannels, term, options) 402 } else { 403 if ret.Get(1) != nil { 404 r1 = ret.Get(1).(*model.AppError) 405 } 406 } 407 408 return r0, r1 409 } 410 411 // Start provides a mock function with given fields: 412 func (_m *SearchEngineInterface) Start() *model.AppError { 413 ret := _m.Called() 414 415 var r0 *model.AppError 416 if rf, ok := ret.Get(0).(func() *model.AppError); ok { 417 r0 = rf() 418 } else { 419 if ret.Get(0) != nil { 420 r0 = ret.Get(0).(*model.AppError) 421 } 422 } 423 424 return r0 425 } 426 427 // Stop provides a mock function with given fields: 428 func (_m *SearchEngineInterface) Stop() *model.AppError { 429 ret := _m.Called() 430 431 var r0 *model.AppError 432 if rf, ok := ret.Get(0).(func() *model.AppError); ok { 433 r0 = rf() 434 } else { 435 if ret.Get(0) != nil { 436 r0 = ret.Get(0).(*model.AppError) 437 } 438 } 439 440 return r0 441 } 442 443 // TestConfig provides a mock function with given fields: cfg 444 func (_m *SearchEngineInterface) TestConfig(cfg *model.Config) *model.AppError { 445 ret := _m.Called(cfg) 446 447 var r0 *model.AppError 448 if rf, ok := ret.Get(0).(func(*model.Config) *model.AppError); ok { 449 r0 = rf(cfg) 450 } else { 451 if ret.Get(0) != nil { 452 r0 = ret.Get(0).(*model.AppError) 453 } 454 } 455 456 return r0 457 } 458 459 // UpdateConfig provides a mock function with given fields: cfg 460 func (_m *SearchEngineInterface) UpdateConfig(cfg *model.Config) { 461 _m.Called(cfg) 462 }