github.com/mattermosttest/mattermost-server/v5@v5.0.0-20200917143240-9dfa12e121f9/store/storetest/mocks/ChannelStore.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  // Regenerate this file using `make store-mocks`.
     4  
     5  package mocks
     6  
     7  import (
     8  	model "github.com/mattermost/mattermost-server/v5/model"
     9  	store "github.com/mattermost/mattermost-server/v5/store"
    10  	mock "github.com/stretchr/testify/mock"
    11  )
    12  
    13  // ChannelStore is an autogenerated mock type for the ChannelStore type
    14  type ChannelStore struct {
    15  	mock.Mock
    16  }
    17  
    18  // AnalyticsDeletedTypeCount provides a mock function with given fields: teamId, channelType
    19  func (_m *ChannelStore) AnalyticsDeletedTypeCount(teamId string, channelType string) (int64, *model.AppError) {
    20  	ret := _m.Called(teamId, channelType)
    21  
    22  	var r0 int64
    23  	if rf, ok := ret.Get(0).(func(string, string) int64); ok {
    24  		r0 = rf(teamId, channelType)
    25  	} else {
    26  		r0 = ret.Get(0).(int64)
    27  	}
    28  
    29  	var r1 *model.AppError
    30  	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
    31  		r1 = rf(teamId, channelType)
    32  	} else {
    33  		if ret.Get(1) != nil {
    34  			r1 = ret.Get(1).(*model.AppError)
    35  		}
    36  	}
    37  
    38  	return r0, r1
    39  }
    40  
    41  // AnalyticsTypeCount provides a mock function with given fields: teamId, channelType
    42  func (_m *ChannelStore) AnalyticsTypeCount(teamId string, channelType string) (int64, *model.AppError) {
    43  	ret := _m.Called(teamId, channelType)
    44  
    45  	var r0 int64
    46  	if rf, ok := ret.Get(0).(func(string, string) int64); ok {
    47  		r0 = rf(teamId, channelType)
    48  	} else {
    49  		r0 = ret.Get(0).(int64)
    50  	}
    51  
    52  	var r1 *model.AppError
    53  	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
    54  		r1 = rf(teamId, channelType)
    55  	} else {
    56  		if ret.Get(1) != nil {
    57  			r1 = ret.Get(1).(*model.AppError)
    58  		}
    59  	}
    60  
    61  	return r0, r1
    62  }
    63  
    64  // AutocompleteInTeam provides a mock function with given fields: teamId, term, includeDeleted
    65  func (_m *ChannelStore) AutocompleteInTeam(teamId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) {
    66  	ret := _m.Called(teamId, term, includeDeleted)
    67  
    68  	var r0 *model.ChannelList
    69  	if rf, ok := ret.Get(0).(func(string, string, bool) *model.ChannelList); ok {
    70  		r0 = rf(teamId, term, includeDeleted)
    71  	} else {
    72  		if ret.Get(0) != nil {
    73  			r0 = ret.Get(0).(*model.ChannelList)
    74  		}
    75  	}
    76  
    77  	var r1 *model.AppError
    78  	if rf, ok := ret.Get(1).(func(string, string, bool) *model.AppError); ok {
    79  		r1 = rf(teamId, term, includeDeleted)
    80  	} else {
    81  		if ret.Get(1) != nil {
    82  			r1 = ret.Get(1).(*model.AppError)
    83  		}
    84  	}
    85  
    86  	return r0, r1
    87  }
    88  
    89  // AutocompleteInTeamForSearch provides a mock function with given fields: teamId, userId, term, includeDeleted
    90  func (_m *ChannelStore) AutocompleteInTeamForSearch(teamId string, userId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) {
    91  	ret := _m.Called(teamId, userId, term, includeDeleted)
    92  
    93  	var r0 *model.ChannelList
    94  	if rf, ok := ret.Get(0).(func(string, string, string, bool) *model.ChannelList); ok {
    95  		r0 = rf(teamId, userId, term, includeDeleted)
    96  	} else {
    97  		if ret.Get(0) != nil {
    98  			r0 = ret.Get(0).(*model.ChannelList)
    99  		}
   100  	}
   101  
   102  	var r1 *model.AppError
   103  	if rf, ok := ret.Get(1).(func(string, string, string, bool) *model.AppError); ok {
   104  		r1 = rf(teamId, userId, term, includeDeleted)
   105  	} else {
   106  		if ret.Get(1) != nil {
   107  			r1 = ret.Get(1).(*model.AppError)
   108  		}
   109  	}
   110  
   111  	return r0, r1
   112  }
   113  
   114  // ClearAllCustomRoleAssignments provides a mock function with given fields:
   115  func (_m *ChannelStore) ClearAllCustomRoleAssignments() *model.AppError {
   116  	ret := _m.Called()
   117  
   118  	var r0 *model.AppError
   119  	if rf, ok := ret.Get(0).(func() *model.AppError); ok {
   120  		r0 = rf()
   121  	} else {
   122  		if ret.Get(0) != nil {
   123  			r0 = ret.Get(0).(*model.AppError)
   124  		}
   125  	}
   126  
   127  	return r0
   128  }
   129  
   130  // ClearCaches provides a mock function with given fields:
   131  func (_m *ChannelStore) ClearCaches() {
   132  	_m.Called()
   133  }
   134  
   135  // ClearSidebarOnTeamLeave provides a mock function with given fields: userId, teamId
   136  func (_m *ChannelStore) ClearSidebarOnTeamLeave(userId string, teamId string) *model.AppError {
   137  	ret := _m.Called(userId, teamId)
   138  
   139  	var r0 *model.AppError
   140  	if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok {
   141  		r0 = rf(userId, teamId)
   142  	} else {
   143  		if ret.Get(0) != nil {
   144  			r0 = ret.Get(0).(*model.AppError)
   145  		}
   146  	}
   147  
   148  	return r0
   149  }
   150  
   151  // CountPostsAfter provides a mock function with given fields: channelId, timestamp, userId
   152  func (_m *ChannelStore) CountPostsAfter(channelId string, timestamp int64, userId string) (int, *model.AppError) {
   153  	ret := _m.Called(channelId, timestamp, userId)
   154  
   155  	var r0 int
   156  	if rf, ok := ret.Get(0).(func(string, int64, string) int); ok {
   157  		r0 = rf(channelId, timestamp, userId)
   158  	} else {
   159  		r0 = ret.Get(0).(int)
   160  	}
   161  
   162  	var r1 *model.AppError
   163  	if rf, ok := ret.Get(1).(func(string, int64, string) *model.AppError); ok {
   164  		r1 = rf(channelId, timestamp, userId)
   165  	} else {
   166  		if ret.Get(1) != nil {
   167  			r1 = ret.Get(1).(*model.AppError)
   168  		}
   169  	}
   170  
   171  	return r0, r1
   172  }
   173  
   174  // CreateDirectChannel provides a mock function with given fields: userId, otherUserId
   175  func (_m *ChannelStore) CreateDirectChannel(userId *model.User, otherUserId *model.User) (*model.Channel, error) {
   176  	ret := _m.Called(userId, otherUserId)
   177  
   178  	var r0 *model.Channel
   179  	if rf, ok := ret.Get(0).(func(*model.User, *model.User) *model.Channel); ok {
   180  		r0 = rf(userId, otherUserId)
   181  	} else {
   182  		if ret.Get(0) != nil {
   183  			r0 = ret.Get(0).(*model.Channel)
   184  		}
   185  	}
   186  
   187  	var r1 error
   188  	if rf, ok := ret.Get(1).(func(*model.User, *model.User) error); ok {
   189  		r1 = rf(userId, otherUserId)
   190  	} else {
   191  		r1 = ret.Error(1)
   192  	}
   193  
   194  	return r0, r1
   195  }
   196  
   197  // CreateInitialSidebarCategories provides a mock function with given fields: userId, teamId
   198  func (_m *ChannelStore) CreateInitialSidebarCategories(userId string, teamId string) error {
   199  	ret := _m.Called(userId, teamId)
   200  
   201  	var r0 error
   202  	if rf, ok := ret.Get(0).(func(string, string) error); ok {
   203  		r0 = rf(userId, teamId)
   204  	} else {
   205  		r0 = ret.Error(0)
   206  	}
   207  
   208  	return r0
   209  }
   210  
   211  // CreateSidebarCategory provides a mock function with given fields: userId, teamId, newCategory
   212  func (_m *ChannelStore) CreateSidebarCategory(userId string, teamId string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, *model.AppError) {
   213  	ret := _m.Called(userId, teamId, newCategory)
   214  
   215  	var r0 *model.SidebarCategoryWithChannels
   216  	if rf, ok := ret.Get(0).(func(string, string, *model.SidebarCategoryWithChannels) *model.SidebarCategoryWithChannels); ok {
   217  		r0 = rf(userId, teamId, newCategory)
   218  	} else {
   219  		if ret.Get(0) != nil {
   220  			r0 = ret.Get(0).(*model.SidebarCategoryWithChannels)
   221  		}
   222  	}
   223  
   224  	var r1 *model.AppError
   225  	if rf, ok := ret.Get(1).(func(string, string, *model.SidebarCategoryWithChannels) *model.AppError); ok {
   226  		r1 = rf(userId, teamId, newCategory)
   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  // Delete provides a mock function with given fields: channelId, time
   237  func (_m *ChannelStore) Delete(channelId string, time int64) error {
   238  	ret := _m.Called(channelId, time)
   239  
   240  	var r0 error
   241  	if rf, ok := ret.Get(0).(func(string, int64) error); ok {
   242  		r0 = rf(channelId, time)
   243  	} else {
   244  		r0 = ret.Error(0)
   245  	}
   246  
   247  	return r0
   248  }
   249  
   250  // DeleteSidebarCategory provides a mock function with given fields: categoryId
   251  func (_m *ChannelStore) DeleteSidebarCategory(categoryId string) *model.AppError {
   252  	ret := _m.Called(categoryId)
   253  
   254  	var r0 *model.AppError
   255  	if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
   256  		r0 = rf(categoryId)
   257  	} else {
   258  		if ret.Get(0) != nil {
   259  			r0 = ret.Get(0).(*model.AppError)
   260  		}
   261  	}
   262  
   263  	return r0
   264  }
   265  
   266  // DeleteSidebarChannelsByPreferences provides a mock function with given fields: preferences
   267  func (_m *ChannelStore) DeleteSidebarChannelsByPreferences(preferences *model.Preferences) error {
   268  	ret := _m.Called(preferences)
   269  
   270  	var r0 error
   271  	if rf, ok := ret.Get(0).(func(*model.Preferences) error); ok {
   272  		r0 = rf(preferences)
   273  	} else {
   274  		r0 = ret.Error(0)
   275  	}
   276  
   277  	return r0
   278  }
   279  
   280  // Get provides a mock function with given fields: id, allowFromCache
   281  func (_m *ChannelStore) Get(id string, allowFromCache bool) (*model.Channel, error) {
   282  	ret := _m.Called(id, allowFromCache)
   283  
   284  	var r0 *model.Channel
   285  	if rf, ok := ret.Get(0).(func(string, bool) *model.Channel); ok {
   286  		r0 = rf(id, allowFromCache)
   287  	} else {
   288  		if ret.Get(0) != nil {
   289  			r0 = ret.Get(0).(*model.Channel)
   290  		}
   291  	}
   292  
   293  	var r1 error
   294  	if rf, ok := ret.Get(1).(func(string, bool) error); ok {
   295  		r1 = rf(id, allowFromCache)
   296  	} else {
   297  		r1 = ret.Error(1)
   298  	}
   299  
   300  	return r0, r1
   301  }
   302  
   303  // GetAll provides a mock function with given fields: teamId
   304  func (_m *ChannelStore) GetAll(teamId string) ([]*model.Channel, *model.AppError) {
   305  	ret := _m.Called(teamId)
   306  
   307  	var r0 []*model.Channel
   308  	if rf, ok := ret.Get(0).(func(string) []*model.Channel); ok {
   309  		r0 = rf(teamId)
   310  	} else {
   311  		if ret.Get(0) != nil {
   312  			r0 = ret.Get(0).([]*model.Channel)
   313  		}
   314  	}
   315  
   316  	var r1 *model.AppError
   317  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
   318  		r1 = rf(teamId)
   319  	} else {
   320  		if ret.Get(1) != nil {
   321  			r1 = ret.Get(1).(*model.AppError)
   322  		}
   323  	}
   324  
   325  	return r0, r1
   326  }
   327  
   328  // GetAllChannelMembersForUser provides a mock function with given fields: userId, allowFromCache, includeDeleted
   329  func (_m *ChannelStore) GetAllChannelMembersForUser(userId string, allowFromCache bool, includeDeleted bool) (map[string]string, *model.AppError) {
   330  	ret := _m.Called(userId, allowFromCache, includeDeleted)
   331  
   332  	var r0 map[string]string
   333  	if rf, ok := ret.Get(0).(func(string, bool, bool) map[string]string); ok {
   334  		r0 = rf(userId, allowFromCache, includeDeleted)
   335  	} else {
   336  		if ret.Get(0) != nil {
   337  			r0 = ret.Get(0).(map[string]string)
   338  		}
   339  	}
   340  
   341  	var r1 *model.AppError
   342  	if rf, ok := ret.Get(1).(func(string, bool, bool) *model.AppError); ok {
   343  		r1 = rf(userId, allowFromCache, includeDeleted)
   344  	} else {
   345  		if ret.Get(1) != nil {
   346  			r1 = ret.Get(1).(*model.AppError)
   347  		}
   348  	}
   349  
   350  	return r0, r1
   351  }
   352  
   353  // GetAllChannelMembersNotifyPropsForChannel provides a mock function with given fields: channelId, allowFromCache
   354  func (_m *ChannelStore) GetAllChannelMembersNotifyPropsForChannel(channelId string, allowFromCache bool) (map[string]model.StringMap, *model.AppError) {
   355  	ret := _m.Called(channelId, allowFromCache)
   356  
   357  	var r0 map[string]model.StringMap
   358  	if rf, ok := ret.Get(0).(func(string, bool) map[string]model.StringMap); ok {
   359  		r0 = rf(channelId, allowFromCache)
   360  	} else {
   361  		if ret.Get(0) != nil {
   362  			r0 = ret.Get(0).(map[string]model.StringMap)
   363  		}
   364  	}
   365  
   366  	var r1 *model.AppError
   367  	if rf, ok := ret.Get(1).(func(string, bool) *model.AppError); ok {
   368  		r1 = rf(channelId, allowFromCache)
   369  	} else {
   370  		if ret.Get(1) != nil {
   371  			r1 = ret.Get(1).(*model.AppError)
   372  		}
   373  	}
   374  
   375  	return r0, r1
   376  }
   377  
   378  // GetAllChannels provides a mock function with given fields: page, perPage, opts
   379  func (_m *ChannelStore) GetAllChannels(page int, perPage int, opts store.ChannelSearchOpts) (*model.ChannelListWithTeamData, error) {
   380  	ret := _m.Called(page, perPage, opts)
   381  
   382  	var r0 *model.ChannelListWithTeamData
   383  	if rf, ok := ret.Get(0).(func(int, int, store.ChannelSearchOpts) *model.ChannelListWithTeamData); ok {
   384  		r0 = rf(page, perPage, opts)
   385  	} else {
   386  		if ret.Get(0) != nil {
   387  			r0 = ret.Get(0).(*model.ChannelListWithTeamData)
   388  		}
   389  	}
   390  
   391  	var r1 error
   392  	if rf, ok := ret.Get(1).(func(int, int, store.ChannelSearchOpts) error); ok {
   393  		r1 = rf(page, perPage, opts)
   394  	} else {
   395  		r1 = ret.Error(1)
   396  	}
   397  
   398  	return r0, r1
   399  }
   400  
   401  // GetAllChannelsCount provides a mock function with given fields: opts
   402  func (_m *ChannelStore) GetAllChannelsCount(opts store.ChannelSearchOpts) (int64, error) {
   403  	ret := _m.Called(opts)
   404  
   405  	var r0 int64
   406  	if rf, ok := ret.Get(0).(func(store.ChannelSearchOpts) int64); ok {
   407  		r0 = rf(opts)
   408  	} else {
   409  		r0 = ret.Get(0).(int64)
   410  	}
   411  
   412  	var r1 error
   413  	if rf, ok := ret.Get(1).(func(store.ChannelSearchOpts) error); ok {
   414  		r1 = rf(opts)
   415  	} else {
   416  		r1 = ret.Error(1)
   417  	}
   418  
   419  	return r0, r1
   420  }
   421  
   422  // GetAllChannelsForExportAfter provides a mock function with given fields: limit, afterId
   423  func (_m *ChannelStore) GetAllChannelsForExportAfter(limit int, afterId string) ([]*model.ChannelForExport, *model.AppError) {
   424  	ret := _m.Called(limit, afterId)
   425  
   426  	var r0 []*model.ChannelForExport
   427  	if rf, ok := ret.Get(0).(func(int, string) []*model.ChannelForExport); ok {
   428  		r0 = rf(limit, afterId)
   429  	} else {
   430  		if ret.Get(0) != nil {
   431  			r0 = ret.Get(0).([]*model.ChannelForExport)
   432  		}
   433  	}
   434  
   435  	var r1 *model.AppError
   436  	if rf, ok := ret.Get(1).(func(int, string) *model.AppError); ok {
   437  		r1 = rf(limit, afterId)
   438  	} else {
   439  		if ret.Get(1) != nil {
   440  			r1 = ret.Get(1).(*model.AppError)
   441  		}
   442  	}
   443  
   444  	return r0, r1
   445  }
   446  
   447  // GetAllDirectChannelsForExportAfter provides a mock function with given fields: limit, afterId
   448  func (_m *ChannelStore) GetAllDirectChannelsForExportAfter(limit int, afterId string) ([]*model.DirectChannelForExport, *model.AppError) {
   449  	ret := _m.Called(limit, afterId)
   450  
   451  	var r0 []*model.DirectChannelForExport
   452  	if rf, ok := ret.Get(0).(func(int, string) []*model.DirectChannelForExport); ok {
   453  		r0 = rf(limit, afterId)
   454  	} else {
   455  		if ret.Get(0) != nil {
   456  			r0 = ret.Get(0).([]*model.DirectChannelForExport)
   457  		}
   458  	}
   459  
   460  	var r1 *model.AppError
   461  	if rf, ok := ret.Get(1).(func(int, string) *model.AppError); ok {
   462  		r1 = rf(limit, afterId)
   463  	} else {
   464  		if ret.Get(1) != nil {
   465  			r1 = ret.Get(1).(*model.AppError)
   466  		}
   467  	}
   468  
   469  	return r0, r1
   470  }
   471  
   472  // GetByName provides a mock function with given fields: team_id, name, allowFromCache
   473  func (_m *ChannelStore) GetByName(team_id string, name string, allowFromCache bool) (*model.Channel, error) {
   474  	ret := _m.Called(team_id, name, allowFromCache)
   475  
   476  	var r0 *model.Channel
   477  	if rf, ok := ret.Get(0).(func(string, string, bool) *model.Channel); ok {
   478  		r0 = rf(team_id, name, allowFromCache)
   479  	} else {
   480  		if ret.Get(0) != nil {
   481  			r0 = ret.Get(0).(*model.Channel)
   482  		}
   483  	}
   484  
   485  	var r1 error
   486  	if rf, ok := ret.Get(1).(func(string, string, bool) error); ok {
   487  		r1 = rf(team_id, name, allowFromCache)
   488  	} else {
   489  		r1 = ret.Error(1)
   490  	}
   491  
   492  	return r0, r1
   493  }
   494  
   495  // GetByNameIncludeDeleted provides a mock function with given fields: team_id, name, allowFromCache
   496  func (_m *ChannelStore) GetByNameIncludeDeleted(team_id string, name string, allowFromCache bool) (*model.Channel, error) {
   497  	ret := _m.Called(team_id, name, allowFromCache)
   498  
   499  	var r0 *model.Channel
   500  	if rf, ok := ret.Get(0).(func(string, string, bool) *model.Channel); ok {
   501  		r0 = rf(team_id, name, allowFromCache)
   502  	} else {
   503  		if ret.Get(0) != nil {
   504  			r0 = ret.Get(0).(*model.Channel)
   505  		}
   506  	}
   507  
   508  	var r1 error
   509  	if rf, ok := ret.Get(1).(func(string, string, bool) error); ok {
   510  		r1 = rf(team_id, name, allowFromCache)
   511  	} else {
   512  		r1 = ret.Error(1)
   513  	}
   514  
   515  	return r0, r1
   516  }
   517  
   518  // GetByNames provides a mock function with given fields: team_id, names, allowFromCache
   519  func (_m *ChannelStore) GetByNames(team_id string, names []string, allowFromCache bool) ([]*model.Channel, error) {
   520  	ret := _m.Called(team_id, names, allowFromCache)
   521  
   522  	var r0 []*model.Channel
   523  	if rf, ok := ret.Get(0).(func(string, []string, bool) []*model.Channel); ok {
   524  		r0 = rf(team_id, names, allowFromCache)
   525  	} else {
   526  		if ret.Get(0) != nil {
   527  			r0 = ret.Get(0).([]*model.Channel)
   528  		}
   529  	}
   530  
   531  	var r1 error
   532  	if rf, ok := ret.Get(1).(func(string, []string, bool) error); ok {
   533  		r1 = rf(team_id, names, allowFromCache)
   534  	} else {
   535  		r1 = ret.Error(1)
   536  	}
   537  
   538  	return r0, r1
   539  }
   540  
   541  // GetChannelCounts provides a mock function with given fields: teamId, userId
   542  func (_m *ChannelStore) GetChannelCounts(teamId string, userId string) (*model.ChannelCounts, *model.AppError) {
   543  	ret := _m.Called(teamId, userId)
   544  
   545  	var r0 *model.ChannelCounts
   546  	if rf, ok := ret.Get(0).(func(string, string) *model.ChannelCounts); ok {
   547  		r0 = rf(teamId, userId)
   548  	} else {
   549  		if ret.Get(0) != nil {
   550  			r0 = ret.Get(0).(*model.ChannelCounts)
   551  		}
   552  	}
   553  
   554  	var r1 *model.AppError
   555  	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
   556  		r1 = rf(teamId, userId)
   557  	} else {
   558  		if ret.Get(1) != nil {
   559  			r1 = ret.Get(1).(*model.AppError)
   560  		}
   561  	}
   562  
   563  	return r0, r1
   564  }
   565  
   566  // GetChannelMembersForExport provides a mock function with given fields: userId, teamId
   567  func (_m *ChannelStore) GetChannelMembersForExport(userId string, teamId string) ([]*model.ChannelMemberForExport, *model.AppError) {
   568  	ret := _m.Called(userId, teamId)
   569  
   570  	var r0 []*model.ChannelMemberForExport
   571  	if rf, ok := ret.Get(0).(func(string, string) []*model.ChannelMemberForExport); ok {
   572  		r0 = rf(userId, teamId)
   573  	} else {
   574  		if ret.Get(0) != nil {
   575  			r0 = ret.Get(0).([]*model.ChannelMemberForExport)
   576  		}
   577  	}
   578  
   579  	var r1 *model.AppError
   580  	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
   581  		r1 = rf(userId, teamId)
   582  	} else {
   583  		if ret.Get(1) != nil {
   584  			r1 = ret.Get(1).(*model.AppError)
   585  		}
   586  	}
   587  
   588  	return r0, r1
   589  }
   590  
   591  // GetChannelMembersTimezones provides a mock function with given fields: channelId
   592  func (_m *ChannelStore) GetChannelMembersTimezones(channelId string) ([]model.StringMap, *model.AppError) {
   593  	ret := _m.Called(channelId)
   594  
   595  	var r0 []model.StringMap
   596  	if rf, ok := ret.Get(0).(func(string) []model.StringMap); ok {
   597  		r0 = rf(channelId)
   598  	} else {
   599  		if ret.Get(0) != nil {
   600  			r0 = ret.Get(0).([]model.StringMap)
   601  		}
   602  	}
   603  
   604  	var r1 *model.AppError
   605  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
   606  		r1 = rf(channelId)
   607  	} else {
   608  		if ret.Get(1) != nil {
   609  			r1 = ret.Get(1).(*model.AppError)
   610  		}
   611  	}
   612  
   613  	return r0, r1
   614  }
   615  
   616  // GetChannelUnread provides a mock function with given fields: channelId, userId
   617  func (_m *ChannelStore) GetChannelUnread(channelId string, userId string) (*model.ChannelUnread, *model.AppError) {
   618  	ret := _m.Called(channelId, userId)
   619  
   620  	var r0 *model.ChannelUnread
   621  	if rf, ok := ret.Get(0).(func(string, string) *model.ChannelUnread); ok {
   622  		r0 = rf(channelId, userId)
   623  	} else {
   624  		if ret.Get(0) != nil {
   625  			r0 = ret.Get(0).(*model.ChannelUnread)
   626  		}
   627  	}
   628  
   629  	var r1 *model.AppError
   630  	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
   631  		r1 = rf(channelId, userId)
   632  	} else {
   633  		if ret.Get(1) != nil {
   634  			r1 = ret.Get(1).(*model.AppError)
   635  		}
   636  	}
   637  
   638  	return r0, r1
   639  }
   640  
   641  // GetChannels provides a mock function with given fields: teamId, userId, includeDeleted, lastDeleteAt
   642  func (_m *ChannelStore) GetChannels(teamId string, userId string, includeDeleted bool, lastDeleteAt int) (*model.ChannelList, error) {
   643  	ret := _m.Called(teamId, userId, includeDeleted, lastDeleteAt)
   644  
   645  	var r0 *model.ChannelList
   646  	if rf, ok := ret.Get(0).(func(string, string, bool, int) *model.ChannelList); ok {
   647  		r0 = rf(teamId, userId, includeDeleted, lastDeleteAt)
   648  	} else {
   649  		if ret.Get(0) != nil {
   650  			r0 = ret.Get(0).(*model.ChannelList)
   651  		}
   652  	}
   653  
   654  	var r1 error
   655  	if rf, ok := ret.Get(1).(func(string, string, bool, int) error); ok {
   656  		r1 = rf(teamId, userId, includeDeleted, lastDeleteAt)
   657  	} else {
   658  		r1 = ret.Error(1)
   659  	}
   660  
   661  	return r0, r1
   662  }
   663  
   664  // GetChannelsBatchForIndexing provides a mock function with given fields: startTime, endTime, limit
   665  func (_m *ChannelStore) GetChannelsBatchForIndexing(startTime int64, endTime int64, limit int) ([]*model.Channel, *model.AppError) {
   666  	ret := _m.Called(startTime, endTime, limit)
   667  
   668  	var r0 []*model.Channel
   669  	if rf, ok := ret.Get(0).(func(int64, int64, int) []*model.Channel); ok {
   670  		r0 = rf(startTime, endTime, limit)
   671  	} else {
   672  		if ret.Get(0) != nil {
   673  			r0 = ret.Get(0).([]*model.Channel)
   674  		}
   675  	}
   676  
   677  	var r1 *model.AppError
   678  	if rf, ok := ret.Get(1).(func(int64, int64, int) *model.AppError); ok {
   679  		r1 = rf(startTime, endTime, limit)
   680  	} else {
   681  		if ret.Get(1) != nil {
   682  			r1 = ret.Get(1).(*model.AppError)
   683  		}
   684  	}
   685  
   686  	return r0, r1
   687  }
   688  
   689  // GetChannelsByIds provides a mock function with given fields: channelIds, includeDeleted
   690  func (_m *ChannelStore) GetChannelsByIds(channelIds []string, includeDeleted bool) ([]*model.Channel, *model.AppError) {
   691  	ret := _m.Called(channelIds, includeDeleted)
   692  
   693  	var r0 []*model.Channel
   694  	if rf, ok := ret.Get(0).(func([]string, bool) []*model.Channel); ok {
   695  		r0 = rf(channelIds, includeDeleted)
   696  	} else {
   697  		if ret.Get(0) != nil {
   698  			r0 = ret.Get(0).([]*model.Channel)
   699  		}
   700  	}
   701  
   702  	var r1 *model.AppError
   703  	if rf, ok := ret.Get(1).(func([]string, bool) *model.AppError); ok {
   704  		r1 = rf(channelIds, includeDeleted)
   705  	} else {
   706  		if ret.Get(1) != nil {
   707  			r1 = ret.Get(1).(*model.AppError)
   708  		}
   709  	}
   710  
   711  	return r0, r1
   712  }
   713  
   714  // GetChannelsByScheme provides a mock function with given fields: schemeId, offset, limit
   715  func (_m *ChannelStore) GetChannelsByScheme(schemeId string, offset int, limit int) (model.ChannelList, *model.AppError) {
   716  	ret := _m.Called(schemeId, offset, limit)
   717  
   718  	var r0 model.ChannelList
   719  	if rf, ok := ret.Get(0).(func(string, int, int) model.ChannelList); ok {
   720  		r0 = rf(schemeId, offset, limit)
   721  	} else {
   722  		if ret.Get(0) != nil {
   723  			r0 = ret.Get(0).(model.ChannelList)
   724  		}
   725  	}
   726  
   727  	var r1 *model.AppError
   728  	if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
   729  		r1 = rf(schemeId, offset, limit)
   730  	} else {
   731  		if ret.Get(1) != nil {
   732  			r1 = ret.Get(1).(*model.AppError)
   733  		}
   734  	}
   735  
   736  	return r0, r1
   737  }
   738  
   739  // GetDeleted provides a mock function with given fields: team_id, offset, limit, userId
   740  func (_m *ChannelStore) GetDeleted(team_id string, offset int, limit int, userId string) (*model.ChannelList, error) {
   741  	ret := _m.Called(team_id, offset, limit, userId)
   742  
   743  	var r0 *model.ChannelList
   744  	if rf, ok := ret.Get(0).(func(string, int, int, string) *model.ChannelList); ok {
   745  		r0 = rf(team_id, offset, limit, userId)
   746  	} else {
   747  		if ret.Get(0) != nil {
   748  			r0 = ret.Get(0).(*model.ChannelList)
   749  		}
   750  	}
   751  
   752  	var r1 error
   753  	if rf, ok := ret.Get(1).(func(string, int, int, string) error); ok {
   754  		r1 = rf(team_id, offset, limit, userId)
   755  	} else {
   756  		r1 = ret.Error(1)
   757  	}
   758  
   759  	return r0, r1
   760  }
   761  
   762  // GetDeletedByName provides a mock function with given fields: team_id, name
   763  func (_m *ChannelStore) GetDeletedByName(team_id string, name string) (*model.Channel, error) {
   764  	ret := _m.Called(team_id, name)
   765  
   766  	var r0 *model.Channel
   767  	if rf, ok := ret.Get(0).(func(string, string) *model.Channel); ok {
   768  		r0 = rf(team_id, name)
   769  	} else {
   770  		if ret.Get(0) != nil {
   771  			r0 = ret.Get(0).(*model.Channel)
   772  		}
   773  	}
   774  
   775  	var r1 error
   776  	if rf, ok := ret.Get(1).(func(string, string) error); ok {
   777  		r1 = rf(team_id, name)
   778  	} else {
   779  		r1 = ret.Error(1)
   780  	}
   781  
   782  	return r0, r1
   783  }
   784  
   785  // GetForPost provides a mock function with given fields: postId
   786  func (_m *ChannelStore) GetForPost(postId string) (*model.Channel, *model.AppError) {
   787  	ret := _m.Called(postId)
   788  
   789  	var r0 *model.Channel
   790  	if rf, ok := ret.Get(0).(func(string) *model.Channel); ok {
   791  		r0 = rf(postId)
   792  	} else {
   793  		if ret.Get(0) != nil {
   794  			r0 = ret.Get(0).(*model.Channel)
   795  		}
   796  	}
   797  
   798  	var r1 *model.AppError
   799  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
   800  		r1 = rf(postId)
   801  	} else {
   802  		if ret.Get(1) != nil {
   803  			r1 = ret.Get(1).(*model.AppError)
   804  		}
   805  	}
   806  
   807  	return r0, r1
   808  }
   809  
   810  // GetFromMaster provides a mock function with given fields: id
   811  func (_m *ChannelStore) GetFromMaster(id string) (*model.Channel, error) {
   812  	ret := _m.Called(id)
   813  
   814  	var r0 *model.Channel
   815  	if rf, ok := ret.Get(0).(func(string) *model.Channel); ok {
   816  		r0 = rf(id)
   817  	} else {
   818  		if ret.Get(0) != nil {
   819  			r0 = ret.Get(0).(*model.Channel)
   820  		}
   821  	}
   822  
   823  	var r1 error
   824  	if rf, ok := ret.Get(1).(func(string) error); ok {
   825  		r1 = rf(id)
   826  	} else {
   827  		r1 = ret.Error(1)
   828  	}
   829  
   830  	return r0, r1
   831  }
   832  
   833  // GetGuestCount provides a mock function with given fields: channelId, allowFromCache
   834  func (_m *ChannelStore) GetGuestCount(channelId string, allowFromCache bool) (int64, *model.AppError) {
   835  	ret := _m.Called(channelId, allowFromCache)
   836  
   837  	var r0 int64
   838  	if rf, ok := ret.Get(0).(func(string, bool) int64); ok {
   839  		r0 = rf(channelId, allowFromCache)
   840  	} else {
   841  		r0 = ret.Get(0).(int64)
   842  	}
   843  
   844  	var r1 *model.AppError
   845  	if rf, ok := ret.Get(1).(func(string, bool) *model.AppError); ok {
   846  		r1 = rf(channelId, allowFromCache)
   847  	} else {
   848  		if ret.Get(1) != nil {
   849  			r1 = ret.Get(1).(*model.AppError)
   850  		}
   851  	}
   852  
   853  	return r0, r1
   854  }
   855  
   856  // GetMember provides a mock function with given fields: channelId, userId
   857  func (_m *ChannelStore) GetMember(channelId string, userId string) (*model.ChannelMember, *model.AppError) {
   858  	ret := _m.Called(channelId, userId)
   859  
   860  	var r0 *model.ChannelMember
   861  	if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMember); ok {
   862  		r0 = rf(channelId, userId)
   863  	} else {
   864  		if ret.Get(0) != nil {
   865  			r0 = ret.Get(0).(*model.ChannelMember)
   866  		}
   867  	}
   868  
   869  	var r1 *model.AppError
   870  	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
   871  		r1 = rf(channelId, userId)
   872  	} else {
   873  		if ret.Get(1) != nil {
   874  			r1 = ret.Get(1).(*model.AppError)
   875  		}
   876  	}
   877  
   878  	return r0, r1
   879  }
   880  
   881  // GetMemberCount provides a mock function with given fields: channelId, allowFromCache
   882  func (_m *ChannelStore) GetMemberCount(channelId string, allowFromCache bool) (int64, *model.AppError) {
   883  	ret := _m.Called(channelId, allowFromCache)
   884  
   885  	var r0 int64
   886  	if rf, ok := ret.Get(0).(func(string, bool) int64); ok {
   887  		r0 = rf(channelId, allowFromCache)
   888  	} else {
   889  		r0 = ret.Get(0).(int64)
   890  	}
   891  
   892  	var r1 *model.AppError
   893  	if rf, ok := ret.Get(1).(func(string, bool) *model.AppError); ok {
   894  		r1 = rf(channelId, allowFromCache)
   895  	} else {
   896  		if ret.Get(1) != nil {
   897  			r1 = ret.Get(1).(*model.AppError)
   898  		}
   899  	}
   900  
   901  	return r0, r1
   902  }
   903  
   904  // GetMemberCountFromCache provides a mock function with given fields: channelId
   905  func (_m *ChannelStore) GetMemberCountFromCache(channelId string) int64 {
   906  	ret := _m.Called(channelId)
   907  
   908  	var r0 int64
   909  	if rf, ok := ret.Get(0).(func(string) int64); ok {
   910  		r0 = rf(channelId)
   911  	} else {
   912  		r0 = ret.Get(0).(int64)
   913  	}
   914  
   915  	return r0
   916  }
   917  
   918  // GetMemberCountsByGroup provides a mock function with given fields: channelID, includeTimezones
   919  func (_m *ChannelStore) GetMemberCountsByGroup(channelID string, includeTimezones bool) ([]*model.ChannelMemberCountByGroup, *model.AppError) {
   920  	ret := _m.Called(channelID, includeTimezones)
   921  
   922  	var r0 []*model.ChannelMemberCountByGroup
   923  	if rf, ok := ret.Get(0).(func(string, bool) []*model.ChannelMemberCountByGroup); ok {
   924  		r0 = rf(channelID, includeTimezones)
   925  	} else {
   926  		if ret.Get(0) != nil {
   927  			r0 = ret.Get(0).([]*model.ChannelMemberCountByGroup)
   928  		}
   929  	}
   930  
   931  	var r1 *model.AppError
   932  	if rf, ok := ret.Get(1).(func(string, bool) *model.AppError); ok {
   933  		r1 = rf(channelID, includeTimezones)
   934  	} else {
   935  		if ret.Get(1) != nil {
   936  			r1 = ret.Get(1).(*model.AppError)
   937  		}
   938  	}
   939  
   940  	return r0, r1
   941  }
   942  
   943  // GetMemberForPost provides a mock function with given fields: postId, userId
   944  func (_m *ChannelStore) GetMemberForPost(postId string, userId string) (*model.ChannelMember, *model.AppError) {
   945  	ret := _m.Called(postId, userId)
   946  
   947  	var r0 *model.ChannelMember
   948  	if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMember); ok {
   949  		r0 = rf(postId, userId)
   950  	} else {
   951  		if ret.Get(0) != nil {
   952  			r0 = ret.Get(0).(*model.ChannelMember)
   953  		}
   954  	}
   955  
   956  	var r1 *model.AppError
   957  	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
   958  		r1 = rf(postId, userId)
   959  	} else {
   960  		if ret.Get(1) != nil {
   961  			r1 = ret.Get(1).(*model.AppError)
   962  		}
   963  	}
   964  
   965  	return r0, r1
   966  }
   967  
   968  // GetMembers provides a mock function with given fields: channelId, offset, limit
   969  func (_m *ChannelStore) GetMembers(channelId string, offset int, limit int) (*model.ChannelMembers, *model.AppError) {
   970  	ret := _m.Called(channelId, offset, limit)
   971  
   972  	var r0 *model.ChannelMembers
   973  	if rf, ok := ret.Get(0).(func(string, int, int) *model.ChannelMembers); ok {
   974  		r0 = rf(channelId, offset, limit)
   975  	} else {
   976  		if ret.Get(0) != nil {
   977  			r0 = ret.Get(0).(*model.ChannelMembers)
   978  		}
   979  	}
   980  
   981  	var r1 *model.AppError
   982  	if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
   983  		r1 = rf(channelId, offset, limit)
   984  	} else {
   985  		if ret.Get(1) != nil {
   986  			r1 = ret.Get(1).(*model.AppError)
   987  		}
   988  	}
   989  
   990  	return r0, r1
   991  }
   992  
   993  // GetMembersByIds provides a mock function with given fields: channelId, userIds
   994  func (_m *ChannelStore) GetMembersByIds(channelId string, userIds []string) (*model.ChannelMembers, *model.AppError) {
   995  	ret := _m.Called(channelId, userIds)
   996  
   997  	var r0 *model.ChannelMembers
   998  	if rf, ok := ret.Get(0).(func(string, []string) *model.ChannelMembers); ok {
   999  		r0 = rf(channelId, userIds)
  1000  	} else {
  1001  		if ret.Get(0) != nil {
  1002  			r0 = ret.Get(0).(*model.ChannelMembers)
  1003  		}
  1004  	}
  1005  
  1006  	var r1 *model.AppError
  1007  	if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok {
  1008  		r1 = rf(channelId, userIds)
  1009  	} else {
  1010  		if ret.Get(1) != nil {
  1011  			r1 = ret.Get(1).(*model.AppError)
  1012  		}
  1013  	}
  1014  
  1015  	return r0, r1
  1016  }
  1017  
  1018  // GetMembersForUser provides a mock function with given fields: teamId, userId
  1019  func (_m *ChannelStore) GetMembersForUser(teamId string, userId string) (*model.ChannelMembers, *model.AppError) {
  1020  	ret := _m.Called(teamId, userId)
  1021  
  1022  	var r0 *model.ChannelMembers
  1023  	if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMembers); ok {
  1024  		r0 = rf(teamId, userId)
  1025  	} else {
  1026  		if ret.Get(0) != nil {
  1027  			r0 = ret.Get(0).(*model.ChannelMembers)
  1028  		}
  1029  	}
  1030  
  1031  	var r1 *model.AppError
  1032  	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
  1033  		r1 = rf(teamId, userId)
  1034  	} else {
  1035  		if ret.Get(1) != nil {
  1036  			r1 = ret.Get(1).(*model.AppError)
  1037  		}
  1038  	}
  1039  
  1040  	return r0, r1
  1041  }
  1042  
  1043  // GetMembersForUserWithPagination provides a mock function with given fields: teamId, userId, page, perPage
  1044  func (_m *ChannelStore) GetMembersForUserWithPagination(teamId string, userId string, page int, perPage int) (*model.ChannelMembers, *model.AppError) {
  1045  	ret := _m.Called(teamId, userId, page, perPage)
  1046  
  1047  	var r0 *model.ChannelMembers
  1048  	if rf, ok := ret.Get(0).(func(string, string, int, int) *model.ChannelMembers); ok {
  1049  		r0 = rf(teamId, userId, page, perPage)
  1050  	} else {
  1051  		if ret.Get(0) != nil {
  1052  			r0 = ret.Get(0).(*model.ChannelMembers)
  1053  		}
  1054  	}
  1055  
  1056  	var r1 *model.AppError
  1057  	if rf, ok := ret.Get(1).(func(string, string, int, int) *model.AppError); ok {
  1058  		r1 = rf(teamId, userId, page, perPage)
  1059  	} else {
  1060  		if ret.Get(1) != nil {
  1061  			r1 = ret.Get(1).(*model.AppError)
  1062  		}
  1063  	}
  1064  
  1065  	return r0, r1
  1066  }
  1067  
  1068  // GetMoreChannels provides a mock function with given fields: teamId, userId, offset, limit
  1069  func (_m *ChannelStore) GetMoreChannels(teamId string, userId string, offset int, limit int) (*model.ChannelList, error) {
  1070  	ret := _m.Called(teamId, userId, offset, limit)
  1071  
  1072  	var r0 *model.ChannelList
  1073  	if rf, ok := ret.Get(0).(func(string, string, int, int) *model.ChannelList); ok {
  1074  		r0 = rf(teamId, userId, offset, limit)
  1075  	} else {
  1076  		if ret.Get(0) != nil {
  1077  			r0 = ret.Get(0).(*model.ChannelList)
  1078  		}
  1079  	}
  1080  
  1081  	var r1 error
  1082  	if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok {
  1083  		r1 = rf(teamId, userId, offset, limit)
  1084  	} else {
  1085  		r1 = ret.Error(1)
  1086  	}
  1087  
  1088  	return r0, r1
  1089  }
  1090  
  1091  // GetPinnedPostCount provides a mock function with given fields: channelId, allowFromCache
  1092  func (_m *ChannelStore) GetPinnedPostCount(channelId string, allowFromCache bool) (int64, *model.AppError) {
  1093  	ret := _m.Called(channelId, allowFromCache)
  1094  
  1095  	var r0 int64
  1096  	if rf, ok := ret.Get(0).(func(string, bool) int64); ok {
  1097  		r0 = rf(channelId, allowFromCache)
  1098  	} else {
  1099  		r0 = ret.Get(0).(int64)
  1100  	}
  1101  
  1102  	var r1 *model.AppError
  1103  	if rf, ok := ret.Get(1).(func(string, bool) *model.AppError); ok {
  1104  		r1 = rf(channelId, allowFromCache)
  1105  	} else {
  1106  		if ret.Get(1) != nil {
  1107  			r1 = ret.Get(1).(*model.AppError)
  1108  		}
  1109  	}
  1110  
  1111  	return r0, r1
  1112  }
  1113  
  1114  // GetPinnedPosts provides a mock function with given fields: channelId
  1115  func (_m *ChannelStore) GetPinnedPosts(channelId string) (*model.PostList, *model.AppError) {
  1116  	ret := _m.Called(channelId)
  1117  
  1118  	var r0 *model.PostList
  1119  	if rf, ok := ret.Get(0).(func(string) *model.PostList); ok {
  1120  		r0 = rf(channelId)
  1121  	} else {
  1122  		if ret.Get(0) != nil {
  1123  			r0 = ret.Get(0).(*model.PostList)
  1124  		}
  1125  	}
  1126  
  1127  	var r1 *model.AppError
  1128  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
  1129  		r1 = rf(channelId)
  1130  	} else {
  1131  		if ret.Get(1) != nil {
  1132  			r1 = ret.Get(1).(*model.AppError)
  1133  		}
  1134  	}
  1135  
  1136  	return r0, r1
  1137  }
  1138  
  1139  // GetPrivateChannelsForTeam provides a mock function with given fields: teamId, offset, limit
  1140  func (_m *ChannelStore) GetPrivateChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, *model.AppError) {
  1141  	ret := _m.Called(teamId, offset, limit)
  1142  
  1143  	var r0 *model.ChannelList
  1144  	if rf, ok := ret.Get(0).(func(string, int, int) *model.ChannelList); ok {
  1145  		r0 = rf(teamId, offset, limit)
  1146  	} else {
  1147  		if ret.Get(0) != nil {
  1148  			r0 = ret.Get(0).(*model.ChannelList)
  1149  		}
  1150  	}
  1151  
  1152  	var r1 *model.AppError
  1153  	if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
  1154  		r1 = rf(teamId, offset, limit)
  1155  	} else {
  1156  		if ret.Get(1) != nil {
  1157  			r1 = ret.Get(1).(*model.AppError)
  1158  		}
  1159  	}
  1160  
  1161  	return r0, r1
  1162  }
  1163  
  1164  // GetPublicChannelsByIdsForTeam provides a mock function with given fields: teamId, channelIds
  1165  func (_m *ChannelStore) GetPublicChannelsByIdsForTeam(teamId string, channelIds []string) (*model.ChannelList, *model.AppError) {
  1166  	ret := _m.Called(teamId, channelIds)
  1167  
  1168  	var r0 *model.ChannelList
  1169  	if rf, ok := ret.Get(0).(func(string, []string) *model.ChannelList); ok {
  1170  		r0 = rf(teamId, channelIds)
  1171  	} else {
  1172  		if ret.Get(0) != nil {
  1173  			r0 = ret.Get(0).(*model.ChannelList)
  1174  		}
  1175  	}
  1176  
  1177  	var r1 *model.AppError
  1178  	if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok {
  1179  		r1 = rf(teamId, channelIds)
  1180  	} else {
  1181  		if ret.Get(1) != nil {
  1182  			r1 = ret.Get(1).(*model.AppError)
  1183  		}
  1184  	}
  1185  
  1186  	return r0, r1
  1187  }
  1188  
  1189  // GetPublicChannelsForTeam provides a mock function with given fields: teamId, offset, limit
  1190  func (_m *ChannelStore) GetPublicChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, *model.AppError) {
  1191  	ret := _m.Called(teamId, offset, limit)
  1192  
  1193  	var r0 *model.ChannelList
  1194  	if rf, ok := ret.Get(0).(func(string, int, int) *model.ChannelList); ok {
  1195  		r0 = rf(teamId, offset, limit)
  1196  	} else {
  1197  		if ret.Get(0) != nil {
  1198  			r0 = ret.Get(0).(*model.ChannelList)
  1199  		}
  1200  	}
  1201  
  1202  	var r1 *model.AppError
  1203  	if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
  1204  		r1 = rf(teamId, offset, limit)
  1205  	} else {
  1206  		if ret.Get(1) != nil {
  1207  			r1 = ret.Get(1).(*model.AppError)
  1208  		}
  1209  	}
  1210  
  1211  	return r0, r1
  1212  }
  1213  
  1214  // GetSidebarCategories provides a mock function with given fields: userId, teamId
  1215  func (_m *ChannelStore) GetSidebarCategories(userId string, teamId string) (*model.OrderedSidebarCategories, *model.AppError) {
  1216  	ret := _m.Called(userId, teamId)
  1217  
  1218  	var r0 *model.OrderedSidebarCategories
  1219  	if rf, ok := ret.Get(0).(func(string, string) *model.OrderedSidebarCategories); ok {
  1220  		r0 = rf(userId, teamId)
  1221  	} else {
  1222  		if ret.Get(0) != nil {
  1223  			r0 = ret.Get(0).(*model.OrderedSidebarCategories)
  1224  		}
  1225  	}
  1226  
  1227  	var r1 *model.AppError
  1228  	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
  1229  		r1 = rf(userId, teamId)
  1230  	} else {
  1231  		if ret.Get(1) != nil {
  1232  			r1 = ret.Get(1).(*model.AppError)
  1233  		}
  1234  	}
  1235  
  1236  	return r0, r1
  1237  }
  1238  
  1239  // GetSidebarCategory provides a mock function with given fields: categoryId
  1240  func (_m *ChannelStore) GetSidebarCategory(categoryId string) (*model.SidebarCategoryWithChannels, *model.AppError) {
  1241  	ret := _m.Called(categoryId)
  1242  
  1243  	var r0 *model.SidebarCategoryWithChannels
  1244  	if rf, ok := ret.Get(0).(func(string) *model.SidebarCategoryWithChannels); ok {
  1245  		r0 = rf(categoryId)
  1246  	} else {
  1247  		if ret.Get(0) != nil {
  1248  			r0 = ret.Get(0).(*model.SidebarCategoryWithChannels)
  1249  		}
  1250  	}
  1251  
  1252  	var r1 *model.AppError
  1253  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
  1254  		r1 = rf(categoryId)
  1255  	} else {
  1256  		if ret.Get(1) != nil {
  1257  			r1 = ret.Get(1).(*model.AppError)
  1258  		}
  1259  	}
  1260  
  1261  	return r0, r1
  1262  }
  1263  
  1264  // GetSidebarCategoryOrder provides a mock function with given fields: userId, teamId
  1265  func (_m *ChannelStore) GetSidebarCategoryOrder(userId string, teamId string) ([]string, *model.AppError) {
  1266  	ret := _m.Called(userId, teamId)
  1267  
  1268  	var r0 []string
  1269  	if rf, ok := ret.Get(0).(func(string, string) []string); ok {
  1270  		r0 = rf(userId, teamId)
  1271  	} else {
  1272  		if ret.Get(0) != nil {
  1273  			r0 = ret.Get(0).([]string)
  1274  		}
  1275  	}
  1276  
  1277  	var r1 *model.AppError
  1278  	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
  1279  		r1 = rf(userId, teamId)
  1280  	} else {
  1281  		if ret.Get(1) != nil {
  1282  			r1 = ret.Get(1).(*model.AppError)
  1283  		}
  1284  	}
  1285  
  1286  	return r0, r1
  1287  }
  1288  
  1289  // GetTeamChannels provides a mock function with given fields: teamId
  1290  func (_m *ChannelStore) GetTeamChannels(teamId string) (*model.ChannelList, *model.AppError) {
  1291  	ret := _m.Called(teamId)
  1292  
  1293  	var r0 *model.ChannelList
  1294  	if rf, ok := ret.Get(0).(func(string) *model.ChannelList); ok {
  1295  		r0 = rf(teamId)
  1296  	} else {
  1297  		if ret.Get(0) != nil {
  1298  			r0 = ret.Get(0).(*model.ChannelList)
  1299  		}
  1300  	}
  1301  
  1302  	var r1 *model.AppError
  1303  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
  1304  		r1 = rf(teamId)
  1305  	} else {
  1306  		if ret.Get(1) != nil {
  1307  			r1 = ret.Get(1).(*model.AppError)
  1308  		}
  1309  	}
  1310  
  1311  	return r0, r1
  1312  }
  1313  
  1314  // GroupSyncedChannelCount provides a mock function with given fields:
  1315  func (_m *ChannelStore) GroupSyncedChannelCount() (int64, *model.AppError) {
  1316  	ret := _m.Called()
  1317  
  1318  	var r0 int64
  1319  	if rf, ok := ret.Get(0).(func() int64); ok {
  1320  		r0 = rf()
  1321  	} else {
  1322  		r0 = ret.Get(0).(int64)
  1323  	}
  1324  
  1325  	var r1 *model.AppError
  1326  	if rf, ok := ret.Get(1).(func() *model.AppError); ok {
  1327  		r1 = rf()
  1328  	} else {
  1329  		if ret.Get(1) != nil {
  1330  			r1 = ret.Get(1).(*model.AppError)
  1331  		}
  1332  	}
  1333  
  1334  	return r0, r1
  1335  }
  1336  
  1337  // IncrementMentionCount provides a mock function with given fields: channelId, userId
  1338  func (_m *ChannelStore) IncrementMentionCount(channelId string, userId string) *model.AppError {
  1339  	ret := _m.Called(channelId, userId)
  1340  
  1341  	var r0 *model.AppError
  1342  	if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok {
  1343  		r0 = rf(channelId, userId)
  1344  	} else {
  1345  		if ret.Get(0) != nil {
  1346  			r0 = ret.Get(0).(*model.AppError)
  1347  		}
  1348  	}
  1349  
  1350  	return r0
  1351  }
  1352  
  1353  // InvalidateAllChannelMembersForUser provides a mock function with given fields: userId
  1354  func (_m *ChannelStore) InvalidateAllChannelMembersForUser(userId string) {
  1355  	_m.Called(userId)
  1356  }
  1357  
  1358  // InvalidateCacheForChannelMembersNotifyProps provides a mock function with given fields: channelId
  1359  func (_m *ChannelStore) InvalidateCacheForChannelMembersNotifyProps(channelId string) {
  1360  	_m.Called(channelId)
  1361  }
  1362  
  1363  // InvalidateChannel provides a mock function with given fields: id
  1364  func (_m *ChannelStore) InvalidateChannel(id string) {
  1365  	_m.Called(id)
  1366  }
  1367  
  1368  // InvalidateChannelByName provides a mock function with given fields: teamId, name
  1369  func (_m *ChannelStore) InvalidateChannelByName(teamId string, name string) {
  1370  	_m.Called(teamId, name)
  1371  }
  1372  
  1373  // InvalidateGuestCount provides a mock function with given fields: channelId
  1374  func (_m *ChannelStore) InvalidateGuestCount(channelId string) {
  1375  	_m.Called(channelId)
  1376  }
  1377  
  1378  // InvalidateMemberCount provides a mock function with given fields: channelId
  1379  func (_m *ChannelStore) InvalidateMemberCount(channelId string) {
  1380  	_m.Called(channelId)
  1381  }
  1382  
  1383  // InvalidatePinnedPostCount provides a mock function with given fields: channelId
  1384  func (_m *ChannelStore) InvalidatePinnedPostCount(channelId string) {
  1385  	_m.Called(channelId)
  1386  }
  1387  
  1388  // IsUserInChannelUseCache provides a mock function with given fields: userId, channelId
  1389  func (_m *ChannelStore) IsUserInChannelUseCache(userId string, channelId string) bool {
  1390  	ret := _m.Called(userId, channelId)
  1391  
  1392  	var r0 bool
  1393  	if rf, ok := ret.Get(0).(func(string, string) bool); ok {
  1394  		r0 = rf(userId, channelId)
  1395  	} else {
  1396  		r0 = ret.Get(0).(bool)
  1397  	}
  1398  
  1399  	return r0
  1400  }
  1401  
  1402  // MigrateChannelMembers provides a mock function with given fields: fromChannelId, fromUserId
  1403  func (_m *ChannelStore) MigrateChannelMembers(fromChannelId string, fromUserId string) (map[string]string, *model.AppError) {
  1404  	ret := _m.Called(fromChannelId, fromUserId)
  1405  
  1406  	var r0 map[string]string
  1407  	if rf, ok := ret.Get(0).(func(string, string) map[string]string); ok {
  1408  		r0 = rf(fromChannelId, fromUserId)
  1409  	} else {
  1410  		if ret.Get(0) != nil {
  1411  			r0 = ret.Get(0).(map[string]string)
  1412  		}
  1413  	}
  1414  
  1415  	var r1 *model.AppError
  1416  	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
  1417  		r1 = rf(fromChannelId, fromUserId)
  1418  	} else {
  1419  		if ret.Get(1) != nil {
  1420  			r1 = ret.Get(1).(*model.AppError)
  1421  		}
  1422  	}
  1423  
  1424  	return r0, r1
  1425  }
  1426  
  1427  // MigratePublicChannels provides a mock function with given fields:
  1428  func (_m *ChannelStore) MigratePublicChannels() error {
  1429  	ret := _m.Called()
  1430  
  1431  	var r0 error
  1432  	if rf, ok := ret.Get(0).(func() error); ok {
  1433  		r0 = rf()
  1434  	} else {
  1435  		r0 = ret.Error(0)
  1436  	}
  1437  
  1438  	return r0
  1439  }
  1440  
  1441  // PermanentDelete provides a mock function with given fields: channelId
  1442  func (_m *ChannelStore) PermanentDelete(channelId string) error {
  1443  	ret := _m.Called(channelId)
  1444  
  1445  	var r0 error
  1446  	if rf, ok := ret.Get(0).(func(string) error); ok {
  1447  		r0 = rf(channelId)
  1448  	} else {
  1449  		r0 = ret.Error(0)
  1450  	}
  1451  
  1452  	return r0
  1453  }
  1454  
  1455  // PermanentDeleteByTeam provides a mock function with given fields: teamId
  1456  func (_m *ChannelStore) PermanentDeleteByTeam(teamId string) error {
  1457  	ret := _m.Called(teamId)
  1458  
  1459  	var r0 error
  1460  	if rf, ok := ret.Get(0).(func(string) error); ok {
  1461  		r0 = rf(teamId)
  1462  	} else {
  1463  		r0 = ret.Error(0)
  1464  	}
  1465  
  1466  	return r0
  1467  }
  1468  
  1469  // PermanentDeleteMembersByChannel provides a mock function with given fields: channelId
  1470  func (_m *ChannelStore) PermanentDeleteMembersByChannel(channelId string) *model.AppError {
  1471  	ret := _m.Called(channelId)
  1472  
  1473  	var r0 *model.AppError
  1474  	if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
  1475  		r0 = rf(channelId)
  1476  	} else {
  1477  		if ret.Get(0) != nil {
  1478  			r0 = ret.Get(0).(*model.AppError)
  1479  		}
  1480  	}
  1481  
  1482  	return r0
  1483  }
  1484  
  1485  // PermanentDeleteMembersByUser provides a mock function with given fields: userId
  1486  func (_m *ChannelStore) PermanentDeleteMembersByUser(userId string) *model.AppError {
  1487  	ret := _m.Called(userId)
  1488  
  1489  	var r0 *model.AppError
  1490  	if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
  1491  		r0 = rf(userId)
  1492  	} else {
  1493  		if ret.Get(0) != nil {
  1494  			r0 = ret.Get(0).(*model.AppError)
  1495  		}
  1496  	}
  1497  
  1498  	return r0
  1499  }
  1500  
  1501  // RemoveAllDeactivatedMembers provides a mock function with given fields: channelId
  1502  func (_m *ChannelStore) RemoveAllDeactivatedMembers(channelId string) *model.AppError {
  1503  	ret := _m.Called(channelId)
  1504  
  1505  	var r0 *model.AppError
  1506  	if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
  1507  		r0 = rf(channelId)
  1508  	} else {
  1509  		if ret.Get(0) != nil {
  1510  			r0 = ret.Get(0).(*model.AppError)
  1511  		}
  1512  	}
  1513  
  1514  	return r0
  1515  }
  1516  
  1517  // RemoveMember provides a mock function with given fields: channelId, userId
  1518  func (_m *ChannelStore) RemoveMember(channelId string, userId string) *model.AppError {
  1519  	ret := _m.Called(channelId, userId)
  1520  
  1521  	var r0 *model.AppError
  1522  	if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok {
  1523  		r0 = rf(channelId, userId)
  1524  	} else {
  1525  		if ret.Get(0) != nil {
  1526  			r0 = ret.Get(0).(*model.AppError)
  1527  		}
  1528  	}
  1529  
  1530  	return r0
  1531  }
  1532  
  1533  // RemoveMembers provides a mock function with given fields: channelId, userIds
  1534  func (_m *ChannelStore) RemoveMembers(channelId string, userIds []string) *model.AppError {
  1535  	ret := _m.Called(channelId, userIds)
  1536  
  1537  	var r0 *model.AppError
  1538  	if rf, ok := ret.Get(0).(func(string, []string) *model.AppError); ok {
  1539  		r0 = rf(channelId, userIds)
  1540  	} else {
  1541  		if ret.Get(0) != nil {
  1542  			r0 = ret.Get(0).(*model.AppError)
  1543  		}
  1544  	}
  1545  
  1546  	return r0
  1547  }
  1548  
  1549  // ResetAllChannelSchemes provides a mock function with given fields:
  1550  func (_m *ChannelStore) ResetAllChannelSchemes() *model.AppError {
  1551  	ret := _m.Called()
  1552  
  1553  	var r0 *model.AppError
  1554  	if rf, ok := ret.Get(0).(func() *model.AppError); ok {
  1555  		r0 = rf()
  1556  	} else {
  1557  		if ret.Get(0) != nil {
  1558  			r0 = ret.Get(0).(*model.AppError)
  1559  		}
  1560  	}
  1561  
  1562  	return r0
  1563  }
  1564  
  1565  // Restore provides a mock function with given fields: channelId, time
  1566  func (_m *ChannelStore) Restore(channelId string, time int64) error {
  1567  	ret := _m.Called(channelId, time)
  1568  
  1569  	var r0 error
  1570  	if rf, ok := ret.Get(0).(func(string, int64) error); ok {
  1571  		r0 = rf(channelId, time)
  1572  	} else {
  1573  		r0 = ret.Error(0)
  1574  	}
  1575  
  1576  	return r0
  1577  }
  1578  
  1579  // Save provides a mock function with given fields: channel, maxChannelsPerTeam
  1580  func (_m *ChannelStore) Save(channel *model.Channel, maxChannelsPerTeam int64) (*model.Channel, error) {
  1581  	ret := _m.Called(channel, maxChannelsPerTeam)
  1582  
  1583  	var r0 *model.Channel
  1584  	if rf, ok := ret.Get(0).(func(*model.Channel, int64) *model.Channel); ok {
  1585  		r0 = rf(channel, maxChannelsPerTeam)
  1586  	} else {
  1587  		if ret.Get(0) != nil {
  1588  			r0 = ret.Get(0).(*model.Channel)
  1589  		}
  1590  	}
  1591  
  1592  	var r1 error
  1593  	if rf, ok := ret.Get(1).(func(*model.Channel, int64) error); ok {
  1594  		r1 = rf(channel, maxChannelsPerTeam)
  1595  	} else {
  1596  		r1 = ret.Error(1)
  1597  	}
  1598  
  1599  	return r0, r1
  1600  }
  1601  
  1602  // SaveDirectChannel provides a mock function with given fields: channel, member1, member2
  1603  func (_m *ChannelStore) SaveDirectChannel(channel *model.Channel, member1 *model.ChannelMember, member2 *model.ChannelMember) (*model.Channel, error) {
  1604  	ret := _m.Called(channel, member1, member2)
  1605  
  1606  	var r0 *model.Channel
  1607  	if rf, ok := ret.Get(0).(func(*model.Channel, *model.ChannelMember, *model.ChannelMember) *model.Channel); ok {
  1608  		r0 = rf(channel, member1, member2)
  1609  	} else {
  1610  		if ret.Get(0) != nil {
  1611  			r0 = ret.Get(0).(*model.Channel)
  1612  		}
  1613  	}
  1614  
  1615  	var r1 error
  1616  	if rf, ok := ret.Get(1).(func(*model.Channel, *model.ChannelMember, *model.ChannelMember) error); ok {
  1617  		r1 = rf(channel, member1, member2)
  1618  	} else {
  1619  		r1 = ret.Error(1)
  1620  	}
  1621  
  1622  	return r0, r1
  1623  }
  1624  
  1625  // SaveMember provides a mock function with given fields: member
  1626  func (_m *ChannelStore) SaveMember(member *model.ChannelMember) (*model.ChannelMember, *model.AppError) {
  1627  	ret := _m.Called(member)
  1628  
  1629  	var r0 *model.ChannelMember
  1630  	if rf, ok := ret.Get(0).(func(*model.ChannelMember) *model.ChannelMember); ok {
  1631  		r0 = rf(member)
  1632  	} else {
  1633  		if ret.Get(0) != nil {
  1634  			r0 = ret.Get(0).(*model.ChannelMember)
  1635  		}
  1636  	}
  1637  
  1638  	var r1 *model.AppError
  1639  	if rf, ok := ret.Get(1).(func(*model.ChannelMember) *model.AppError); ok {
  1640  		r1 = rf(member)
  1641  	} else {
  1642  		if ret.Get(1) != nil {
  1643  			r1 = ret.Get(1).(*model.AppError)
  1644  		}
  1645  	}
  1646  
  1647  	return r0, r1
  1648  }
  1649  
  1650  // SaveMultipleMembers provides a mock function with given fields: members
  1651  func (_m *ChannelStore) SaveMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, *model.AppError) {
  1652  	ret := _m.Called(members)
  1653  
  1654  	var r0 []*model.ChannelMember
  1655  	if rf, ok := ret.Get(0).(func([]*model.ChannelMember) []*model.ChannelMember); ok {
  1656  		r0 = rf(members)
  1657  	} else {
  1658  		if ret.Get(0) != nil {
  1659  			r0 = ret.Get(0).([]*model.ChannelMember)
  1660  		}
  1661  	}
  1662  
  1663  	var r1 *model.AppError
  1664  	if rf, ok := ret.Get(1).(func([]*model.ChannelMember) *model.AppError); ok {
  1665  		r1 = rf(members)
  1666  	} else {
  1667  		if ret.Get(1) != nil {
  1668  			r1 = ret.Get(1).(*model.AppError)
  1669  		}
  1670  	}
  1671  
  1672  	return r0, r1
  1673  }
  1674  
  1675  // SearchAllChannels provides a mock function with given fields: term, opts
  1676  func (_m *ChannelStore) SearchAllChannels(term string, opts store.ChannelSearchOpts) (*model.ChannelListWithTeamData, int64, *model.AppError) {
  1677  	ret := _m.Called(term, opts)
  1678  
  1679  	var r0 *model.ChannelListWithTeamData
  1680  	if rf, ok := ret.Get(0).(func(string, store.ChannelSearchOpts) *model.ChannelListWithTeamData); ok {
  1681  		r0 = rf(term, opts)
  1682  	} else {
  1683  		if ret.Get(0) != nil {
  1684  			r0 = ret.Get(0).(*model.ChannelListWithTeamData)
  1685  		}
  1686  	}
  1687  
  1688  	var r1 int64
  1689  	if rf, ok := ret.Get(1).(func(string, store.ChannelSearchOpts) int64); ok {
  1690  		r1 = rf(term, opts)
  1691  	} else {
  1692  		r1 = ret.Get(1).(int64)
  1693  	}
  1694  
  1695  	var r2 *model.AppError
  1696  	if rf, ok := ret.Get(2).(func(string, store.ChannelSearchOpts) *model.AppError); ok {
  1697  		r2 = rf(term, opts)
  1698  	} else {
  1699  		if ret.Get(2) != nil {
  1700  			r2 = ret.Get(2).(*model.AppError)
  1701  		}
  1702  	}
  1703  
  1704  	return r0, r1, r2
  1705  }
  1706  
  1707  // SearchArchivedInTeam provides a mock function with given fields: teamId, term, userId
  1708  func (_m *ChannelStore) SearchArchivedInTeam(teamId string, term string, userId string) (*model.ChannelList, *model.AppError) {
  1709  	ret := _m.Called(teamId, term, userId)
  1710  
  1711  	var r0 *model.ChannelList
  1712  	if rf, ok := ret.Get(0).(func(string, string, string) *model.ChannelList); ok {
  1713  		r0 = rf(teamId, term, userId)
  1714  	} else {
  1715  		if ret.Get(0) != nil {
  1716  			r0 = ret.Get(0).(*model.ChannelList)
  1717  		}
  1718  	}
  1719  
  1720  	var r1 *model.AppError
  1721  	if rf, ok := ret.Get(1).(func(string, string, string) *model.AppError); ok {
  1722  		r1 = rf(teamId, term, userId)
  1723  	} else {
  1724  		if ret.Get(1) != nil {
  1725  			r1 = ret.Get(1).(*model.AppError)
  1726  		}
  1727  	}
  1728  
  1729  	return r0, r1
  1730  }
  1731  
  1732  // SearchForUserInTeam provides a mock function with given fields: userId, teamId, term, includeDeleted
  1733  func (_m *ChannelStore) SearchForUserInTeam(userId string, teamId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) {
  1734  	ret := _m.Called(userId, teamId, term, includeDeleted)
  1735  
  1736  	var r0 *model.ChannelList
  1737  	if rf, ok := ret.Get(0).(func(string, string, string, bool) *model.ChannelList); ok {
  1738  		r0 = rf(userId, teamId, term, includeDeleted)
  1739  	} else {
  1740  		if ret.Get(0) != nil {
  1741  			r0 = ret.Get(0).(*model.ChannelList)
  1742  		}
  1743  	}
  1744  
  1745  	var r1 *model.AppError
  1746  	if rf, ok := ret.Get(1).(func(string, string, string, bool) *model.AppError); ok {
  1747  		r1 = rf(userId, teamId, term, includeDeleted)
  1748  	} else {
  1749  		if ret.Get(1) != nil {
  1750  			r1 = ret.Get(1).(*model.AppError)
  1751  		}
  1752  	}
  1753  
  1754  	return r0, r1
  1755  }
  1756  
  1757  // SearchGroupChannels provides a mock function with given fields: userId, term
  1758  func (_m *ChannelStore) SearchGroupChannels(userId string, term string) (*model.ChannelList, *model.AppError) {
  1759  	ret := _m.Called(userId, term)
  1760  
  1761  	var r0 *model.ChannelList
  1762  	if rf, ok := ret.Get(0).(func(string, string) *model.ChannelList); ok {
  1763  		r0 = rf(userId, term)
  1764  	} else {
  1765  		if ret.Get(0) != nil {
  1766  			r0 = ret.Get(0).(*model.ChannelList)
  1767  		}
  1768  	}
  1769  
  1770  	var r1 *model.AppError
  1771  	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
  1772  		r1 = rf(userId, term)
  1773  	} else {
  1774  		if ret.Get(1) != nil {
  1775  			r1 = ret.Get(1).(*model.AppError)
  1776  		}
  1777  	}
  1778  
  1779  	return r0, r1
  1780  }
  1781  
  1782  // SearchInTeam provides a mock function with given fields: teamId, term, includeDeleted
  1783  func (_m *ChannelStore) SearchInTeam(teamId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) {
  1784  	ret := _m.Called(teamId, term, includeDeleted)
  1785  
  1786  	var r0 *model.ChannelList
  1787  	if rf, ok := ret.Get(0).(func(string, string, bool) *model.ChannelList); ok {
  1788  		r0 = rf(teamId, term, includeDeleted)
  1789  	} else {
  1790  		if ret.Get(0) != nil {
  1791  			r0 = ret.Get(0).(*model.ChannelList)
  1792  		}
  1793  	}
  1794  
  1795  	var r1 *model.AppError
  1796  	if rf, ok := ret.Get(1).(func(string, string, bool) *model.AppError); ok {
  1797  		r1 = rf(teamId, term, includeDeleted)
  1798  	} else {
  1799  		if ret.Get(1) != nil {
  1800  			r1 = ret.Get(1).(*model.AppError)
  1801  		}
  1802  	}
  1803  
  1804  	return r0, r1
  1805  }
  1806  
  1807  // SearchMore provides a mock function with given fields: userId, teamId, term
  1808  func (_m *ChannelStore) SearchMore(userId string, teamId string, term string) (*model.ChannelList, *model.AppError) {
  1809  	ret := _m.Called(userId, teamId, term)
  1810  
  1811  	var r0 *model.ChannelList
  1812  	if rf, ok := ret.Get(0).(func(string, string, string) *model.ChannelList); ok {
  1813  		r0 = rf(userId, teamId, term)
  1814  	} else {
  1815  		if ret.Get(0) != nil {
  1816  			r0 = ret.Get(0).(*model.ChannelList)
  1817  		}
  1818  	}
  1819  
  1820  	var r1 *model.AppError
  1821  	if rf, ok := ret.Get(1).(func(string, string, string) *model.AppError); ok {
  1822  		r1 = rf(userId, teamId, term)
  1823  	} else {
  1824  		if ret.Get(1) != nil {
  1825  			r1 = ret.Get(1).(*model.AppError)
  1826  		}
  1827  	}
  1828  
  1829  	return r0, r1
  1830  }
  1831  
  1832  // SetDeleteAt provides a mock function with given fields: channelId, deleteAt, updateAt
  1833  func (_m *ChannelStore) SetDeleteAt(channelId string, deleteAt int64, updateAt int64) error {
  1834  	ret := _m.Called(channelId, deleteAt, updateAt)
  1835  
  1836  	var r0 error
  1837  	if rf, ok := ret.Get(0).(func(string, int64, int64) error); ok {
  1838  		r0 = rf(channelId, deleteAt, updateAt)
  1839  	} else {
  1840  		r0 = ret.Error(0)
  1841  	}
  1842  
  1843  	return r0
  1844  }
  1845  
  1846  // Update provides a mock function with given fields: channel
  1847  func (_m *ChannelStore) Update(channel *model.Channel) (*model.Channel, error) {
  1848  	ret := _m.Called(channel)
  1849  
  1850  	var r0 *model.Channel
  1851  	if rf, ok := ret.Get(0).(func(*model.Channel) *model.Channel); ok {
  1852  		r0 = rf(channel)
  1853  	} else {
  1854  		if ret.Get(0) != nil {
  1855  			r0 = ret.Get(0).(*model.Channel)
  1856  		}
  1857  	}
  1858  
  1859  	var r1 error
  1860  	if rf, ok := ret.Get(1).(func(*model.Channel) error); ok {
  1861  		r1 = rf(channel)
  1862  	} else {
  1863  		r1 = ret.Error(1)
  1864  	}
  1865  
  1866  	return r0, r1
  1867  }
  1868  
  1869  // UpdateLastViewedAt provides a mock function with given fields: channelIds, userId
  1870  func (_m *ChannelStore) UpdateLastViewedAt(channelIds []string, userId string) (map[string]int64, *model.AppError) {
  1871  	ret := _m.Called(channelIds, userId)
  1872  
  1873  	var r0 map[string]int64
  1874  	if rf, ok := ret.Get(0).(func([]string, string) map[string]int64); ok {
  1875  		r0 = rf(channelIds, userId)
  1876  	} else {
  1877  		if ret.Get(0) != nil {
  1878  			r0 = ret.Get(0).(map[string]int64)
  1879  		}
  1880  	}
  1881  
  1882  	var r1 *model.AppError
  1883  	if rf, ok := ret.Get(1).(func([]string, string) *model.AppError); ok {
  1884  		r1 = rf(channelIds, userId)
  1885  	} else {
  1886  		if ret.Get(1) != nil {
  1887  			r1 = ret.Get(1).(*model.AppError)
  1888  		}
  1889  	}
  1890  
  1891  	return r0, r1
  1892  }
  1893  
  1894  // UpdateLastViewedAtPost provides a mock function with given fields: unreadPost, userID, mentionCount
  1895  func (_m *ChannelStore) UpdateLastViewedAtPost(unreadPost *model.Post, userID string, mentionCount int) (*model.ChannelUnreadAt, *model.AppError) {
  1896  	ret := _m.Called(unreadPost, userID, mentionCount)
  1897  
  1898  	var r0 *model.ChannelUnreadAt
  1899  	if rf, ok := ret.Get(0).(func(*model.Post, string, int) *model.ChannelUnreadAt); ok {
  1900  		r0 = rf(unreadPost, userID, mentionCount)
  1901  	} else {
  1902  		if ret.Get(0) != nil {
  1903  			r0 = ret.Get(0).(*model.ChannelUnreadAt)
  1904  		}
  1905  	}
  1906  
  1907  	var r1 *model.AppError
  1908  	if rf, ok := ret.Get(1).(func(*model.Post, string, int) *model.AppError); ok {
  1909  		r1 = rf(unreadPost, userID, mentionCount)
  1910  	} else {
  1911  		if ret.Get(1) != nil {
  1912  			r1 = ret.Get(1).(*model.AppError)
  1913  		}
  1914  	}
  1915  
  1916  	return r0, r1
  1917  }
  1918  
  1919  // UpdateMember provides a mock function with given fields: member
  1920  func (_m *ChannelStore) UpdateMember(member *model.ChannelMember) (*model.ChannelMember, *model.AppError) {
  1921  	ret := _m.Called(member)
  1922  
  1923  	var r0 *model.ChannelMember
  1924  	if rf, ok := ret.Get(0).(func(*model.ChannelMember) *model.ChannelMember); ok {
  1925  		r0 = rf(member)
  1926  	} else {
  1927  		if ret.Get(0) != nil {
  1928  			r0 = ret.Get(0).(*model.ChannelMember)
  1929  		}
  1930  	}
  1931  
  1932  	var r1 *model.AppError
  1933  	if rf, ok := ret.Get(1).(func(*model.ChannelMember) *model.AppError); ok {
  1934  		r1 = rf(member)
  1935  	} else {
  1936  		if ret.Get(1) != nil {
  1937  			r1 = ret.Get(1).(*model.AppError)
  1938  		}
  1939  	}
  1940  
  1941  	return r0, r1
  1942  }
  1943  
  1944  // UpdateMembersRole provides a mock function with given fields: channelID, userIDs
  1945  func (_m *ChannelStore) UpdateMembersRole(channelID string, userIDs []string) *model.AppError {
  1946  	ret := _m.Called(channelID, userIDs)
  1947  
  1948  	var r0 *model.AppError
  1949  	if rf, ok := ret.Get(0).(func(string, []string) *model.AppError); ok {
  1950  		r0 = rf(channelID, userIDs)
  1951  	} else {
  1952  		if ret.Get(0) != nil {
  1953  			r0 = ret.Get(0).(*model.AppError)
  1954  		}
  1955  	}
  1956  
  1957  	return r0
  1958  }
  1959  
  1960  // UpdateMultipleMembers provides a mock function with given fields: members
  1961  func (_m *ChannelStore) UpdateMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, *model.AppError) {
  1962  	ret := _m.Called(members)
  1963  
  1964  	var r0 []*model.ChannelMember
  1965  	if rf, ok := ret.Get(0).(func([]*model.ChannelMember) []*model.ChannelMember); ok {
  1966  		r0 = rf(members)
  1967  	} else {
  1968  		if ret.Get(0) != nil {
  1969  			r0 = ret.Get(0).([]*model.ChannelMember)
  1970  		}
  1971  	}
  1972  
  1973  	var r1 *model.AppError
  1974  	if rf, ok := ret.Get(1).(func([]*model.ChannelMember) *model.AppError); ok {
  1975  		r1 = rf(members)
  1976  	} else {
  1977  		if ret.Get(1) != nil {
  1978  			r1 = ret.Get(1).(*model.AppError)
  1979  		}
  1980  	}
  1981  
  1982  	return r0, r1
  1983  }
  1984  
  1985  // UpdateSidebarCategories provides a mock function with given fields: userId, teamId, categories
  1986  func (_m *ChannelStore) UpdateSidebarCategories(userId string, teamId string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, *model.AppError) {
  1987  	ret := _m.Called(userId, teamId, categories)
  1988  
  1989  	var r0 []*model.SidebarCategoryWithChannels
  1990  	if rf, ok := ret.Get(0).(func(string, string, []*model.SidebarCategoryWithChannels) []*model.SidebarCategoryWithChannels); ok {
  1991  		r0 = rf(userId, teamId, categories)
  1992  	} else {
  1993  		if ret.Get(0) != nil {
  1994  			r0 = ret.Get(0).([]*model.SidebarCategoryWithChannels)
  1995  		}
  1996  	}
  1997  
  1998  	var r1 *model.AppError
  1999  	if rf, ok := ret.Get(1).(func(string, string, []*model.SidebarCategoryWithChannels) *model.AppError); ok {
  2000  		r1 = rf(userId, teamId, categories)
  2001  	} else {
  2002  		if ret.Get(1) != nil {
  2003  			r1 = ret.Get(1).(*model.AppError)
  2004  		}
  2005  	}
  2006  
  2007  	return r0, r1
  2008  }
  2009  
  2010  // UpdateSidebarCategoryOrder provides a mock function with given fields: userId, teamId, categoryOrder
  2011  func (_m *ChannelStore) UpdateSidebarCategoryOrder(userId string, teamId string, categoryOrder []string) *model.AppError {
  2012  	ret := _m.Called(userId, teamId, categoryOrder)
  2013  
  2014  	var r0 *model.AppError
  2015  	if rf, ok := ret.Get(0).(func(string, string, []string) *model.AppError); ok {
  2016  		r0 = rf(userId, teamId, categoryOrder)
  2017  	} else {
  2018  		if ret.Get(0) != nil {
  2019  			r0 = ret.Get(0).(*model.AppError)
  2020  		}
  2021  	}
  2022  
  2023  	return r0
  2024  }
  2025  
  2026  // UpdateSidebarChannelCategoryOnMove provides a mock function with given fields: channel, newTeamId
  2027  func (_m *ChannelStore) UpdateSidebarChannelCategoryOnMove(channel *model.Channel, newTeamId string) *model.AppError {
  2028  	ret := _m.Called(channel, newTeamId)
  2029  
  2030  	var r0 *model.AppError
  2031  	if rf, ok := ret.Get(0).(func(*model.Channel, string) *model.AppError); ok {
  2032  		r0 = rf(channel, newTeamId)
  2033  	} else {
  2034  		if ret.Get(0) != nil {
  2035  			r0 = ret.Get(0).(*model.AppError)
  2036  		}
  2037  	}
  2038  
  2039  	return r0
  2040  }
  2041  
  2042  // UpdateSidebarChannelsByPreferences provides a mock function with given fields: preferences
  2043  func (_m *ChannelStore) UpdateSidebarChannelsByPreferences(preferences *model.Preferences) error {
  2044  	ret := _m.Called(preferences)
  2045  
  2046  	var r0 error
  2047  	if rf, ok := ret.Get(0).(func(*model.Preferences) error); ok {
  2048  		r0 = rf(preferences)
  2049  	} else {
  2050  		r0 = ret.Error(0)
  2051  	}
  2052  
  2053  	return r0
  2054  }
  2055  
  2056  // UserBelongsToChannels provides a mock function with given fields: userId, channelIds
  2057  func (_m *ChannelStore) UserBelongsToChannels(userId string, channelIds []string) (bool, *model.AppError) {
  2058  	ret := _m.Called(userId, channelIds)
  2059  
  2060  	var r0 bool
  2061  	if rf, ok := ret.Get(0).(func(string, []string) bool); ok {
  2062  		r0 = rf(userId, channelIds)
  2063  	} else {
  2064  		r0 = ret.Get(0).(bool)
  2065  	}
  2066  
  2067  	var r1 *model.AppError
  2068  	if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok {
  2069  		r1 = rf(userId, channelIds)
  2070  	} else {
  2071  		if ret.Get(1) != nil {
  2072  			r1 = ret.Get(1).(*model.AppError)
  2073  		}
  2074  	}
  2075  
  2076  	return r0, r1
  2077  }