github.com/masterhung0112/hk_server/v5@v5.0.0-20220302090640-ec71aef15e1c/store/storetest/mocks/PostStore.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  // 'Regenerate
     4  
     5  package mocks
     6  
     7  import (
     8  	context "context"
     9  
    10  	model "github.com/masterhung0112/hk_server/v5/model"
    11  	mock "github.com/stretchr/testify/mock"
    12  )
    13  
    14  // PostStore is an autogenerated mock type for the PostStore type
    15  type PostStore struct {
    16  	mock.Mock
    17  }
    18  
    19  // AnalyticsPostCount provides a mock function with given fields: teamID, mustHaveFile, mustHaveHashtag
    20  func (_m *PostStore) AnalyticsPostCount(teamID string, mustHaveFile bool, mustHaveHashtag bool) (int64, error) {
    21  	ret := _m.Called(teamID, mustHaveFile, mustHaveHashtag)
    22  
    23  	var r0 int64
    24  	if rf, ok := ret.Get(0).(func(string, bool, bool) int64); ok {
    25  		r0 = rf(teamID, mustHaveFile, mustHaveHashtag)
    26  	} else {
    27  		r0 = ret.Get(0).(int64)
    28  	}
    29  
    30  	var r1 error
    31  	if rf, ok := ret.Get(1).(func(string, bool, bool) error); ok {
    32  		r1 = rf(teamID, mustHaveFile, mustHaveHashtag)
    33  	} else {
    34  		r1 = ret.Error(1)
    35  	}
    36  
    37  	return r0, r1
    38  }
    39  
    40  // AnalyticsPostCountsByDay provides a mock function with given fields: options
    41  func (_m *PostStore) AnalyticsPostCountsByDay(options *model.AnalyticsPostCountsOptions) (model.AnalyticsRows, error) {
    42  	ret := _m.Called(options)
    43  
    44  	var r0 model.AnalyticsRows
    45  	if rf, ok := ret.Get(0).(func(*model.AnalyticsPostCountsOptions) model.AnalyticsRows); ok {
    46  		r0 = rf(options)
    47  	} else {
    48  		if ret.Get(0) != nil {
    49  			r0 = ret.Get(0).(model.AnalyticsRows)
    50  		}
    51  	}
    52  
    53  	var r1 error
    54  	if rf, ok := ret.Get(1).(func(*model.AnalyticsPostCountsOptions) error); ok {
    55  		r1 = rf(options)
    56  	} else {
    57  		r1 = ret.Error(1)
    58  	}
    59  
    60  	return r0, r1
    61  }
    62  
    63  // AnalyticsUserCountsWithPostsByDay provides a mock function with given fields: teamID
    64  func (_m *PostStore) AnalyticsUserCountsWithPostsByDay(teamID string) (model.AnalyticsRows, error) {
    65  	ret := _m.Called(teamID)
    66  
    67  	var r0 model.AnalyticsRows
    68  	if rf, ok := ret.Get(0).(func(string) model.AnalyticsRows); ok {
    69  		r0 = rf(teamID)
    70  	} else {
    71  		if ret.Get(0) != nil {
    72  			r0 = ret.Get(0).(model.AnalyticsRows)
    73  		}
    74  	}
    75  
    76  	var r1 error
    77  	if rf, ok := ret.Get(1).(func(string) error); ok {
    78  		r1 = rf(teamID)
    79  	} else {
    80  		r1 = ret.Error(1)
    81  	}
    82  
    83  	return r0, r1
    84  }
    85  
    86  // ClearCaches provides a mock function with given fields:
    87  func (_m *PostStore) ClearCaches() {
    88  	_m.Called()
    89  }
    90  
    91  // Delete provides a mock function with given fields: postID, time, deleteByID
    92  func (_m *PostStore) Delete(postID string, time int64, deleteByID string) error {
    93  	ret := _m.Called(postID, time, deleteByID)
    94  
    95  	var r0 error
    96  	if rf, ok := ret.Get(0).(func(string, int64, string) error); ok {
    97  		r0 = rf(postID, time, deleteByID)
    98  	} else {
    99  		r0 = ret.Error(0)
   100  	}
   101  
   102  	return r0
   103  }
   104  
   105  // DeleteOrphanedRows provides a mock function with given fields: limit
   106  func (_m *PostStore) DeleteOrphanedRows(limit int) (int64, error) {
   107  	ret := _m.Called(limit)
   108  
   109  	var r0 int64
   110  	if rf, ok := ret.Get(0).(func(int) int64); ok {
   111  		r0 = rf(limit)
   112  	} else {
   113  		r0 = ret.Get(0).(int64)
   114  	}
   115  
   116  	var r1 error
   117  	if rf, ok := ret.Get(1).(func(int) error); ok {
   118  		r1 = rf(limit)
   119  	} else {
   120  		r1 = ret.Error(1)
   121  	}
   122  
   123  	return r0, r1
   124  }
   125  
   126  // Get provides a mock function with given fields: ctx, id, skipFetchThreads, collapsedThreads, collapsedThreadsExtended, userID
   127  func (_m *PostStore) Get(ctx context.Context, id string, skipFetchThreads bool, collapsedThreads bool, collapsedThreadsExtended bool, userID string) (*model.PostList, error) {
   128  	ret := _m.Called(ctx, id, skipFetchThreads, collapsedThreads, collapsedThreadsExtended, userID)
   129  
   130  	var r0 *model.PostList
   131  	if rf, ok := ret.Get(0).(func(context.Context, string, bool, bool, bool, string) *model.PostList); ok {
   132  		r0 = rf(ctx, id, skipFetchThreads, collapsedThreads, collapsedThreadsExtended, userID)
   133  	} else {
   134  		if ret.Get(0) != nil {
   135  			r0 = ret.Get(0).(*model.PostList)
   136  		}
   137  	}
   138  
   139  	var r1 error
   140  	if rf, ok := ret.Get(1).(func(context.Context, string, bool, bool, bool, string) error); ok {
   141  		r1 = rf(ctx, id, skipFetchThreads, collapsedThreads, collapsedThreadsExtended, userID)
   142  	} else {
   143  		r1 = ret.Error(1)
   144  	}
   145  
   146  	return r0, r1
   147  }
   148  
   149  // GetDirectPostParentsForExportAfter provides a mock function with given fields: limit, afterID
   150  func (_m *PostStore) GetDirectPostParentsForExportAfter(limit int, afterID string) ([]*model.DirectPostForExport, error) {
   151  	ret := _m.Called(limit, afterID)
   152  
   153  	var r0 []*model.DirectPostForExport
   154  	if rf, ok := ret.Get(0).(func(int, string) []*model.DirectPostForExport); ok {
   155  		r0 = rf(limit, afterID)
   156  	} else {
   157  		if ret.Get(0) != nil {
   158  			r0 = ret.Get(0).([]*model.DirectPostForExport)
   159  		}
   160  	}
   161  
   162  	var r1 error
   163  	if rf, ok := ret.Get(1).(func(int, string) error); ok {
   164  		r1 = rf(limit, afterID)
   165  	} else {
   166  		r1 = ret.Error(1)
   167  	}
   168  
   169  	return r0, r1
   170  }
   171  
   172  // GetEtag provides a mock function with given fields: channelID, allowFromCache, collapsedThreads
   173  func (_m *PostStore) GetEtag(channelID string, allowFromCache bool, collapsedThreads bool) string {
   174  	ret := _m.Called(channelID, allowFromCache, collapsedThreads)
   175  
   176  	var r0 string
   177  	if rf, ok := ret.Get(0).(func(string, bool, bool) string); ok {
   178  		r0 = rf(channelID, allowFromCache, collapsedThreads)
   179  	} else {
   180  		r0 = ret.Get(0).(string)
   181  	}
   182  
   183  	return r0
   184  }
   185  
   186  // GetFlaggedPosts provides a mock function with given fields: userID, offset, limit
   187  func (_m *PostStore) GetFlaggedPosts(userID string, offset int, limit int) (*model.PostList, error) {
   188  	ret := _m.Called(userID, offset, limit)
   189  
   190  	var r0 *model.PostList
   191  	if rf, ok := ret.Get(0).(func(string, int, int) *model.PostList); ok {
   192  		r0 = rf(userID, offset, limit)
   193  	} else {
   194  		if ret.Get(0) != nil {
   195  			r0 = ret.Get(0).(*model.PostList)
   196  		}
   197  	}
   198  
   199  	var r1 error
   200  	if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
   201  		r1 = rf(userID, offset, limit)
   202  	} else {
   203  		r1 = ret.Error(1)
   204  	}
   205  
   206  	return r0, r1
   207  }
   208  
   209  // GetFlaggedPostsForChannel provides a mock function with given fields: userID, channelID, offset, limit
   210  func (_m *PostStore) GetFlaggedPostsForChannel(userID string, channelID string, offset int, limit int) (*model.PostList, error) {
   211  	ret := _m.Called(userID, channelID, offset, limit)
   212  
   213  	var r0 *model.PostList
   214  	if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok {
   215  		r0 = rf(userID, channelID, offset, limit)
   216  	} else {
   217  		if ret.Get(0) != nil {
   218  			r0 = ret.Get(0).(*model.PostList)
   219  		}
   220  	}
   221  
   222  	var r1 error
   223  	if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok {
   224  		r1 = rf(userID, channelID, offset, limit)
   225  	} else {
   226  		r1 = ret.Error(1)
   227  	}
   228  
   229  	return r0, r1
   230  }
   231  
   232  // GetFlaggedPostsForTeam provides a mock function with given fields: userID, teamID, offset, limit
   233  func (_m *PostStore) GetFlaggedPostsForTeam(userID string, teamID string, offset int, limit int) (*model.PostList, error) {
   234  	ret := _m.Called(userID, teamID, offset, limit)
   235  
   236  	var r0 *model.PostList
   237  	if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok {
   238  		r0 = rf(userID, teamID, offset, limit)
   239  	} else {
   240  		if ret.Get(0) != nil {
   241  			r0 = ret.Get(0).(*model.PostList)
   242  		}
   243  	}
   244  
   245  	var r1 error
   246  	if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok {
   247  		r1 = rf(userID, teamID, offset, limit)
   248  	} else {
   249  		r1 = ret.Error(1)
   250  	}
   251  
   252  	return r0, r1
   253  }
   254  
   255  // GetMaxPostSize provides a mock function with given fields:
   256  func (_m *PostStore) GetMaxPostSize() int {
   257  	ret := _m.Called()
   258  
   259  	var r0 int
   260  	if rf, ok := ret.Get(0).(func() int); ok {
   261  		r0 = rf()
   262  	} else {
   263  		r0 = ret.Get(0).(int)
   264  	}
   265  
   266  	return r0
   267  }
   268  
   269  // GetOldest provides a mock function with given fields:
   270  func (_m *PostStore) GetOldest() (*model.Post, error) {
   271  	ret := _m.Called()
   272  
   273  	var r0 *model.Post
   274  	if rf, ok := ret.Get(0).(func() *model.Post); ok {
   275  		r0 = rf()
   276  	} else {
   277  		if ret.Get(0) != nil {
   278  			r0 = ret.Get(0).(*model.Post)
   279  		}
   280  	}
   281  
   282  	var r1 error
   283  	if rf, ok := ret.Get(1).(func() error); ok {
   284  		r1 = rf()
   285  	} else {
   286  		r1 = ret.Error(1)
   287  	}
   288  
   289  	return r0, r1
   290  }
   291  
   292  // GetOldestEntityCreationTime provides a mock function with given fields:
   293  func (_m *PostStore) GetOldestEntityCreationTime() (int64, error) {
   294  	ret := _m.Called()
   295  
   296  	var r0 int64
   297  	if rf, ok := ret.Get(0).(func() int64); ok {
   298  		r0 = rf()
   299  	} else {
   300  		r0 = ret.Get(0).(int64)
   301  	}
   302  
   303  	var r1 error
   304  	if rf, ok := ret.Get(1).(func() error); ok {
   305  		r1 = rf()
   306  	} else {
   307  		r1 = ret.Error(1)
   308  	}
   309  
   310  	return r0, r1
   311  }
   312  
   313  // GetParentsForExportAfter provides a mock function with given fields: limit, afterID
   314  func (_m *PostStore) GetParentsForExportAfter(limit int, afterID string) ([]*model.PostForExport, error) {
   315  	ret := _m.Called(limit, afterID)
   316  
   317  	var r0 []*model.PostForExport
   318  	if rf, ok := ret.Get(0).(func(int, string) []*model.PostForExport); ok {
   319  		r0 = rf(limit, afterID)
   320  	} else {
   321  		if ret.Get(0) != nil {
   322  			r0 = ret.Get(0).([]*model.PostForExport)
   323  		}
   324  	}
   325  
   326  	var r1 error
   327  	if rf, ok := ret.Get(1).(func(int, string) error); ok {
   328  		r1 = rf(limit, afterID)
   329  	} else {
   330  		r1 = ret.Error(1)
   331  	}
   332  
   333  	return r0, r1
   334  }
   335  
   336  // GetPostAfterTime provides a mock function with given fields: channelID, time, collapsedThreads
   337  func (_m *PostStore) GetPostAfterTime(channelID string, time int64, collapsedThreads bool) (*model.Post, error) {
   338  	ret := _m.Called(channelID, time, collapsedThreads)
   339  
   340  	var r0 *model.Post
   341  	if rf, ok := ret.Get(0).(func(string, int64, bool) *model.Post); ok {
   342  		r0 = rf(channelID, time, collapsedThreads)
   343  	} else {
   344  		if ret.Get(0) != nil {
   345  			r0 = ret.Get(0).(*model.Post)
   346  		}
   347  	}
   348  
   349  	var r1 error
   350  	if rf, ok := ret.Get(1).(func(string, int64, bool) error); ok {
   351  		r1 = rf(channelID, time, collapsedThreads)
   352  	} else {
   353  		r1 = ret.Error(1)
   354  	}
   355  
   356  	return r0, r1
   357  }
   358  
   359  // GetPostIdAfterTime provides a mock function with given fields: channelID, time, collapsedThreads
   360  func (_m *PostStore) GetPostIdAfterTime(channelID string, time int64, collapsedThreads bool) (string, error) {
   361  	ret := _m.Called(channelID, time, collapsedThreads)
   362  
   363  	var r0 string
   364  	if rf, ok := ret.Get(0).(func(string, int64, bool) string); ok {
   365  		r0 = rf(channelID, time, collapsedThreads)
   366  	} else {
   367  		r0 = ret.Get(0).(string)
   368  	}
   369  
   370  	var r1 error
   371  	if rf, ok := ret.Get(1).(func(string, int64, bool) error); ok {
   372  		r1 = rf(channelID, time, collapsedThreads)
   373  	} else {
   374  		r1 = ret.Error(1)
   375  	}
   376  
   377  	return r0, r1
   378  }
   379  
   380  // GetPostIdBeforeTime provides a mock function with given fields: channelID, time, collapsedThreads
   381  func (_m *PostStore) GetPostIdBeforeTime(channelID string, time int64, collapsedThreads bool) (string, error) {
   382  	ret := _m.Called(channelID, time, collapsedThreads)
   383  
   384  	var r0 string
   385  	if rf, ok := ret.Get(0).(func(string, int64, bool) string); ok {
   386  		r0 = rf(channelID, time, collapsedThreads)
   387  	} else {
   388  		r0 = ret.Get(0).(string)
   389  	}
   390  
   391  	var r1 error
   392  	if rf, ok := ret.Get(1).(func(string, int64, bool) error); ok {
   393  		r1 = rf(channelID, time, collapsedThreads)
   394  	} else {
   395  		r1 = ret.Error(1)
   396  	}
   397  
   398  	return r0, r1
   399  }
   400  
   401  // GetPosts provides a mock function with given fields: options, allowFromCache
   402  func (_m *PostStore) GetPosts(options model.GetPostsOptions, allowFromCache bool) (*model.PostList, error) {
   403  	ret := _m.Called(options, allowFromCache)
   404  
   405  	var r0 *model.PostList
   406  	if rf, ok := ret.Get(0).(func(model.GetPostsOptions, bool) *model.PostList); ok {
   407  		r0 = rf(options, allowFromCache)
   408  	} else {
   409  		if ret.Get(0) != nil {
   410  			r0 = ret.Get(0).(*model.PostList)
   411  		}
   412  	}
   413  
   414  	var r1 error
   415  	if rf, ok := ret.Get(1).(func(model.GetPostsOptions, bool) error); ok {
   416  		r1 = rf(options, allowFromCache)
   417  	} else {
   418  		r1 = ret.Error(1)
   419  	}
   420  
   421  	return r0, r1
   422  }
   423  
   424  // GetPostsAfter provides a mock function with given fields: options
   425  func (_m *PostStore) GetPostsAfter(options model.GetPostsOptions) (*model.PostList, error) {
   426  	ret := _m.Called(options)
   427  
   428  	var r0 *model.PostList
   429  	if rf, ok := ret.Get(0).(func(model.GetPostsOptions) *model.PostList); ok {
   430  		r0 = rf(options)
   431  	} else {
   432  		if ret.Get(0) != nil {
   433  			r0 = ret.Get(0).(*model.PostList)
   434  		}
   435  	}
   436  
   437  	var r1 error
   438  	if rf, ok := ret.Get(1).(func(model.GetPostsOptions) error); ok {
   439  		r1 = rf(options)
   440  	} else {
   441  		r1 = ret.Error(1)
   442  	}
   443  
   444  	return r0, r1
   445  }
   446  
   447  // GetPostsBatchForIndexing provides a mock function with given fields: startTime, endTime, limit
   448  func (_m *PostStore) GetPostsBatchForIndexing(startTime int64, endTime int64, limit int) ([]*model.PostForIndexing, error) {
   449  	ret := _m.Called(startTime, endTime, limit)
   450  
   451  	var r0 []*model.PostForIndexing
   452  	if rf, ok := ret.Get(0).(func(int64, int64, int) []*model.PostForIndexing); ok {
   453  		r0 = rf(startTime, endTime, limit)
   454  	} else {
   455  		if ret.Get(0) != nil {
   456  			r0 = ret.Get(0).([]*model.PostForIndexing)
   457  		}
   458  	}
   459  
   460  	var r1 error
   461  	if rf, ok := ret.Get(1).(func(int64, int64, int) error); ok {
   462  		r1 = rf(startTime, endTime, limit)
   463  	} else {
   464  		r1 = ret.Error(1)
   465  	}
   466  
   467  	return r0, r1
   468  }
   469  
   470  // GetPostsBefore provides a mock function with given fields: options
   471  func (_m *PostStore) GetPostsBefore(options model.GetPostsOptions) (*model.PostList, error) {
   472  	ret := _m.Called(options)
   473  
   474  	var r0 *model.PostList
   475  	if rf, ok := ret.Get(0).(func(model.GetPostsOptions) *model.PostList); ok {
   476  		r0 = rf(options)
   477  	} else {
   478  		if ret.Get(0) != nil {
   479  			r0 = ret.Get(0).(*model.PostList)
   480  		}
   481  	}
   482  
   483  	var r1 error
   484  	if rf, ok := ret.Get(1).(func(model.GetPostsOptions) error); ok {
   485  		r1 = rf(options)
   486  	} else {
   487  		r1 = ret.Error(1)
   488  	}
   489  
   490  	return r0, r1
   491  }
   492  
   493  // GetPostsByIds provides a mock function with given fields: postIds
   494  func (_m *PostStore) GetPostsByIds(postIds []string) ([]*model.Post, error) {
   495  	ret := _m.Called(postIds)
   496  
   497  	var r0 []*model.Post
   498  	if rf, ok := ret.Get(0).(func([]string) []*model.Post); ok {
   499  		r0 = rf(postIds)
   500  	} else {
   501  		if ret.Get(0) != nil {
   502  			r0 = ret.Get(0).([]*model.Post)
   503  		}
   504  	}
   505  
   506  	var r1 error
   507  	if rf, ok := ret.Get(1).(func([]string) error); ok {
   508  		r1 = rf(postIds)
   509  	} else {
   510  		r1 = ret.Error(1)
   511  	}
   512  
   513  	return r0, r1
   514  }
   515  
   516  // GetPostsCreatedAt provides a mock function with given fields: channelID, time
   517  func (_m *PostStore) GetPostsCreatedAt(channelID string, time int64) ([]*model.Post, error) {
   518  	ret := _m.Called(channelID, time)
   519  
   520  	var r0 []*model.Post
   521  	if rf, ok := ret.Get(0).(func(string, int64) []*model.Post); ok {
   522  		r0 = rf(channelID, time)
   523  	} else {
   524  		if ret.Get(0) != nil {
   525  			r0 = ret.Get(0).([]*model.Post)
   526  		}
   527  	}
   528  
   529  	var r1 error
   530  	if rf, ok := ret.Get(1).(func(string, int64) error); ok {
   531  		r1 = rf(channelID, time)
   532  	} else {
   533  		r1 = ret.Error(1)
   534  	}
   535  
   536  	return r0, r1
   537  }
   538  
   539  // GetPostsSince provides a mock function with given fields: options, allowFromCache
   540  func (_m *PostStore) GetPostsSince(options model.GetPostsSinceOptions, allowFromCache bool) (*model.PostList, error) {
   541  	ret := _m.Called(options, allowFromCache)
   542  
   543  	var r0 *model.PostList
   544  	if rf, ok := ret.Get(0).(func(model.GetPostsSinceOptions, bool) *model.PostList); ok {
   545  		r0 = rf(options, allowFromCache)
   546  	} else {
   547  		if ret.Get(0) != nil {
   548  			r0 = ret.Get(0).(*model.PostList)
   549  		}
   550  	}
   551  
   552  	var r1 error
   553  	if rf, ok := ret.Get(1).(func(model.GetPostsSinceOptions, bool) error); ok {
   554  		r1 = rf(options, allowFromCache)
   555  	} else {
   556  		r1 = ret.Error(1)
   557  	}
   558  
   559  	return r0, r1
   560  }
   561  
   562  // GetPostsSinceForSync provides a mock function with given fields: options, cursor, limit
   563  func (_m *PostStore) GetPostsSinceForSync(options model.GetPostsSinceForSyncOptions, cursor model.GetPostsSinceForSyncCursor, limit int) ([]*model.Post, model.GetPostsSinceForSyncCursor, error) {
   564  	ret := _m.Called(options, cursor, limit)
   565  
   566  	var r0 []*model.Post
   567  	if rf, ok := ret.Get(0).(func(model.GetPostsSinceForSyncOptions, model.GetPostsSinceForSyncCursor, int) []*model.Post); ok {
   568  		r0 = rf(options, cursor, limit)
   569  	} else {
   570  		if ret.Get(0) != nil {
   571  			r0 = ret.Get(0).([]*model.Post)
   572  		}
   573  	}
   574  
   575  	var r1 model.GetPostsSinceForSyncCursor
   576  	if rf, ok := ret.Get(1).(func(model.GetPostsSinceForSyncOptions, model.GetPostsSinceForSyncCursor, int) model.GetPostsSinceForSyncCursor); ok {
   577  		r1 = rf(options, cursor, limit)
   578  	} else {
   579  		r1 = ret.Get(1).(model.GetPostsSinceForSyncCursor)
   580  	}
   581  
   582  	var r2 error
   583  	if rf, ok := ret.Get(2).(func(model.GetPostsSinceForSyncOptions, model.GetPostsSinceForSyncCursor, int) error); ok {
   584  		r2 = rf(options, cursor, limit)
   585  	} else {
   586  		r2 = ret.Error(2)
   587  	}
   588  
   589  	return r0, r1, r2
   590  }
   591  
   592  // GetRepliesForExport provides a mock function with given fields: parentID
   593  func (_m *PostStore) GetRepliesForExport(parentID string) ([]*model.ReplyForExport, error) {
   594  	ret := _m.Called(parentID)
   595  
   596  	var r0 []*model.ReplyForExport
   597  	if rf, ok := ret.Get(0).(func(string) []*model.ReplyForExport); ok {
   598  		r0 = rf(parentID)
   599  	} else {
   600  		if ret.Get(0) != nil {
   601  			r0 = ret.Get(0).([]*model.ReplyForExport)
   602  		}
   603  	}
   604  
   605  	var r1 error
   606  	if rf, ok := ret.Get(1).(func(string) error); ok {
   607  		r1 = rf(parentID)
   608  	} else {
   609  		r1 = ret.Error(1)
   610  	}
   611  
   612  	return r0, r1
   613  }
   614  
   615  // GetSingle provides a mock function with given fields: id, inclDeleted
   616  func (_m *PostStore) GetSingle(id string, inclDeleted bool) (*model.Post, error) {
   617  	ret := _m.Called(id, inclDeleted)
   618  
   619  	var r0 *model.Post
   620  	if rf, ok := ret.Get(0).(func(string, bool) *model.Post); ok {
   621  		r0 = rf(id, inclDeleted)
   622  	} else {
   623  		if ret.Get(0) != nil {
   624  			r0 = ret.Get(0).(*model.Post)
   625  		}
   626  	}
   627  
   628  	var r1 error
   629  	if rf, ok := ret.Get(1).(func(string, bool) error); ok {
   630  		r1 = rf(id, inclDeleted)
   631  	} else {
   632  		r1 = ret.Error(1)
   633  	}
   634  
   635  	return r0, r1
   636  }
   637  
   638  // HasAutoResponsePostByUserSince provides a mock function with given fields: options, userId
   639  func (_m *PostStore) HasAutoResponsePostByUserSince(options model.GetPostsSinceOptions, userId string) (bool, error) {
   640  	ret := _m.Called(options, userId)
   641  
   642  	var r0 bool
   643  	if rf, ok := ret.Get(0).(func(model.GetPostsSinceOptions, string) bool); ok {
   644  		r0 = rf(options, userId)
   645  	} else {
   646  		r0 = ret.Get(0).(bool)
   647  	}
   648  
   649  	var r1 error
   650  	if rf, ok := ret.Get(1).(func(model.GetPostsSinceOptions, string) error); ok {
   651  		r1 = rf(options, userId)
   652  	} else {
   653  		r1 = ret.Error(1)
   654  	}
   655  
   656  	return r0, r1
   657  }
   658  
   659  // InvalidateLastPostTimeCache provides a mock function with given fields: channelID
   660  func (_m *PostStore) InvalidateLastPostTimeCache(channelID string) {
   661  	_m.Called(channelID)
   662  }
   663  
   664  // Overwrite provides a mock function with given fields: post
   665  func (_m *PostStore) Overwrite(post *model.Post) (*model.Post, error) {
   666  	ret := _m.Called(post)
   667  
   668  	var r0 *model.Post
   669  	if rf, ok := ret.Get(0).(func(*model.Post) *model.Post); ok {
   670  		r0 = rf(post)
   671  	} else {
   672  		if ret.Get(0) != nil {
   673  			r0 = ret.Get(0).(*model.Post)
   674  		}
   675  	}
   676  
   677  	var r1 error
   678  	if rf, ok := ret.Get(1).(func(*model.Post) error); ok {
   679  		r1 = rf(post)
   680  	} else {
   681  		r1 = ret.Error(1)
   682  	}
   683  
   684  	return r0, r1
   685  }
   686  
   687  // OverwriteMultiple provides a mock function with given fields: posts
   688  func (_m *PostStore) OverwriteMultiple(posts []*model.Post) ([]*model.Post, int, error) {
   689  	ret := _m.Called(posts)
   690  
   691  	var r0 []*model.Post
   692  	if rf, ok := ret.Get(0).(func([]*model.Post) []*model.Post); ok {
   693  		r0 = rf(posts)
   694  	} else {
   695  		if ret.Get(0) != nil {
   696  			r0 = ret.Get(0).([]*model.Post)
   697  		}
   698  	}
   699  
   700  	var r1 int
   701  	if rf, ok := ret.Get(1).(func([]*model.Post) int); ok {
   702  		r1 = rf(posts)
   703  	} else {
   704  		r1 = ret.Get(1).(int)
   705  	}
   706  
   707  	var r2 error
   708  	if rf, ok := ret.Get(2).(func([]*model.Post) error); ok {
   709  		r2 = rf(posts)
   710  	} else {
   711  		r2 = ret.Error(2)
   712  	}
   713  
   714  	return r0, r1, r2
   715  }
   716  
   717  // PermanentDeleteBatch provides a mock function with given fields: endTime, limit
   718  func (_m *PostStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, error) {
   719  	ret := _m.Called(endTime, limit)
   720  
   721  	var r0 int64
   722  	if rf, ok := ret.Get(0).(func(int64, int64) int64); ok {
   723  		r0 = rf(endTime, limit)
   724  	} else {
   725  		r0 = ret.Get(0).(int64)
   726  	}
   727  
   728  	var r1 error
   729  	if rf, ok := ret.Get(1).(func(int64, int64) error); ok {
   730  		r1 = rf(endTime, limit)
   731  	} else {
   732  		r1 = ret.Error(1)
   733  	}
   734  
   735  	return r0, r1
   736  }
   737  
   738  // PermanentDeleteBatchForRetentionPolicies provides a mock function with given fields: now, globalPolicyEndTime, limit, cursor
   739  func (_m *PostStore) PermanentDeleteBatchForRetentionPolicies(now int64, globalPolicyEndTime int64, limit int64, cursor model.RetentionPolicyCursor) (int64, model.RetentionPolicyCursor, error) {
   740  	ret := _m.Called(now, globalPolicyEndTime, limit, cursor)
   741  
   742  	var r0 int64
   743  	if rf, ok := ret.Get(0).(func(int64, int64, int64, model.RetentionPolicyCursor) int64); ok {
   744  		r0 = rf(now, globalPolicyEndTime, limit, cursor)
   745  	} else {
   746  		r0 = ret.Get(0).(int64)
   747  	}
   748  
   749  	var r1 model.RetentionPolicyCursor
   750  	if rf, ok := ret.Get(1).(func(int64, int64, int64, model.RetentionPolicyCursor) model.RetentionPolicyCursor); ok {
   751  		r1 = rf(now, globalPolicyEndTime, limit, cursor)
   752  	} else {
   753  		r1 = ret.Get(1).(model.RetentionPolicyCursor)
   754  	}
   755  
   756  	var r2 error
   757  	if rf, ok := ret.Get(2).(func(int64, int64, int64, model.RetentionPolicyCursor) error); ok {
   758  		r2 = rf(now, globalPolicyEndTime, limit, cursor)
   759  	} else {
   760  		r2 = ret.Error(2)
   761  	}
   762  
   763  	return r0, r1, r2
   764  }
   765  
   766  // PermanentDeleteByChannel provides a mock function with given fields: channelID
   767  func (_m *PostStore) PermanentDeleteByChannel(channelID string) error {
   768  	ret := _m.Called(channelID)
   769  
   770  	var r0 error
   771  	if rf, ok := ret.Get(0).(func(string) error); ok {
   772  		r0 = rf(channelID)
   773  	} else {
   774  		r0 = ret.Error(0)
   775  	}
   776  
   777  	return r0
   778  }
   779  
   780  // PermanentDeleteByUser provides a mock function with given fields: userID
   781  func (_m *PostStore) PermanentDeleteByUser(userID string) error {
   782  	ret := _m.Called(userID)
   783  
   784  	var r0 error
   785  	if rf, ok := ret.Get(0).(func(string) error); ok {
   786  		r0 = rf(userID)
   787  	} else {
   788  		r0 = ret.Error(0)
   789  	}
   790  
   791  	return r0
   792  }
   793  
   794  // Save provides a mock function with given fields: post
   795  func (_m *PostStore) Save(post *model.Post) (*model.Post, error) {
   796  	ret := _m.Called(post)
   797  
   798  	var r0 *model.Post
   799  	if rf, ok := ret.Get(0).(func(*model.Post) *model.Post); ok {
   800  		r0 = rf(post)
   801  	} else {
   802  		if ret.Get(0) != nil {
   803  			r0 = ret.Get(0).(*model.Post)
   804  		}
   805  	}
   806  
   807  	var r1 error
   808  	if rf, ok := ret.Get(1).(func(*model.Post) error); ok {
   809  		r1 = rf(post)
   810  	} else {
   811  		r1 = ret.Error(1)
   812  	}
   813  
   814  	return r0, r1
   815  }
   816  
   817  // SaveMultiple provides a mock function with given fields: posts
   818  func (_m *PostStore) SaveMultiple(posts []*model.Post) ([]*model.Post, int, error) {
   819  	ret := _m.Called(posts)
   820  
   821  	var r0 []*model.Post
   822  	if rf, ok := ret.Get(0).(func([]*model.Post) []*model.Post); ok {
   823  		r0 = rf(posts)
   824  	} else {
   825  		if ret.Get(0) != nil {
   826  			r0 = ret.Get(0).([]*model.Post)
   827  		}
   828  	}
   829  
   830  	var r1 int
   831  	if rf, ok := ret.Get(1).(func([]*model.Post) int); ok {
   832  		r1 = rf(posts)
   833  	} else {
   834  		r1 = ret.Get(1).(int)
   835  	}
   836  
   837  	var r2 error
   838  	if rf, ok := ret.Get(2).(func([]*model.Post) error); ok {
   839  		r2 = rf(posts)
   840  	} else {
   841  		r2 = ret.Error(2)
   842  	}
   843  
   844  	return r0, r1, r2
   845  }
   846  
   847  // Search provides a mock function with given fields: teamID, userID, params
   848  func (_m *PostStore) Search(teamID string, userID string, params *model.SearchParams) (*model.PostList, error) {
   849  	ret := _m.Called(teamID, userID, params)
   850  
   851  	var r0 *model.PostList
   852  	if rf, ok := ret.Get(0).(func(string, string, *model.SearchParams) *model.PostList); ok {
   853  		r0 = rf(teamID, userID, params)
   854  	} else {
   855  		if ret.Get(0) != nil {
   856  			r0 = ret.Get(0).(*model.PostList)
   857  		}
   858  	}
   859  
   860  	var r1 error
   861  	if rf, ok := ret.Get(1).(func(string, string, *model.SearchParams) error); ok {
   862  		r1 = rf(teamID, userID, params)
   863  	} else {
   864  		r1 = ret.Error(1)
   865  	}
   866  
   867  	return r0, r1
   868  }
   869  
   870  // SearchPostsInTeamForUser provides a mock function with given fields: paramsList, userID, teamID, page, perPage
   871  func (_m *PostStore) SearchPostsInTeamForUser(paramsList []*model.SearchParams, userID string, teamID string, page int, perPage int) (*model.PostSearchResults, error) {
   872  	ret := _m.Called(paramsList, userID, teamID, page, perPage)
   873  
   874  	var r0 *model.PostSearchResults
   875  	if rf, ok := ret.Get(0).(func([]*model.SearchParams, string, string, int, int) *model.PostSearchResults); ok {
   876  		r0 = rf(paramsList, userID, teamID, page, perPage)
   877  	} else {
   878  		if ret.Get(0) != nil {
   879  			r0 = ret.Get(0).(*model.PostSearchResults)
   880  		}
   881  	}
   882  
   883  	var r1 error
   884  	if rf, ok := ret.Get(1).(func([]*model.SearchParams, string, string, int, int) error); ok {
   885  		r1 = rf(paramsList, userID, teamID, page, perPage)
   886  	} else {
   887  		r1 = ret.Error(1)
   888  	}
   889  
   890  	return r0, r1
   891  }
   892  
   893  // Update provides a mock function with given fields: newPost, oldPost
   894  func (_m *PostStore) Update(newPost *model.Post, oldPost *model.Post) (*model.Post, error) {
   895  	ret := _m.Called(newPost, oldPost)
   896  
   897  	var r0 *model.Post
   898  	if rf, ok := ret.Get(0).(func(*model.Post, *model.Post) *model.Post); ok {
   899  		r0 = rf(newPost, oldPost)
   900  	} else {
   901  		if ret.Get(0) != nil {
   902  			r0 = ret.Get(0).(*model.Post)
   903  		}
   904  	}
   905  
   906  	var r1 error
   907  	if rf, ok := ret.Get(1).(func(*model.Post, *model.Post) error); ok {
   908  		r1 = rf(newPost, oldPost)
   909  	} else {
   910  		r1 = ret.Error(1)
   911  	}
   912  
   913  	return r0, r1
   914  }