github.com/haalcala/mattermost-server-change-repo/v5@v5.33.2/store/storetest/mocks/TeamStore.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  	context "context"
     9  
    10  	model "github.com/mattermost/mattermost-server/v5/model"
    11  	mock "github.com/stretchr/testify/mock"
    12  )
    13  
    14  // TeamStore is an autogenerated mock type for the TeamStore type
    15  type TeamStore struct {
    16  	mock.Mock
    17  }
    18  
    19  // AnalyticsGetTeamCountForScheme provides a mock function with given fields: schemeId
    20  func (_m *TeamStore) AnalyticsGetTeamCountForScheme(schemeId string) (int64, error) {
    21  	ret := _m.Called(schemeId)
    22  
    23  	var r0 int64
    24  	if rf, ok := ret.Get(0).(func(string) int64); ok {
    25  		r0 = rf(schemeId)
    26  	} else {
    27  		r0 = ret.Get(0).(int64)
    28  	}
    29  
    30  	var r1 error
    31  	if rf, ok := ret.Get(1).(func(string) error); ok {
    32  		r1 = rf(schemeId)
    33  	} else {
    34  		r1 = ret.Error(1)
    35  	}
    36  
    37  	return r0, r1
    38  }
    39  
    40  // AnalyticsPrivateTeamCount provides a mock function with given fields:
    41  func (_m *TeamStore) AnalyticsPrivateTeamCount() (int64, error) {
    42  	ret := _m.Called()
    43  
    44  	var r0 int64
    45  	if rf, ok := ret.Get(0).(func() int64); ok {
    46  		r0 = rf()
    47  	} else {
    48  		r0 = ret.Get(0).(int64)
    49  	}
    50  
    51  	var r1 error
    52  	if rf, ok := ret.Get(1).(func() error); ok {
    53  		r1 = rf()
    54  	} else {
    55  		r1 = ret.Error(1)
    56  	}
    57  
    58  	return r0, r1
    59  }
    60  
    61  // AnalyticsPublicTeamCount provides a mock function with given fields:
    62  func (_m *TeamStore) AnalyticsPublicTeamCount() (int64, error) {
    63  	ret := _m.Called()
    64  
    65  	var r0 int64
    66  	if rf, ok := ret.Get(0).(func() int64); ok {
    67  		r0 = rf()
    68  	} else {
    69  		r0 = ret.Get(0).(int64)
    70  	}
    71  
    72  	var r1 error
    73  	if rf, ok := ret.Get(1).(func() error); ok {
    74  		r1 = rf()
    75  	} else {
    76  		r1 = ret.Error(1)
    77  	}
    78  
    79  	return r0, r1
    80  }
    81  
    82  // AnalyticsTeamCount provides a mock function with given fields: includeDeleted
    83  func (_m *TeamStore) AnalyticsTeamCount(includeDeleted bool) (int64, error) {
    84  	ret := _m.Called(includeDeleted)
    85  
    86  	var r0 int64
    87  	if rf, ok := ret.Get(0).(func(bool) int64); ok {
    88  		r0 = rf(includeDeleted)
    89  	} else {
    90  		r0 = ret.Get(0).(int64)
    91  	}
    92  
    93  	var r1 error
    94  	if rf, ok := ret.Get(1).(func(bool) error); ok {
    95  		r1 = rf(includeDeleted)
    96  	} else {
    97  		r1 = ret.Error(1)
    98  	}
    99  
   100  	return r0, r1
   101  }
   102  
   103  // ClearAllCustomRoleAssignments provides a mock function with given fields:
   104  func (_m *TeamStore) ClearAllCustomRoleAssignments() error {
   105  	ret := _m.Called()
   106  
   107  	var r0 error
   108  	if rf, ok := ret.Get(0).(func() error); ok {
   109  		r0 = rf()
   110  	} else {
   111  		r0 = ret.Error(0)
   112  	}
   113  
   114  	return r0
   115  }
   116  
   117  // ClearCaches provides a mock function with given fields:
   118  func (_m *TeamStore) ClearCaches() {
   119  	_m.Called()
   120  }
   121  
   122  // Get provides a mock function with given fields: id
   123  func (_m *TeamStore) Get(id string) (*model.Team, error) {
   124  	ret := _m.Called(id)
   125  
   126  	var r0 *model.Team
   127  	if rf, ok := ret.Get(0).(func(string) *model.Team); ok {
   128  		r0 = rf(id)
   129  	} else {
   130  		if ret.Get(0) != nil {
   131  			r0 = ret.Get(0).(*model.Team)
   132  		}
   133  	}
   134  
   135  	var r1 error
   136  	if rf, ok := ret.Get(1).(func(string) error); ok {
   137  		r1 = rf(id)
   138  	} else {
   139  		r1 = ret.Error(1)
   140  	}
   141  
   142  	return r0, r1
   143  }
   144  
   145  // GetActiveMemberCount provides a mock function with given fields: teamId, restrictions
   146  func (_m *TeamStore) GetActiveMemberCount(teamId string, restrictions *model.ViewUsersRestrictions) (int64, error) {
   147  	ret := _m.Called(teamId, restrictions)
   148  
   149  	var r0 int64
   150  	if rf, ok := ret.Get(0).(func(string, *model.ViewUsersRestrictions) int64); ok {
   151  		r0 = rf(teamId, restrictions)
   152  	} else {
   153  		r0 = ret.Get(0).(int64)
   154  	}
   155  
   156  	var r1 error
   157  	if rf, ok := ret.Get(1).(func(string, *model.ViewUsersRestrictions) error); ok {
   158  		r1 = rf(teamId, restrictions)
   159  	} else {
   160  		r1 = ret.Error(1)
   161  	}
   162  
   163  	return r0, r1
   164  }
   165  
   166  // GetAll provides a mock function with given fields:
   167  func (_m *TeamStore) GetAll() ([]*model.Team, error) {
   168  	ret := _m.Called()
   169  
   170  	var r0 []*model.Team
   171  	if rf, ok := ret.Get(0).(func() []*model.Team); ok {
   172  		r0 = rf()
   173  	} else {
   174  		if ret.Get(0) != nil {
   175  			r0 = ret.Get(0).([]*model.Team)
   176  		}
   177  	}
   178  
   179  	var r1 error
   180  	if rf, ok := ret.Get(1).(func() error); ok {
   181  		r1 = rf()
   182  	} else {
   183  		r1 = ret.Error(1)
   184  	}
   185  
   186  	return r0, r1
   187  }
   188  
   189  // GetAllForExportAfter provides a mock function with given fields: limit, afterId
   190  func (_m *TeamStore) GetAllForExportAfter(limit int, afterId string) ([]*model.TeamForExport, error) {
   191  	ret := _m.Called(limit, afterId)
   192  
   193  	var r0 []*model.TeamForExport
   194  	if rf, ok := ret.Get(0).(func(int, string) []*model.TeamForExport); ok {
   195  		r0 = rf(limit, afterId)
   196  	} else {
   197  		if ret.Get(0) != nil {
   198  			r0 = ret.Get(0).([]*model.TeamForExport)
   199  		}
   200  	}
   201  
   202  	var r1 error
   203  	if rf, ok := ret.Get(1).(func(int, string) error); ok {
   204  		r1 = rf(limit, afterId)
   205  	} else {
   206  		r1 = ret.Error(1)
   207  	}
   208  
   209  	return r0, r1
   210  }
   211  
   212  // GetAllPage provides a mock function with given fields: offset, limit
   213  func (_m *TeamStore) GetAllPage(offset int, limit int) ([]*model.Team, error) {
   214  	ret := _m.Called(offset, limit)
   215  
   216  	var r0 []*model.Team
   217  	if rf, ok := ret.Get(0).(func(int, int) []*model.Team); ok {
   218  		r0 = rf(offset, limit)
   219  	} else {
   220  		if ret.Get(0) != nil {
   221  			r0 = ret.Get(0).([]*model.Team)
   222  		}
   223  	}
   224  
   225  	var r1 error
   226  	if rf, ok := ret.Get(1).(func(int, int) error); ok {
   227  		r1 = rf(offset, limit)
   228  	} else {
   229  		r1 = ret.Error(1)
   230  	}
   231  
   232  	return r0, r1
   233  }
   234  
   235  // GetAllPrivateTeamListing provides a mock function with given fields:
   236  func (_m *TeamStore) GetAllPrivateTeamListing() ([]*model.Team, error) {
   237  	ret := _m.Called()
   238  
   239  	var r0 []*model.Team
   240  	if rf, ok := ret.Get(0).(func() []*model.Team); ok {
   241  		r0 = rf()
   242  	} else {
   243  		if ret.Get(0) != nil {
   244  			r0 = ret.Get(0).([]*model.Team)
   245  		}
   246  	}
   247  
   248  	var r1 error
   249  	if rf, ok := ret.Get(1).(func() error); ok {
   250  		r1 = rf()
   251  	} else {
   252  		r1 = ret.Error(1)
   253  	}
   254  
   255  	return r0, r1
   256  }
   257  
   258  // GetAllPrivateTeamPageListing provides a mock function with given fields: offset, limit
   259  func (_m *TeamStore) GetAllPrivateTeamPageListing(offset int, limit int) ([]*model.Team, error) {
   260  	ret := _m.Called(offset, limit)
   261  
   262  	var r0 []*model.Team
   263  	if rf, ok := ret.Get(0).(func(int, int) []*model.Team); ok {
   264  		r0 = rf(offset, limit)
   265  	} else {
   266  		if ret.Get(0) != nil {
   267  			r0 = ret.Get(0).([]*model.Team)
   268  		}
   269  	}
   270  
   271  	var r1 error
   272  	if rf, ok := ret.Get(1).(func(int, int) error); ok {
   273  		r1 = rf(offset, limit)
   274  	} else {
   275  		r1 = ret.Error(1)
   276  	}
   277  
   278  	return r0, r1
   279  }
   280  
   281  // GetAllPublicTeamPageListing provides a mock function with given fields: offset, limit
   282  func (_m *TeamStore) GetAllPublicTeamPageListing(offset int, limit int) ([]*model.Team, error) {
   283  	ret := _m.Called(offset, limit)
   284  
   285  	var r0 []*model.Team
   286  	if rf, ok := ret.Get(0).(func(int, int) []*model.Team); ok {
   287  		r0 = rf(offset, limit)
   288  	} else {
   289  		if ret.Get(0) != nil {
   290  			r0 = ret.Get(0).([]*model.Team)
   291  		}
   292  	}
   293  
   294  	var r1 error
   295  	if rf, ok := ret.Get(1).(func(int, int) error); ok {
   296  		r1 = rf(offset, limit)
   297  	} else {
   298  		r1 = ret.Error(1)
   299  	}
   300  
   301  	return r0, r1
   302  }
   303  
   304  // GetAllTeamListing provides a mock function with given fields:
   305  func (_m *TeamStore) GetAllTeamListing() ([]*model.Team, error) {
   306  	ret := _m.Called()
   307  
   308  	var r0 []*model.Team
   309  	if rf, ok := ret.Get(0).(func() []*model.Team); ok {
   310  		r0 = rf()
   311  	} else {
   312  		if ret.Get(0) != nil {
   313  			r0 = ret.Get(0).([]*model.Team)
   314  		}
   315  	}
   316  
   317  	var r1 error
   318  	if rf, ok := ret.Get(1).(func() error); ok {
   319  		r1 = rf()
   320  	} else {
   321  		r1 = ret.Error(1)
   322  	}
   323  
   324  	return r0, r1
   325  }
   326  
   327  // GetAllTeamPageListing provides a mock function with given fields: offset, limit
   328  func (_m *TeamStore) GetAllTeamPageListing(offset int, limit int) ([]*model.Team, error) {
   329  	ret := _m.Called(offset, limit)
   330  
   331  	var r0 []*model.Team
   332  	if rf, ok := ret.Get(0).(func(int, int) []*model.Team); ok {
   333  		r0 = rf(offset, limit)
   334  	} else {
   335  		if ret.Get(0) != nil {
   336  			r0 = ret.Get(0).([]*model.Team)
   337  		}
   338  	}
   339  
   340  	var r1 error
   341  	if rf, ok := ret.Get(1).(func(int, int) error); ok {
   342  		r1 = rf(offset, limit)
   343  	} else {
   344  		r1 = ret.Error(1)
   345  	}
   346  
   347  	return r0, r1
   348  }
   349  
   350  // GetByInviteId provides a mock function with given fields: inviteId
   351  func (_m *TeamStore) GetByInviteId(inviteId string) (*model.Team, error) {
   352  	ret := _m.Called(inviteId)
   353  
   354  	var r0 *model.Team
   355  	if rf, ok := ret.Get(0).(func(string) *model.Team); ok {
   356  		r0 = rf(inviteId)
   357  	} else {
   358  		if ret.Get(0) != nil {
   359  			r0 = ret.Get(0).(*model.Team)
   360  		}
   361  	}
   362  
   363  	var r1 error
   364  	if rf, ok := ret.Get(1).(func(string) error); ok {
   365  		r1 = rf(inviteId)
   366  	} else {
   367  		r1 = ret.Error(1)
   368  	}
   369  
   370  	return r0, r1
   371  }
   372  
   373  // GetByName provides a mock function with given fields: name
   374  func (_m *TeamStore) GetByName(name string) (*model.Team, error) {
   375  	ret := _m.Called(name)
   376  
   377  	var r0 *model.Team
   378  	if rf, ok := ret.Get(0).(func(string) *model.Team); ok {
   379  		r0 = rf(name)
   380  	} else {
   381  		if ret.Get(0) != nil {
   382  			r0 = ret.Get(0).(*model.Team)
   383  		}
   384  	}
   385  
   386  	var r1 error
   387  	if rf, ok := ret.Get(1).(func(string) error); ok {
   388  		r1 = rf(name)
   389  	} else {
   390  		r1 = ret.Error(1)
   391  	}
   392  
   393  	return r0, r1
   394  }
   395  
   396  // GetByNames provides a mock function with given fields: name
   397  func (_m *TeamStore) GetByNames(name []string) ([]*model.Team, error) {
   398  	ret := _m.Called(name)
   399  
   400  	var r0 []*model.Team
   401  	if rf, ok := ret.Get(0).(func([]string) []*model.Team); ok {
   402  		r0 = rf(name)
   403  	} else {
   404  		if ret.Get(0) != nil {
   405  			r0 = ret.Get(0).([]*model.Team)
   406  		}
   407  	}
   408  
   409  	var r1 error
   410  	if rf, ok := ret.Get(1).(func([]string) error); ok {
   411  		r1 = rf(name)
   412  	} else {
   413  		r1 = ret.Error(1)
   414  	}
   415  
   416  	return r0, r1
   417  }
   418  
   419  // GetChannelUnreadsForAllTeams provides a mock function with given fields: excludeTeamId, userId
   420  func (_m *TeamStore) GetChannelUnreadsForAllTeams(excludeTeamId string, userId string) ([]*model.ChannelUnread, error) {
   421  	ret := _m.Called(excludeTeamId, userId)
   422  
   423  	var r0 []*model.ChannelUnread
   424  	if rf, ok := ret.Get(0).(func(string, string) []*model.ChannelUnread); ok {
   425  		r0 = rf(excludeTeamId, userId)
   426  	} else {
   427  		if ret.Get(0) != nil {
   428  			r0 = ret.Get(0).([]*model.ChannelUnread)
   429  		}
   430  	}
   431  
   432  	var r1 error
   433  	if rf, ok := ret.Get(1).(func(string, string) error); ok {
   434  		r1 = rf(excludeTeamId, userId)
   435  	} else {
   436  		r1 = ret.Error(1)
   437  	}
   438  
   439  	return r0, r1
   440  }
   441  
   442  // GetChannelUnreadsForTeam provides a mock function with given fields: teamId, userId
   443  func (_m *TeamStore) GetChannelUnreadsForTeam(teamId string, userId string) ([]*model.ChannelUnread, error) {
   444  	ret := _m.Called(teamId, userId)
   445  
   446  	var r0 []*model.ChannelUnread
   447  	if rf, ok := ret.Get(0).(func(string, string) []*model.ChannelUnread); ok {
   448  		r0 = rf(teamId, userId)
   449  	} else {
   450  		if ret.Get(0) != nil {
   451  			r0 = ret.Get(0).([]*model.ChannelUnread)
   452  		}
   453  	}
   454  
   455  	var r1 error
   456  	if rf, ok := ret.Get(1).(func(string, string) error); ok {
   457  		r1 = rf(teamId, userId)
   458  	} else {
   459  		r1 = ret.Error(1)
   460  	}
   461  
   462  	return r0, r1
   463  }
   464  
   465  // GetMember provides a mock function with given fields: teamId, userId
   466  func (_m *TeamStore) GetMember(teamId string, userId string) (*model.TeamMember, error) {
   467  	ret := _m.Called(teamId, userId)
   468  
   469  	var r0 *model.TeamMember
   470  	if rf, ok := ret.Get(0).(func(string, string) *model.TeamMember); ok {
   471  		r0 = rf(teamId, userId)
   472  	} else {
   473  		if ret.Get(0) != nil {
   474  			r0 = ret.Get(0).(*model.TeamMember)
   475  		}
   476  	}
   477  
   478  	var r1 error
   479  	if rf, ok := ret.Get(1).(func(string, string) error); ok {
   480  		r1 = rf(teamId, userId)
   481  	} else {
   482  		r1 = ret.Error(1)
   483  	}
   484  
   485  	return r0, r1
   486  }
   487  
   488  // GetMembers provides a mock function with given fields: teamId, offset, limit, teamMembersGetOptions
   489  func (_m *TeamStore) GetMembers(teamId string, offset int, limit int, teamMembersGetOptions *model.TeamMembersGetOptions) ([]*model.TeamMember, error) {
   490  	ret := _m.Called(teamId, offset, limit, teamMembersGetOptions)
   491  
   492  	var r0 []*model.TeamMember
   493  	if rf, ok := ret.Get(0).(func(string, int, int, *model.TeamMembersGetOptions) []*model.TeamMember); ok {
   494  		r0 = rf(teamId, offset, limit, teamMembersGetOptions)
   495  	} else {
   496  		if ret.Get(0) != nil {
   497  			r0 = ret.Get(0).([]*model.TeamMember)
   498  		}
   499  	}
   500  
   501  	var r1 error
   502  	if rf, ok := ret.Get(1).(func(string, int, int, *model.TeamMembersGetOptions) error); ok {
   503  		r1 = rf(teamId, offset, limit, teamMembersGetOptions)
   504  	} else {
   505  		r1 = ret.Error(1)
   506  	}
   507  
   508  	return r0, r1
   509  }
   510  
   511  // GetMembersByIds provides a mock function with given fields: teamId, userIds, restrictions
   512  func (_m *TeamStore) GetMembersByIds(teamId string, userIds []string, restrictions *model.ViewUsersRestrictions) ([]*model.TeamMember, error) {
   513  	ret := _m.Called(teamId, userIds, restrictions)
   514  
   515  	var r0 []*model.TeamMember
   516  	if rf, ok := ret.Get(0).(func(string, []string, *model.ViewUsersRestrictions) []*model.TeamMember); ok {
   517  		r0 = rf(teamId, userIds, restrictions)
   518  	} else {
   519  		if ret.Get(0) != nil {
   520  			r0 = ret.Get(0).([]*model.TeamMember)
   521  		}
   522  	}
   523  
   524  	var r1 error
   525  	if rf, ok := ret.Get(1).(func(string, []string, *model.ViewUsersRestrictions) error); ok {
   526  		r1 = rf(teamId, userIds, restrictions)
   527  	} else {
   528  		r1 = ret.Error(1)
   529  	}
   530  
   531  	return r0, r1
   532  }
   533  
   534  // GetTeamMembersForExport provides a mock function with given fields: userId
   535  func (_m *TeamStore) GetTeamMembersForExport(userId string) ([]*model.TeamMemberForExport, error) {
   536  	ret := _m.Called(userId)
   537  
   538  	var r0 []*model.TeamMemberForExport
   539  	if rf, ok := ret.Get(0).(func(string) []*model.TeamMemberForExport); ok {
   540  		r0 = rf(userId)
   541  	} else {
   542  		if ret.Get(0) != nil {
   543  			r0 = ret.Get(0).([]*model.TeamMemberForExport)
   544  		}
   545  	}
   546  
   547  	var r1 error
   548  	if rf, ok := ret.Get(1).(func(string) error); ok {
   549  		r1 = rf(userId)
   550  	} else {
   551  		r1 = ret.Error(1)
   552  	}
   553  
   554  	return r0, r1
   555  }
   556  
   557  // GetTeamsByScheme provides a mock function with given fields: schemeId, offset, limit
   558  func (_m *TeamStore) GetTeamsByScheme(schemeId string, offset int, limit int) ([]*model.Team, error) {
   559  	ret := _m.Called(schemeId, offset, limit)
   560  
   561  	var r0 []*model.Team
   562  	if rf, ok := ret.Get(0).(func(string, int, int) []*model.Team); ok {
   563  		r0 = rf(schemeId, offset, limit)
   564  	} else {
   565  		if ret.Get(0) != nil {
   566  			r0 = ret.Get(0).([]*model.Team)
   567  		}
   568  	}
   569  
   570  	var r1 error
   571  	if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
   572  		r1 = rf(schemeId, offset, limit)
   573  	} else {
   574  		r1 = ret.Error(1)
   575  	}
   576  
   577  	return r0, r1
   578  }
   579  
   580  // GetTeamsByUserId provides a mock function with given fields: userId
   581  func (_m *TeamStore) GetTeamsByUserId(userId string) ([]*model.Team, error) {
   582  	ret := _m.Called(userId)
   583  
   584  	var r0 []*model.Team
   585  	if rf, ok := ret.Get(0).(func(string) []*model.Team); ok {
   586  		r0 = rf(userId)
   587  	} else {
   588  		if ret.Get(0) != nil {
   589  			r0 = ret.Get(0).([]*model.Team)
   590  		}
   591  	}
   592  
   593  	var r1 error
   594  	if rf, ok := ret.Get(1).(func(string) error); ok {
   595  		r1 = rf(userId)
   596  	} else {
   597  		r1 = ret.Error(1)
   598  	}
   599  
   600  	return r0, r1
   601  }
   602  
   603  // GetTeamsForUser provides a mock function with given fields: ctx, userId
   604  func (_m *TeamStore) GetTeamsForUser(ctx context.Context, userId string) ([]*model.TeamMember, error) {
   605  	ret := _m.Called(ctx, userId)
   606  
   607  	var r0 []*model.TeamMember
   608  	if rf, ok := ret.Get(0).(func(context.Context, string) []*model.TeamMember); ok {
   609  		r0 = rf(ctx, userId)
   610  	} else {
   611  		if ret.Get(0) != nil {
   612  			r0 = ret.Get(0).([]*model.TeamMember)
   613  		}
   614  	}
   615  
   616  	var r1 error
   617  	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
   618  		r1 = rf(ctx, userId)
   619  	} else {
   620  		r1 = ret.Error(1)
   621  	}
   622  
   623  	return r0, r1
   624  }
   625  
   626  // GetTeamsForUserWithPagination provides a mock function with given fields: userId, page, perPage
   627  func (_m *TeamStore) GetTeamsForUserWithPagination(userId string, page int, perPage int) ([]*model.TeamMember, error) {
   628  	ret := _m.Called(userId, page, perPage)
   629  
   630  	var r0 []*model.TeamMember
   631  	if rf, ok := ret.Get(0).(func(string, int, int) []*model.TeamMember); ok {
   632  		r0 = rf(userId, page, perPage)
   633  	} else {
   634  		if ret.Get(0) != nil {
   635  			r0 = ret.Get(0).([]*model.TeamMember)
   636  		}
   637  	}
   638  
   639  	var r1 error
   640  	if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
   641  		r1 = rf(userId, page, perPage)
   642  	} else {
   643  		r1 = ret.Error(1)
   644  	}
   645  
   646  	return r0, r1
   647  }
   648  
   649  // GetTotalMemberCount provides a mock function with given fields: teamId, restrictions
   650  func (_m *TeamStore) GetTotalMemberCount(teamId string, restrictions *model.ViewUsersRestrictions) (int64, error) {
   651  	ret := _m.Called(teamId, restrictions)
   652  
   653  	var r0 int64
   654  	if rf, ok := ret.Get(0).(func(string, *model.ViewUsersRestrictions) int64); ok {
   655  		r0 = rf(teamId, restrictions)
   656  	} else {
   657  		r0 = ret.Get(0).(int64)
   658  	}
   659  
   660  	var r1 error
   661  	if rf, ok := ret.Get(1).(func(string, *model.ViewUsersRestrictions) error); ok {
   662  		r1 = rf(teamId, restrictions)
   663  	} else {
   664  		r1 = ret.Error(1)
   665  	}
   666  
   667  	return r0, r1
   668  }
   669  
   670  // GetUserTeamIds provides a mock function with given fields: userId, allowFromCache
   671  func (_m *TeamStore) GetUserTeamIds(userId string, allowFromCache bool) ([]string, error) {
   672  	ret := _m.Called(userId, allowFromCache)
   673  
   674  	var r0 []string
   675  	if rf, ok := ret.Get(0).(func(string, bool) []string); ok {
   676  		r0 = rf(userId, allowFromCache)
   677  	} else {
   678  		if ret.Get(0) != nil {
   679  			r0 = ret.Get(0).([]string)
   680  		}
   681  	}
   682  
   683  	var r1 error
   684  	if rf, ok := ret.Get(1).(func(string, bool) error); ok {
   685  		r1 = rf(userId, allowFromCache)
   686  	} else {
   687  		r1 = ret.Error(1)
   688  	}
   689  
   690  	return r0, r1
   691  }
   692  
   693  // GroupSyncedTeamCount provides a mock function with given fields:
   694  func (_m *TeamStore) GroupSyncedTeamCount() (int64, error) {
   695  	ret := _m.Called()
   696  
   697  	var r0 int64
   698  	if rf, ok := ret.Get(0).(func() int64); ok {
   699  		r0 = rf()
   700  	} else {
   701  		r0 = ret.Get(0).(int64)
   702  	}
   703  
   704  	var r1 error
   705  	if rf, ok := ret.Get(1).(func() error); ok {
   706  		r1 = rf()
   707  	} else {
   708  		r1 = ret.Error(1)
   709  	}
   710  
   711  	return r0, r1
   712  }
   713  
   714  // InvalidateAllTeamIdsForUser provides a mock function with given fields: userId
   715  func (_m *TeamStore) InvalidateAllTeamIdsForUser(userId string) {
   716  	_m.Called(userId)
   717  }
   718  
   719  // MigrateTeamMembers provides a mock function with given fields: fromTeamId, fromUserId
   720  func (_m *TeamStore) MigrateTeamMembers(fromTeamId string, fromUserId string) (map[string]string, error) {
   721  	ret := _m.Called(fromTeamId, fromUserId)
   722  
   723  	var r0 map[string]string
   724  	if rf, ok := ret.Get(0).(func(string, string) map[string]string); ok {
   725  		r0 = rf(fromTeamId, fromUserId)
   726  	} else {
   727  		if ret.Get(0) != nil {
   728  			r0 = ret.Get(0).(map[string]string)
   729  		}
   730  	}
   731  
   732  	var r1 error
   733  	if rf, ok := ret.Get(1).(func(string, string) error); ok {
   734  		r1 = rf(fromTeamId, fromUserId)
   735  	} else {
   736  		r1 = ret.Error(1)
   737  	}
   738  
   739  	return r0, r1
   740  }
   741  
   742  // PermanentDelete provides a mock function with given fields: teamId
   743  func (_m *TeamStore) PermanentDelete(teamId string) error {
   744  	ret := _m.Called(teamId)
   745  
   746  	var r0 error
   747  	if rf, ok := ret.Get(0).(func(string) error); ok {
   748  		r0 = rf(teamId)
   749  	} else {
   750  		r0 = ret.Error(0)
   751  	}
   752  
   753  	return r0
   754  }
   755  
   756  // RemoveAllMembersByTeam provides a mock function with given fields: teamId
   757  func (_m *TeamStore) RemoveAllMembersByTeam(teamId string) error {
   758  	ret := _m.Called(teamId)
   759  
   760  	var r0 error
   761  	if rf, ok := ret.Get(0).(func(string) error); ok {
   762  		r0 = rf(teamId)
   763  	} else {
   764  		r0 = ret.Error(0)
   765  	}
   766  
   767  	return r0
   768  }
   769  
   770  // RemoveAllMembersByUser provides a mock function with given fields: userId
   771  func (_m *TeamStore) RemoveAllMembersByUser(userId string) error {
   772  	ret := _m.Called(userId)
   773  
   774  	var r0 error
   775  	if rf, ok := ret.Get(0).(func(string) error); ok {
   776  		r0 = rf(userId)
   777  	} else {
   778  		r0 = ret.Error(0)
   779  	}
   780  
   781  	return r0
   782  }
   783  
   784  // RemoveMember provides a mock function with given fields: teamId, userId
   785  func (_m *TeamStore) RemoveMember(teamId string, userId string) error {
   786  	ret := _m.Called(teamId, userId)
   787  
   788  	var r0 error
   789  	if rf, ok := ret.Get(0).(func(string, string) error); ok {
   790  		r0 = rf(teamId, userId)
   791  	} else {
   792  		r0 = ret.Error(0)
   793  	}
   794  
   795  	return r0
   796  }
   797  
   798  // RemoveMembers provides a mock function with given fields: teamId, userIds
   799  func (_m *TeamStore) RemoveMembers(teamId string, userIds []string) error {
   800  	ret := _m.Called(teamId, userIds)
   801  
   802  	var r0 error
   803  	if rf, ok := ret.Get(0).(func(string, []string) error); ok {
   804  		r0 = rf(teamId, userIds)
   805  	} else {
   806  		r0 = ret.Error(0)
   807  	}
   808  
   809  	return r0
   810  }
   811  
   812  // ResetAllTeamSchemes provides a mock function with given fields:
   813  func (_m *TeamStore) ResetAllTeamSchemes() error {
   814  	ret := _m.Called()
   815  
   816  	var r0 error
   817  	if rf, ok := ret.Get(0).(func() error); ok {
   818  		r0 = rf()
   819  	} else {
   820  		r0 = ret.Error(0)
   821  	}
   822  
   823  	return r0
   824  }
   825  
   826  // Save provides a mock function with given fields: team
   827  func (_m *TeamStore) Save(team *model.Team) (*model.Team, error) {
   828  	ret := _m.Called(team)
   829  
   830  	var r0 *model.Team
   831  	if rf, ok := ret.Get(0).(func(*model.Team) *model.Team); ok {
   832  		r0 = rf(team)
   833  	} else {
   834  		if ret.Get(0) != nil {
   835  			r0 = ret.Get(0).(*model.Team)
   836  		}
   837  	}
   838  
   839  	var r1 error
   840  	if rf, ok := ret.Get(1).(func(*model.Team) error); ok {
   841  		r1 = rf(team)
   842  	} else {
   843  		r1 = ret.Error(1)
   844  	}
   845  
   846  	return r0, r1
   847  }
   848  
   849  // SaveMember provides a mock function with given fields: member, maxUsersPerTeam
   850  func (_m *TeamStore) SaveMember(member *model.TeamMember, maxUsersPerTeam int) (*model.TeamMember, error) {
   851  	ret := _m.Called(member, maxUsersPerTeam)
   852  
   853  	var r0 *model.TeamMember
   854  	if rf, ok := ret.Get(0).(func(*model.TeamMember, int) *model.TeamMember); ok {
   855  		r0 = rf(member, maxUsersPerTeam)
   856  	} else {
   857  		if ret.Get(0) != nil {
   858  			r0 = ret.Get(0).(*model.TeamMember)
   859  		}
   860  	}
   861  
   862  	var r1 error
   863  	if rf, ok := ret.Get(1).(func(*model.TeamMember, int) error); ok {
   864  		r1 = rf(member, maxUsersPerTeam)
   865  	} else {
   866  		r1 = ret.Error(1)
   867  	}
   868  
   869  	return r0, r1
   870  }
   871  
   872  // SaveMultipleMembers provides a mock function with given fields: members, maxUsersPerTeam
   873  func (_m *TeamStore) SaveMultipleMembers(members []*model.TeamMember, maxUsersPerTeam int) ([]*model.TeamMember, error) {
   874  	ret := _m.Called(members, maxUsersPerTeam)
   875  
   876  	var r0 []*model.TeamMember
   877  	if rf, ok := ret.Get(0).(func([]*model.TeamMember, int) []*model.TeamMember); ok {
   878  		r0 = rf(members, maxUsersPerTeam)
   879  	} else {
   880  		if ret.Get(0) != nil {
   881  			r0 = ret.Get(0).([]*model.TeamMember)
   882  		}
   883  	}
   884  
   885  	var r1 error
   886  	if rf, ok := ret.Get(1).(func([]*model.TeamMember, int) error); ok {
   887  		r1 = rf(members, maxUsersPerTeam)
   888  	} else {
   889  		r1 = ret.Error(1)
   890  	}
   891  
   892  	return r0, r1
   893  }
   894  
   895  // SearchAll provides a mock function with given fields: term, opts
   896  func (_m *TeamStore) SearchAll(term string, opts *model.TeamSearch) ([]*model.Team, error) {
   897  	ret := _m.Called(term, opts)
   898  
   899  	var r0 []*model.Team
   900  	if rf, ok := ret.Get(0).(func(string, *model.TeamSearch) []*model.Team); ok {
   901  		r0 = rf(term, opts)
   902  	} else {
   903  		if ret.Get(0) != nil {
   904  			r0 = ret.Get(0).([]*model.Team)
   905  		}
   906  	}
   907  
   908  	var r1 error
   909  	if rf, ok := ret.Get(1).(func(string, *model.TeamSearch) error); ok {
   910  		r1 = rf(term, opts)
   911  	} else {
   912  		r1 = ret.Error(1)
   913  	}
   914  
   915  	return r0, r1
   916  }
   917  
   918  // SearchAllPaged provides a mock function with given fields: term, opts
   919  func (_m *TeamStore) SearchAllPaged(term string, opts *model.TeamSearch) ([]*model.Team, int64, error) {
   920  	ret := _m.Called(term, opts)
   921  
   922  	var r0 []*model.Team
   923  	if rf, ok := ret.Get(0).(func(string, *model.TeamSearch) []*model.Team); ok {
   924  		r0 = rf(term, opts)
   925  	} else {
   926  		if ret.Get(0) != nil {
   927  			r0 = ret.Get(0).([]*model.Team)
   928  		}
   929  	}
   930  
   931  	var r1 int64
   932  	if rf, ok := ret.Get(1).(func(string, *model.TeamSearch) int64); ok {
   933  		r1 = rf(term, opts)
   934  	} else {
   935  		r1 = ret.Get(1).(int64)
   936  	}
   937  
   938  	var r2 error
   939  	if rf, ok := ret.Get(2).(func(string, *model.TeamSearch) error); ok {
   940  		r2 = rf(term, opts)
   941  	} else {
   942  		r2 = ret.Error(2)
   943  	}
   944  
   945  	return r0, r1, r2
   946  }
   947  
   948  // SearchOpen provides a mock function with given fields: term
   949  func (_m *TeamStore) SearchOpen(term string) ([]*model.Team, error) {
   950  	ret := _m.Called(term)
   951  
   952  	var r0 []*model.Team
   953  	if rf, ok := ret.Get(0).(func(string) []*model.Team); ok {
   954  		r0 = rf(term)
   955  	} else {
   956  		if ret.Get(0) != nil {
   957  			r0 = ret.Get(0).([]*model.Team)
   958  		}
   959  	}
   960  
   961  	var r1 error
   962  	if rf, ok := ret.Get(1).(func(string) error); ok {
   963  		r1 = rf(term)
   964  	} else {
   965  		r1 = ret.Error(1)
   966  	}
   967  
   968  	return r0, r1
   969  }
   970  
   971  // SearchPrivate provides a mock function with given fields: term
   972  func (_m *TeamStore) SearchPrivate(term string) ([]*model.Team, error) {
   973  	ret := _m.Called(term)
   974  
   975  	var r0 []*model.Team
   976  	if rf, ok := ret.Get(0).(func(string) []*model.Team); ok {
   977  		r0 = rf(term)
   978  	} else {
   979  		if ret.Get(0) != nil {
   980  			r0 = ret.Get(0).([]*model.Team)
   981  		}
   982  	}
   983  
   984  	var r1 error
   985  	if rf, ok := ret.Get(1).(func(string) error); ok {
   986  		r1 = rf(term)
   987  	} else {
   988  		r1 = ret.Error(1)
   989  	}
   990  
   991  	return r0, r1
   992  }
   993  
   994  // Update provides a mock function with given fields: team
   995  func (_m *TeamStore) Update(team *model.Team) (*model.Team, error) {
   996  	ret := _m.Called(team)
   997  
   998  	var r0 *model.Team
   999  	if rf, ok := ret.Get(0).(func(*model.Team) *model.Team); ok {
  1000  		r0 = rf(team)
  1001  	} else {
  1002  		if ret.Get(0) != nil {
  1003  			r0 = ret.Get(0).(*model.Team)
  1004  		}
  1005  	}
  1006  
  1007  	var r1 error
  1008  	if rf, ok := ret.Get(1).(func(*model.Team) error); ok {
  1009  		r1 = rf(team)
  1010  	} else {
  1011  		r1 = ret.Error(1)
  1012  	}
  1013  
  1014  	return r0, r1
  1015  }
  1016  
  1017  // UpdateLastTeamIconUpdate provides a mock function with given fields: teamId, curTime
  1018  func (_m *TeamStore) UpdateLastTeamIconUpdate(teamId string, curTime int64) error {
  1019  	ret := _m.Called(teamId, curTime)
  1020  
  1021  	var r0 error
  1022  	if rf, ok := ret.Get(0).(func(string, int64) error); ok {
  1023  		r0 = rf(teamId, curTime)
  1024  	} else {
  1025  		r0 = ret.Error(0)
  1026  	}
  1027  
  1028  	return r0
  1029  }
  1030  
  1031  // UpdateMember provides a mock function with given fields: member
  1032  func (_m *TeamStore) UpdateMember(member *model.TeamMember) (*model.TeamMember, error) {
  1033  	ret := _m.Called(member)
  1034  
  1035  	var r0 *model.TeamMember
  1036  	if rf, ok := ret.Get(0).(func(*model.TeamMember) *model.TeamMember); ok {
  1037  		r0 = rf(member)
  1038  	} else {
  1039  		if ret.Get(0) != nil {
  1040  			r0 = ret.Get(0).(*model.TeamMember)
  1041  		}
  1042  	}
  1043  
  1044  	var r1 error
  1045  	if rf, ok := ret.Get(1).(func(*model.TeamMember) error); ok {
  1046  		r1 = rf(member)
  1047  	} else {
  1048  		r1 = ret.Error(1)
  1049  	}
  1050  
  1051  	return r0, r1
  1052  }
  1053  
  1054  // UpdateMembersRole provides a mock function with given fields: teamID, userIDs
  1055  func (_m *TeamStore) UpdateMembersRole(teamID string, userIDs []string) error {
  1056  	ret := _m.Called(teamID, userIDs)
  1057  
  1058  	var r0 error
  1059  	if rf, ok := ret.Get(0).(func(string, []string) error); ok {
  1060  		r0 = rf(teamID, userIDs)
  1061  	} else {
  1062  		r0 = ret.Error(0)
  1063  	}
  1064  
  1065  	return r0
  1066  }
  1067  
  1068  // UpdateMultipleMembers provides a mock function with given fields: members
  1069  func (_m *TeamStore) UpdateMultipleMembers(members []*model.TeamMember) ([]*model.TeamMember, error) {
  1070  	ret := _m.Called(members)
  1071  
  1072  	var r0 []*model.TeamMember
  1073  	if rf, ok := ret.Get(0).(func([]*model.TeamMember) []*model.TeamMember); ok {
  1074  		r0 = rf(members)
  1075  	} else {
  1076  		if ret.Get(0) != nil {
  1077  			r0 = ret.Get(0).([]*model.TeamMember)
  1078  		}
  1079  	}
  1080  
  1081  	var r1 error
  1082  	if rf, ok := ret.Get(1).(func([]*model.TeamMember) error); ok {
  1083  		r1 = rf(members)
  1084  	} else {
  1085  		r1 = ret.Error(1)
  1086  	}
  1087  
  1088  	return r0, r1
  1089  }
  1090  
  1091  // UserBelongsToTeams provides a mock function with given fields: userId, teamIds
  1092  func (_m *TeamStore) UserBelongsToTeams(userId string, teamIds []string) (bool, error) {
  1093  	ret := _m.Called(userId, teamIds)
  1094  
  1095  	var r0 bool
  1096  	if rf, ok := ret.Get(0).(func(string, []string) bool); ok {
  1097  		r0 = rf(userId, teamIds)
  1098  	} else {
  1099  		r0 = ret.Get(0).(bool)
  1100  	}
  1101  
  1102  	var r1 error
  1103  	if rf, ok := ret.Get(1).(func(string, []string) error); ok {
  1104  		r1 = rf(userId, teamIds)
  1105  	} else {
  1106  		r1 = ret.Error(1)
  1107  	}
  1108  
  1109  	return r0, r1
  1110  }