github.com/masterhung0112/hk_server/v5@v5.0.0-20220302090640-ec71aef15e1c/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/masterhung0112/hk_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  // DeleteFile provides a mock function with given fields: fileID
    68  func (_m *SearchEngineInterface) DeleteFile(fileID string) *model.AppError {
    69  	ret := _m.Called(fileID)
    70  
    71  	var r0 *model.AppError
    72  	if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
    73  		r0 = rf(fileID)
    74  	} else {
    75  		if ret.Get(0) != nil {
    76  			r0 = ret.Get(0).(*model.AppError)
    77  		}
    78  	}
    79  
    80  	return r0
    81  }
    82  
    83  // DeleteFilesBatch provides a mock function with given fields: endTime, limit
    84  func (_m *SearchEngineInterface) DeleteFilesBatch(endTime int64, limit int64) *model.AppError {
    85  	ret := _m.Called(endTime, limit)
    86  
    87  	var r0 *model.AppError
    88  	if rf, ok := ret.Get(0).(func(int64, int64) *model.AppError); ok {
    89  		r0 = rf(endTime, limit)
    90  	} else {
    91  		if ret.Get(0) != nil {
    92  			r0 = ret.Get(0).(*model.AppError)
    93  		}
    94  	}
    95  
    96  	return r0
    97  }
    98  
    99  // DeletePost provides a mock function with given fields: post
   100  func (_m *SearchEngineInterface) DeletePost(post *model.Post) *model.AppError {
   101  	ret := _m.Called(post)
   102  
   103  	var r0 *model.AppError
   104  	if rf, ok := ret.Get(0).(func(*model.Post) *model.AppError); ok {
   105  		r0 = rf(post)
   106  	} else {
   107  		if ret.Get(0) != nil {
   108  			r0 = ret.Get(0).(*model.AppError)
   109  		}
   110  	}
   111  
   112  	return r0
   113  }
   114  
   115  // DeletePostFiles provides a mock function with given fields: postID
   116  func (_m *SearchEngineInterface) DeletePostFiles(postID string) *model.AppError {
   117  	ret := _m.Called(postID)
   118  
   119  	var r0 *model.AppError
   120  	if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
   121  		r0 = rf(postID)
   122  	} else {
   123  		if ret.Get(0) != nil {
   124  			r0 = ret.Get(0).(*model.AppError)
   125  		}
   126  	}
   127  
   128  	return r0
   129  }
   130  
   131  // DeleteUser provides a mock function with given fields: user
   132  func (_m *SearchEngineInterface) DeleteUser(user *model.User) *model.AppError {
   133  	ret := _m.Called(user)
   134  
   135  	var r0 *model.AppError
   136  	if rf, ok := ret.Get(0).(func(*model.User) *model.AppError); ok {
   137  		r0 = rf(user)
   138  	} else {
   139  		if ret.Get(0) != nil {
   140  			r0 = ret.Get(0).(*model.AppError)
   141  		}
   142  	}
   143  
   144  	return r0
   145  }
   146  
   147  // DeleteUserFiles provides a mock function with given fields: userID
   148  func (_m *SearchEngineInterface) DeleteUserFiles(userID string) *model.AppError {
   149  	ret := _m.Called(userID)
   150  
   151  	var r0 *model.AppError
   152  	if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
   153  		r0 = rf(userID)
   154  	} else {
   155  		if ret.Get(0) != nil {
   156  			r0 = ret.Get(0).(*model.AppError)
   157  		}
   158  	}
   159  
   160  	return r0
   161  }
   162  
   163  // DeleteUserPosts provides a mock function with given fields: userID
   164  func (_m *SearchEngineInterface) DeleteUserPosts(userID string) *model.AppError {
   165  	ret := _m.Called(userID)
   166  
   167  	var r0 *model.AppError
   168  	if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
   169  		r0 = rf(userID)
   170  	} else {
   171  		if ret.Get(0) != nil {
   172  			r0 = ret.Get(0).(*model.AppError)
   173  		}
   174  	}
   175  
   176  	return r0
   177  }
   178  
   179  // GetFullVersion provides a mock function with given fields:
   180  func (_m *SearchEngineInterface) GetFullVersion() string {
   181  	ret := _m.Called()
   182  
   183  	var r0 string
   184  	if rf, ok := ret.Get(0).(func() string); ok {
   185  		r0 = rf()
   186  	} else {
   187  		r0 = ret.Get(0).(string)
   188  	}
   189  
   190  	return r0
   191  }
   192  
   193  // GetName provides a mock function with given fields:
   194  func (_m *SearchEngineInterface) GetName() string {
   195  	ret := _m.Called()
   196  
   197  	var r0 string
   198  	if rf, ok := ret.Get(0).(func() string); ok {
   199  		r0 = rf()
   200  	} else {
   201  		r0 = ret.Get(0).(string)
   202  	}
   203  
   204  	return r0
   205  }
   206  
   207  // GetPlugins provides a mock function with given fields:
   208  func (_m *SearchEngineInterface) GetPlugins() []string {
   209  	ret := _m.Called()
   210  
   211  	var r0 []string
   212  	if rf, ok := ret.Get(0).(func() []string); ok {
   213  		r0 = rf()
   214  	} else {
   215  		if ret.Get(0) != nil {
   216  			r0 = ret.Get(0).([]string)
   217  		}
   218  	}
   219  
   220  	return r0
   221  }
   222  
   223  // GetVersion provides a mock function with given fields:
   224  func (_m *SearchEngineInterface) GetVersion() int {
   225  	ret := _m.Called()
   226  
   227  	var r0 int
   228  	if rf, ok := ret.Get(0).(func() int); ok {
   229  		r0 = rf()
   230  	} else {
   231  		r0 = ret.Get(0).(int)
   232  	}
   233  
   234  	return r0
   235  }
   236  
   237  // IndexChannel provides a mock function with given fields: channel
   238  func (_m *SearchEngineInterface) IndexChannel(channel *model.Channel) *model.AppError {
   239  	ret := _m.Called(channel)
   240  
   241  	var r0 *model.AppError
   242  	if rf, ok := ret.Get(0).(func(*model.Channel) *model.AppError); ok {
   243  		r0 = rf(channel)
   244  	} else {
   245  		if ret.Get(0) != nil {
   246  			r0 = ret.Get(0).(*model.AppError)
   247  		}
   248  	}
   249  
   250  	return r0
   251  }
   252  
   253  // IndexFile provides a mock function with given fields: file, channelId
   254  func (_m *SearchEngineInterface) IndexFile(file *model.FileInfo, channelId string) *model.AppError {
   255  	ret := _m.Called(file, channelId)
   256  
   257  	var r0 *model.AppError
   258  	if rf, ok := ret.Get(0).(func(*model.FileInfo, string) *model.AppError); ok {
   259  		r0 = rf(file, channelId)
   260  	} else {
   261  		if ret.Get(0) != nil {
   262  			r0 = ret.Get(0).(*model.AppError)
   263  		}
   264  	}
   265  
   266  	return r0
   267  }
   268  
   269  // IndexPost provides a mock function with given fields: post, teamId
   270  func (_m *SearchEngineInterface) IndexPost(post *model.Post, teamId string) *model.AppError {
   271  	ret := _m.Called(post, teamId)
   272  
   273  	var r0 *model.AppError
   274  	if rf, ok := ret.Get(0).(func(*model.Post, string) *model.AppError); ok {
   275  		r0 = rf(post, teamId)
   276  	} else {
   277  		if ret.Get(0) != nil {
   278  			r0 = ret.Get(0).(*model.AppError)
   279  		}
   280  	}
   281  
   282  	return r0
   283  }
   284  
   285  // IndexUser provides a mock function with given fields: user, teamsIds, channelsIds
   286  func (_m *SearchEngineInterface) IndexUser(user *model.User, teamsIds []string, channelsIds []string) *model.AppError {
   287  	ret := _m.Called(user, teamsIds, channelsIds)
   288  
   289  	var r0 *model.AppError
   290  	if rf, ok := ret.Get(0).(func(*model.User, []string, []string) *model.AppError); ok {
   291  		r0 = rf(user, teamsIds, channelsIds)
   292  	} else {
   293  		if ret.Get(0) != nil {
   294  			r0 = ret.Get(0).(*model.AppError)
   295  		}
   296  	}
   297  
   298  	return r0
   299  }
   300  
   301  // IsActive provides a mock function with given fields:
   302  func (_m *SearchEngineInterface) IsActive() bool {
   303  	ret := _m.Called()
   304  
   305  	var r0 bool
   306  	if rf, ok := ret.Get(0).(func() bool); ok {
   307  		r0 = rf()
   308  	} else {
   309  		r0 = ret.Get(0).(bool)
   310  	}
   311  
   312  	return r0
   313  }
   314  
   315  // IsAutocompletionEnabled provides a mock function with given fields:
   316  func (_m *SearchEngineInterface) IsAutocompletionEnabled() bool {
   317  	ret := _m.Called()
   318  
   319  	var r0 bool
   320  	if rf, ok := ret.Get(0).(func() bool); ok {
   321  		r0 = rf()
   322  	} else {
   323  		r0 = ret.Get(0).(bool)
   324  	}
   325  
   326  	return r0
   327  }
   328  
   329  // IsIndexingEnabled provides a mock function with given fields:
   330  func (_m *SearchEngineInterface) IsIndexingEnabled() bool {
   331  	ret := _m.Called()
   332  
   333  	var r0 bool
   334  	if rf, ok := ret.Get(0).(func() bool); ok {
   335  		r0 = rf()
   336  	} else {
   337  		r0 = ret.Get(0).(bool)
   338  	}
   339  
   340  	return r0
   341  }
   342  
   343  // IsIndexingSync provides a mock function with given fields:
   344  func (_m *SearchEngineInterface) IsIndexingSync() bool {
   345  	ret := _m.Called()
   346  
   347  	var r0 bool
   348  	if rf, ok := ret.Get(0).(func() bool); ok {
   349  		r0 = rf()
   350  	} else {
   351  		r0 = ret.Get(0).(bool)
   352  	}
   353  
   354  	return r0
   355  }
   356  
   357  // IsSearchEnabled provides a mock function with given fields:
   358  func (_m *SearchEngineInterface) IsSearchEnabled() bool {
   359  	ret := _m.Called()
   360  
   361  	var r0 bool
   362  	if rf, ok := ret.Get(0).(func() bool); ok {
   363  		r0 = rf()
   364  	} else {
   365  		r0 = ret.Get(0).(bool)
   366  	}
   367  
   368  	return r0
   369  }
   370  
   371  // PurgeIndexes provides a mock function with given fields:
   372  func (_m *SearchEngineInterface) PurgeIndexes() *model.AppError {
   373  	ret := _m.Called()
   374  
   375  	var r0 *model.AppError
   376  	if rf, ok := ret.Get(0).(func() *model.AppError); ok {
   377  		r0 = rf()
   378  	} else {
   379  		if ret.Get(0) != nil {
   380  			r0 = ret.Get(0).(*model.AppError)
   381  		}
   382  	}
   383  
   384  	return r0
   385  }
   386  
   387  // RefreshIndexes provides a mock function with given fields:
   388  func (_m *SearchEngineInterface) RefreshIndexes() *model.AppError {
   389  	ret := _m.Called()
   390  
   391  	var r0 *model.AppError
   392  	if rf, ok := ret.Get(0).(func() *model.AppError); ok {
   393  		r0 = rf()
   394  	} else {
   395  		if ret.Get(0) != nil {
   396  			r0 = ret.Get(0).(*model.AppError)
   397  		}
   398  	}
   399  
   400  	return r0
   401  }
   402  
   403  // SearchChannels provides a mock function with given fields: teamId, term
   404  func (_m *SearchEngineInterface) SearchChannels(teamId string, term string) ([]string, *model.AppError) {
   405  	ret := _m.Called(teamId, term)
   406  
   407  	var r0 []string
   408  	if rf, ok := ret.Get(0).(func(string, string) []string); ok {
   409  		r0 = rf(teamId, term)
   410  	} else {
   411  		if ret.Get(0) != nil {
   412  			r0 = ret.Get(0).([]string)
   413  		}
   414  	}
   415  
   416  	var r1 *model.AppError
   417  	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
   418  		r1 = rf(teamId, term)
   419  	} else {
   420  		if ret.Get(1) != nil {
   421  			r1 = ret.Get(1).(*model.AppError)
   422  		}
   423  	}
   424  
   425  	return r0, r1
   426  }
   427  
   428  // SearchFiles provides a mock function with given fields: channels, searchParams, page, perPage
   429  func (_m *SearchEngineInterface) SearchFiles(channels *model.ChannelList, searchParams []*model.SearchParams, page int, perPage int) ([]string, *model.AppError) {
   430  	ret := _m.Called(channels, searchParams, page, perPage)
   431  
   432  	var r0 []string
   433  	if rf, ok := ret.Get(0).(func(*model.ChannelList, []*model.SearchParams, int, int) []string); ok {
   434  		r0 = rf(channels, searchParams, page, perPage)
   435  	} else {
   436  		if ret.Get(0) != nil {
   437  			r0 = ret.Get(0).([]string)
   438  		}
   439  	}
   440  
   441  	var r1 *model.AppError
   442  	if rf, ok := ret.Get(1).(func(*model.ChannelList, []*model.SearchParams, int, int) *model.AppError); ok {
   443  		r1 = rf(channels, searchParams, page, perPage)
   444  	} else {
   445  		if ret.Get(1) != nil {
   446  			r1 = ret.Get(1).(*model.AppError)
   447  		}
   448  	}
   449  
   450  	return r0, r1
   451  }
   452  
   453  // SearchPosts provides a mock function with given fields: channels, searchParams, page, perPage
   454  func (_m *SearchEngineInterface) SearchPosts(channels *model.ChannelList, searchParams []*model.SearchParams, page int, perPage int) ([]string, model.PostSearchMatches, *model.AppError) {
   455  	ret := _m.Called(channels, searchParams, page, perPage)
   456  
   457  	var r0 []string
   458  	if rf, ok := ret.Get(0).(func(*model.ChannelList, []*model.SearchParams, int, int) []string); ok {
   459  		r0 = rf(channels, searchParams, page, perPage)
   460  	} else {
   461  		if ret.Get(0) != nil {
   462  			r0 = ret.Get(0).([]string)
   463  		}
   464  	}
   465  
   466  	var r1 model.PostSearchMatches
   467  	if rf, ok := ret.Get(1).(func(*model.ChannelList, []*model.SearchParams, int, int) model.PostSearchMatches); ok {
   468  		r1 = rf(channels, searchParams, page, perPage)
   469  	} else {
   470  		if ret.Get(1) != nil {
   471  			r1 = ret.Get(1).(model.PostSearchMatches)
   472  		}
   473  	}
   474  
   475  	var r2 *model.AppError
   476  	if rf, ok := ret.Get(2).(func(*model.ChannelList, []*model.SearchParams, int, int) *model.AppError); ok {
   477  		r2 = rf(channels, searchParams, page, perPage)
   478  	} else {
   479  		if ret.Get(2) != nil {
   480  			r2 = ret.Get(2).(*model.AppError)
   481  		}
   482  	}
   483  
   484  	return r0, r1, r2
   485  }
   486  
   487  // SearchUsersInChannel provides a mock function with given fields: teamId, channelId, restrictedToChannels, term, options
   488  func (_m *SearchEngineInterface) SearchUsersInChannel(teamId string, channelId string, restrictedToChannels []string, term string, options *model.UserSearchOptions) ([]string, []string, *model.AppError) {
   489  	ret := _m.Called(teamId, channelId, restrictedToChannels, term, options)
   490  
   491  	var r0 []string
   492  	if rf, ok := ret.Get(0).(func(string, string, []string, string, *model.UserSearchOptions) []string); ok {
   493  		r0 = rf(teamId, channelId, restrictedToChannels, term, options)
   494  	} else {
   495  		if ret.Get(0) != nil {
   496  			r0 = ret.Get(0).([]string)
   497  		}
   498  	}
   499  
   500  	var r1 []string
   501  	if rf, ok := ret.Get(1).(func(string, string, []string, string, *model.UserSearchOptions) []string); ok {
   502  		r1 = rf(teamId, channelId, restrictedToChannels, term, options)
   503  	} else {
   504  		if ret.Get(1) != nil {
   505  			r1 = ret.Get(1).([]string)
   506  		}
   507  	}
   508  
   509  	var r2 *model.AppError
   510  	if rf, ok := ret.Get(2).(func(string, string, []string, string, *model.UserSearchOptions) *model.AppError); ok {
   511  		r2 = rf(teamId, channelId, restrictedToChannels, term, options)
   512  	} else {
   513  		if ret.Get(2) != nil {
   514  			r2 = ret.Get(2).(*model.AppError)
   515  		}
   516  	}
   517  
   518  	return r0, r1, r2
   519  }
   520  
   521  // SearchUsersInTeam provides a mock function with given fields: teamId, restrictedToChannels, term, options
   522  func (_m *SearchEngineInterface) SearchUsersInTeam(teamId string, restrictedToChannels []string, term string, options *model.UserSearchOptions) ([]string, *model.AppError) {
   523  	ret := _m.Called(teamId, restrictedToChannels, term, options)
   524  
   525  	var r0 []string
   526  	if rf, ok := ret.Get(0).(func(string, []string, string, *model.UserSearchOptions) []string); ok {
   527  		r0 = rf(teamId, restrictedToChannels, term, options)
   528  	} else {
   529  		if ret.Get(0) != nil {
   530  			r0 = ret.Get(0).([]string)
   531  		}
   532  	}
   533  
   534  	var r1 *model.AppError
   535  	if rf, ok := ret.Get(1).(func(string, []string, string, *model.UserSearchOptions) *model.AppError); ok {
   536  		r1 = rf(teamId, restrictedToChannels, term, options)
   537  	} else {
   538  		if ret.Get(1) != nil {
   539  			r1 = ret.Get(1).(*model.AppError)
   540  		}
   541  	}
   542  
   543  	return r0, r1
   544  }
   545  
   546  // Start provides a mock function with given fields:
   547  func (_m *SearchEngineInterface) Start() *model.AppError {
   548  	ret := _m.Called()
   549  
   550  	var r0 *model.AppError
   551  	if rf, ok := ret.Get(0).(func() *model.AppError); ok {
   552  		r0 = rf()
   553  	} else {
   554  		if ret.Get(0) != nil {
   555  			r0 = ret.Get(0).(*model.AppError)
   556  		}
   557  	}
   558  
   559  	return r0
   560  }
   561  
   562  // Stop provides a mock function with given fields:
   563  func (_m *SearchEngineInterface) Stop() *model.AppError {
   564  	ret := _m.Called()
   565  
   566  	var r0 *model.AppError
   567  	if rf, ok := ret.Get(0).(func() *model.AppError); ok {
   568  		r0 = rf()
   569  	} else {
   570  		if ret.Get(0) != nil {
   571  			r0 = ret.Get(0).(*model.AppError)
   572  		}
   573  	}
   574  
   575  	return r0
   576  }
   577  
   578  // TestConfig provides a mock function with given fields: cfg
   579  func (_m *SearchEngineInterface) TestConfig(cfg *model.Config) *model.AppError {
   580  	ret := _m.Called(cfg)
   581  
   582  	var r0 *model.AppError
   583  	if rf, ok := ret.Get(0).(func(*model.Config) *model.AppError); ok {
   584  		r0 = rf(cfg)
   585  	} else {
   586  		if ret.Get(0) != nil {
   587  			r0 = ret.Get(0).(*model.AppError)
   588  		}
   589  	}
   590  
   591  	return r0
   592  }
   593  
   594  // UpdateConfig provides a mock function with given fields: cfg
   595  func (_m *SearchEngineInterface) UpdateConfig(cfg *model.Config) {
   596  	_m.Called(cfg)
   597  }