github.com/xzl8028/xenia-server@v0.0.0-20190809101854-18450a97da63/store/storetest/mocks/PostStore.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 mock "github.com/stretchr/testify/mock"
     8  import model "github.com/xzl8028/xenia-server/model"
     9  import store "github.com/xzl8028/xenia-server/store"
    10  
    11  // PostStore is an autogenerated mock type for the PostStore type
    12  type PostStore struct {
    13  	mock.Mock
    14  }
    15  
    16  // AnalyticsPostCount provides a mock function with given fields: teamId, mustHaveFile, mustHaveHashtag
    17  func (_m *PostStore) AnalyticsPostCount(teamId string, mustHaveFile bool, mustHaveHashtag bool) (int64, *model.AppError) {
    18  	ret := _m.Called(teamId, mustHaveFile, mustHaveHashtag)
    19  
    20  	var r0 int64
    21  	if rf, ok := ret.Get(0).(func(string, bool, bool) int64); ok {
    22  		r0 = rf(teamId, mustHaveFile, mustHaveHashtag)
    23  	} else {
    24  		r0 = ret.Get(0).(int64)
    25  	}
    26  
    27  	var r1 *model.AppError
    28  	if rf, ok := ret.Get(1).(func(string, bool, bool) *model.AppError); ok {
    29  		r1 = rf(teamId, mustHaveFile, mustHaveHashtag)
    30  	} else {
    31  		if ret.Get(1) != nil {
    32  			r1 = ret.Get(1).(*model.AppError)
    33  		}
    34  	}
    35  
    36  	return r0, r1
    37  }
    38  
    39  // AnalyticsPostCountsByDay provides a mock function with given fields: teamId
    40  func (_m *PostStore) AnalyticsPostCountsByDay(teamId string) (model.AnalyticsRows, *model.AppError) {
    41  	ret := _m.Called(teamId)
    42  
    43  	var r0 model.AnalyticsRows
    44  	if rf, ok := ret.Get(0).(func(string) model.AnalyticsRows); ok {
    45  		r0 = rf(teamId)
    46  	} else {
    47  		if ret.Get(0) != nil {
    48  			r0 = ret.Get(0).(model.AnalyticsRows)
    49  		}
    50  	}
    51  
    52  	var r1 *model.AppError
    53  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
    54  		r1 = rf(teamId)
    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  // AnalyticsUserCountsWithPostsByDay provides a mock function with given fields: teamId
    65  func (_m *PostStore) AnalyticsUserCountsWithPostsByDay(teamId string) (model.AnalyticsRows, *model.AppError) {
    66  	ret := _m.Called(teamId)
    67  
    68  	var r0 model.AnalyticsRows
    69  	if rf, ok := ret.Get(0).(func(string) model.AnalyticsRows); ok {
    70  		r0 = rf(teamId)
    71  	} else {
    72  		if ret.Get(0) != nil {
    73  			r0 = ret.Get(0).(model.AnalyticsRows)
    74  		}
    75  	}
    76  
    77  	var r1 *model.AppError
    78  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
    79  		r1 = rf(teamId)
    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  // ClearCaches provides a mock function with given fields:
    90  func (_m *PostStore) ClearCaches() {
    91  	_m.Called()
    92  }
    93  
    94  // Delete provides a mock function with given fields: postId, time, deleteByID
    95  func (_m *PostStore) Delete(postId string, time int64, deleteByID string) *model.AppError {
    96  	ret := _m.Called(postId, time, deleteByID)
    97  
    98  	var r0 *model.AppError
    99  	if rf, ok := ret.Get(0).(func(string, int64, string) *model.AppError); ok {
   100  		r0 = rf(postId, time, deleteByID)
   101  	} else {
   102  		if ret.Get(0) != nil {
   103  			r0 = ret.Get(0).(*model.AppError)
   104  		}
   105  	}
   106  
   107  	return r0
   108  }
   109  
   110  // Get provides a mock function with given fields: id
   111  func (_m *PostStore) Get(id string) (*model.PostList, *model.AppError) {
   112  	ret := _m.Called(id)
   113  
   114  	var r0 *model.PostList
   115  	if rf, ok := ret.Get(0).(func(string) *model.PostList); ok {
   116  		r0 = rf(id)
   117  	} else {
   118  		if ret.Get(0) != nil {
   119  			r0 = ret.Get(0).(*model.PostList)
   120  		}
   121  	}
   122  
   123  	var r1 *model.AppError
   124  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
   125  		r1 = rf(id)
   126  	} else {
   127  		if ret.Get(1) != nil {
   128  			r1 = ret.Get(1).(*model.AppError)
   129  		}
   130  	}
   131  
   132  	return r0, r1
   133  }
   134  
   135  // GetDirectPostParentsForExportAfter provides a mock function with given fields: limit, afterId
   136  func (_m *PostStore) GetDirectPostParentsForExportAfter(limit int, afterId string) ([]*model.DirectPostForExport, *model.AppError) {
   137  	ret := _m.Called(limit, afterId)
   138  
   139  	var r0 []*model.DirectPostForExport
   140  	if rf, ok := ret.Get(0).(func(int, string) []*model.DirectPostForExport); ok {
   141  		r0 = rf(limit, afterId)
   142  	} else {
   143  		if ret.Get(0) != nil {
   144  			r0 = ret.Get(0).([]*model.DirectPostForExport)
   145  		}
   146  	}
   147  
   148  	var r1 *model.AppError
   149  	if rf, ok := ret.Get(1).(func(int, string) *model.AppError); ok {
   150  		r1 = rf(limit, afterId)
   151  	} else {
   152  		if ret.Get(1) != nil {
   153  			r1 = ret.Get(1).(*model.AppError)
   154  		}
   155  	}
   156  
   157  	return r0, r1
   158  }
   159  
   160  // GetEtag provides a mock function with given fields: channelId, allowFromCache
   161  func (_m *PostStore) GetEtag(channelId string, allowFromCache bool) string {
   162  	ret := _m.Called(channelId, allowFromCache)
   163  
   164  	var r0 string
   165  	if rf, ok := ret.Get(0).(func(string, bool) string); ok {
   166  		r0 = rf(channelId, allowFromCache)
   167  	} else {
   168  		r0 = ret.Get(0).(string)
   169  	}
   170  
   171  	return r0
   172  }
   173  
   174  // GetFlaggedPosts provides a mock function with given fields: userId, offset, limit
   175  func (_m *PostStore) GetFlaggedPosts(userId string, offset int, limit int) (*model.PostList, *model.AppError) {
   176  	ret := _m.Called(userId, offset, limit)
   177  
   178  	var r0 *model.PostList
   179  	if rf, ok := ret.Get(0).(func(string, int, int) *model.PostList); ok {
   180  		r0 = rf(userId, offset, limit)
   181  	} else {
   182  		if ret.Get(0) != nil {
   183  			r0 = ret.Get(0).(*model.PostList)
   184  		}
   185  	}
   186  
   187  	var r1 *model.AppError
   188  	if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
   189  		r1 = rf(userId, offset, limit)
   190  	} else {
   191  		if ret.Get(1) != nil {
   192  			r1 = ret.Get(1).(*model.AppError)
   193  		}
   194  	}
   195  
   196  	return r0, r1
   197  }
   198  
   199  // GetFlaggedPostsForChannel provides a mock function with given fields: userId, channelId, offset, limit
   200  func (_m *PostStore) GetFlaggedPostsForChannel(userId string, channelId string, offset int, limit int) (*model.PostList, *model.AppError) {
   201  	ret := _m.Called(userId, channelId, offset, limit)
   202  
   203  	var r0 *model.PostList
   204  	if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok {
   205  		r0 = rf(userId, channelId, offset, limit)
   206  	} else {
   207  		if ret.Get(0) != nil {
   208  			r0 = ret.Get(0).(*model.PostList)
   209  		}
   210  	}
   211  
   212  	var r1 *model.AppError
   213  	if rf, ok := ret.Get(1).(func(string, string, int, int) *model.AppError); ok {
   214  		r1 = rf(userId, channelId, offset, limit)
   215  	} else {
   216  		if ret.Get(1) != nil {
   217  			r1 = ret.Get(1).(*model.AppError)
   218  		}
   219  	}
   220  
   221  	return r0, r1
   222  }
   223  
   224  // GetFlaggedPostsForTeam provides a mock function with given fields: userId, teamId, offset, limit
   225  func (_m *PostStore) GetFlaggedPostsForTeam(userId string, teamId string, offset int, limit int) (*model.PostList, *model.AppError) {
   226  	ret := _m.Called(userId, teamId, offset, limit)
   227  
   228  	var r0 *model.PostList
   229  	if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok {
   230  		r0 = rf(userId, teamId, offset, limit)
   231  	} else {
   232  		if ret.Get(0) != nil {
   233  			r0 = ret.Get(0).(*model.PostList)
   234  		}
   235  	}
   236  
   237  	var r1 *model.AppError
   238  	if rf, ok := ret.Get(1).(func(string, string, int, int) *model.AppError); ok {
   239  		r1 = rf(userId, teamId, offset, limit)
   240  	} else {
   241  		if ret.Get(1) != nil {
   242  			r1 = ret.Get(1).(*model.AppError)
   243  		}
   244  	}
   245  
   246  	return r0, r1
   247  }
   248  
   249  // GetMaxPostSize provides a mock function with given fields:
   250  func (_m *PostStore) GetMaxPostSize() int {
   251  	ret := _m.Called()
   252  
   253  	var r0 int
   254  	if rf, ok := ret.Get(0).(func() int); ok {
   255  		r0 = rf()
   256  	} else {
   257  		r0 = ret.Get(0).(int)
   258  	}
   259  
   260  	return r0
   261  }
   262  
   263  // GetOldest provides a mock function with given fields:
   264  func (_m *PostStore) GetOldest() (*model.Post, *model.AppError) {
   265  	ret := _m.Called()
   266  
   267  	var r0 *model.Post
   268  	if rf, ok := ret.Get(0).(func() *model.Post); ok {
   269  		r0 = rf()
   270  	} else {
   271  		if ret.Get(0) != nil {
   272  			r0 = ret.Get(0).(*model.Post)
   273  		}
   274  	}
   275  
   276  	var r1 *model.AppError
   277  	if rf, ok := ret.Get(1).(func() *model.AppError); ok {
   278  		r1 = rf()
   279  	} else {
   280  		if ret.Get(1) != nil {
   281  			r1 = ret.Get(1).(*model.AppError)
   282  		}
   283  	}
   284  
   285  	return r0, r1
   286  }
   287  
   288  // GetParentsForExportAfter provides a mock function with given fields: limit, afterId
   289  func (_m *PostStore) GetParentsForExportAfter(limit int, afterId string) ([]*model.PostForExport, *model.AppError) {
   290  	ret := _m.Called(limit, afterId)
   291  
   292  	var r0 []*model.PostForExport
   293  	if rf, ok := ret.Get(0).(func(int, string) []*model.PostForExport); ok {
   294  		r0 = rf(limit, afterId)
   295  	} else {
   296  		if ret.Get(0) != nil {
   297  			r0 = ret.Get(0).([]*model.PostForExport)
   298  		}
   299  	}
   300  
   301  	var r1 *model.AppError
   302  	if rf, ok := ret.Get(1).(func(int, string) *model.AppError); ok {
   303  		r1 = rf(limit, afterId)
   304  	} else {
   305  		if ret.Get(1) != nil {
   306  			r1 = ret.Get(1).(*model.AppError)
   307  		}
   308  	}
   309  
   310  	return r0, r1
   311  }
   312  
   313  // GetPosts provides a mock function with given fields: channelId, offset, limit, allowFromCache
   314  func (_m *PostStore) GetPosts(channelId string, offset int, limit int, allowFromCache bool) (*model.PostList, *model.AppError) {
   315  	ret := _m.Called(channelId, offset, limit, allowFromCache)
   316  
   317  	var r0 *model.PostList
   318  	if rf, ok := ret.Get(0).(func(string, int, int, bool) *model.PostList); ok {
   319  		r0 = rf(channelId, offset, limit, allowFromCache)
   320  	} else {
   321  		if ret.Get(0) != nil {
   322  			r0 = ret.Get(0).(*model.PostList)
   323  		}
   324  	}
   325  
   326  	var r1 *model.AppError
   327  	if rf, ok := ret.Get(1).(func(string, int, int, bool) *model.AppError); ok {
   328  		r1 = rf(channelId, offset, limit, allowFromCache)
   329  	} else {
   330  		if ret.Get(1) != nil {
   331  			r1 = ret.Get(1).(*model.AppError)
   332  		}
   333  	}
   334  
   335  	return r0, r1
   336  }
   337  
   338  // GetPostsAfter provides a mock function with given fields: channelId, postId, numPosts, offset
   339  func (_m *PostStore) GetPostsAfter(channelId string, postId string, numPosts int, offset int) (*model.PostList, *model.AppError) {
   340  	ret := _m.Called(channelId, postId, numPosts, offset)
   341  
   342  	var r0 *model.PostList
   343  	if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok {
   344  		r0 = rf(channelId, postId, numPosts, offset)
   345  	} else {
   346  		if ret.Get(0) != nil {
   347  			r0 = ret.Get(0).(*model.PostList)
   348  		}
   349  	}
   350  
   351  	var r1 *model.AppError
   352  	if rf, ok := ret.Get(1).(func(string, string, int, int) *model.AppError); ok {
   353  		r1 = rf(channelId, postId, numPosts, offset)
   354  	} else {
   355  		if ret.Get(1) != nil {
   356  			r1 = ret.Get(1).(*model.AppError)
   357  		}
   358  	}
   359  
   360  	return r0, r1
   361  }
   362  
   363  // GetPostsBatchForIndexing provides a mock function with given fields: startTime, endTime, limit
   364  func (_m *PostStore) GetPostsBatchForIndexing(startTime int64, endTime int64, limit int) ([]*model.PostForIndexing, *model.AppError) {
   365  	ret := _m.Called(startTime, endTime, limit)
   366  
   367  	var r0 []*model.PostForIndexing
   368  	if rf, ok := ret.Get(0).(func(int64, int64, int) []*model.PostForIndexing); ok {
   369  		r0 = rf(startTime, endTime, limit)
   370  	} else {
   371  		if ret.Get(0) != nil {
   372  			r0 = ret.Get(0).([]*model.PostForIndexing)
   373  		}
   374  	}
   375  
   376  	var r1 *model.AppError
   377  	if rf, ok := ret.Get(1).(func(int64, int64, int) *model.AppError); ok {
   378  		r1 = rf(startTime, endTime, limit)
   379  	} else {
   380  		if ret.Get(1) != nil {
   381  			r1 = ret.Get(1).(*model.AppError)
   382  		}
   383  	}
   384  
   385  	return r0, r1
   386  }
   387  
   388  // GetPostsBefore provides a mock function with given fields: channelId, postId, numPosts, offset
   389  func (_m *PostStore) GetPostsBefore(channelId string, postId string, numPosts int, offset int) (*model.PostList, *model.AppError) {
   390  	ret := _m.Called(channelId, postId, numPosts, offset)
   391  
   392  	var r0 *model.PostList
   393  	if rf, ok := ret.Get(0).(func(string, string, int, int) *model.PostList); ok {
   394  		r0 = rf(channelId, postId, numPosts, offset)
   395  	} else {
   396  		if ret.Get(0) != nil {
   397  			r0 = ret.Get(0).(*model.PostList)
   398  		}
   399  	}
   400  
   401  	var r1 *model.AppError
   402  	if rf, ok := ret.Get(1).(func(string, string, int, int) *model.AppError); ok {
   403  		r1 = rf(channelId, postId, numPosts, offset)
   404  	} else {
   405  		if ret.Get(1) != nil {
   406  			r1 = ret.Get(1).(*model.AppError)
   407  		}
   408  	}
   409  
   410  	return r0, r1
   411  }
   412  
   413  // GetPostsByIds provides a mock function with given fields: postIds
   414  func (_m *PostStore) GetPostsByIds(postIds []string) ([]*model.Post, *model.AppError) {
   415  	ret := _m.Called(postIds)
   416  
   417  	var r0 []*model.Post
   418  	if rf, ok := ret.Get(0).(func([]string) []*model.Post); ok {
   419  		r0 = rf(postIds)
   420  	} else {
   421  		if ret.Get(0) != nil {
   422  			r0 = ret.Get(0).([]*model.Post)
   423  		}
   424  	}
   425  
   426  	var r1 *model.AppError
   427  	if rf, ok := ret.Get(1).(func([]string) *model.AppError); ok {
   428  		r1 = rf(postIds)
   429  	} else {
   430  		if ret.Get(1) != nil {
   431  			r1 = ret.Get(1).(*model.AppError)
   432  		}
   433  	}
   434  
   435  	return r0, r1
   436  }
   437  
   438  // GetPostsCreatedAt provides a mock function with given fields: channelId, time
   439  func (_m *PostStore) GetPostsCreatedAt(channelId string, time int64) ([]*model.Post, *model.AppError) {
   440  	ret := _m.Called(channelId, time)
   441  
   442  	var r0 []*model.Post
   443  	if rf, ok := ret.Get(0).(func(string, int64) []*model.Post); ok {
   444  		r0 = rf(channelId, time)
   445  	} else {
   446  		if ret.Get(0) != nil {
   447  			r0 = ret.Get(0).([]*model.Post)
   448  		}
   449  	}
   450  
   451  	var r1 *model.AppError
   452  	if rf, ok := ret.Get(1).(func(string, int64) *model.AppError); ok {
   453  		r1 = rf(channelId, time)
   454  	} else {
   455  		if ret.Get(1) != nil {
   456  			r1 = ret.Get(1).(*model.AppError)
   457  		}
   458  	}
   459  
   460  	return r0, r1
   461  }
   462  
   463  // GetPostsSince provides a mock function with given fields: channelId, time, allowFromCache
   464  func (_m *PostStore) GetPostsSince(channelId string, time int64, allowFromCache bool) (*model.PostList, *model.AppError) {
   465  	ret := _m.Called(channelId, time, allowFromCache)
   466  
   467  	var r0 *model.PostList
   468  	if rf, ok := ret.Get(0).(func(string, int64, bool) *model.PostList); ok {
   469  		r0 = rf(channelId, time, allowFromCache)
   470  	} else {
   471  		if ret.Get(0) != nil {
   472  			r0 = ret.Get(0).(*model.PostList)
   473  		}
   474  	}
   475  
   476  	var r1 *model.AppError
   477  	if rf, ok := ret.Get(1).(func(string, int64, bool) *model.AppError); ok {
   478  		r1 = rf(channelId, time, allowFromCache)
   479  	} else {
   480  		if ret.Get(1) != nil {
   481  			r1 = ret.Get(1).(*model.AppError)
   482  		}
   483  	}
   484  
   485  	return r0, r1
   486  }
   487  
   488  // GetRepliesForExport provides a mock function with given fields: parentId
   489  func (_m *PostStore) GetRepliesForExport(parentId string) ([]*model.ReplyForExport, *model.AppError) {
   490  	ret := _m.Called(parentId)
   491  
   492  	var r0 []*model.ReplyForExport
   493  	if rf, ok := ret.Get(0).(func(string) []*model.ReplyForExport); ok {
   494  		r0 = rf(parentId)
   495  	} else {
   496  		if ret.Get(0) != nil {
   497  			r0 = ret.Get(0).([]*model.ReplyForExport)
   498  		}
   499  	}
   500  
   501  	var r1 *model.AppError
   502  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
   503  		r1 = rf(parentId)
   504  	} else {
   505  		if ret.Get(1) != nil {
   506  			r1 = ret.Get(1).(*model.AppError)
   507  		}
   508  	}
   509  
   510  	return r0, r1
   511  }
   512  
   513  // GetSingle provides a mock function with given fields: id
   514  func (_m *PostStore) GetSingle(id string) (*model.Post, *model.AppError) {
   515  	ret := _m.Called(id)
   516  
   517  	var r0 *model.Post
   518  	if rf, ok := ret.Get(0).(func(string) *model.Post); ok {
   519  		r0 = rf(id)
   520  	} else {
   521  		if ret.Get(0) != nil {
   522  			r0 = ret.Get(0).(*model.Post)
   523  		}
   524  	}
   525  
   526  	var r1 *model.AppError
   527  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
   528  		r1 = rf(id)
   529  	} else {
   530  		if ret.Get(1) != nil {
   531  			r1 = ret.Get(1).(*model.AppError)
   532  		}
   533  	}
   534  
   535  	return r0, r1
   536  }
   537  
   538  
   539  func (_m *PostStore) SelectByMessage(message string) (*model.Post, *model.AppError) {
   540  	ret := _m.Called(message)
   541  
   542  	var r0 *model.Post
   543  	if rf, ok := ret.Get(0).(func(string) *model.Post); ok {
   544  		r0 = rf(message)
   545  	} else {
   546  		if ret.Get(0) != nil {
   547  			r0 = ret.Get(0).(*model.Post)
   548  		}
   549  	}
   550  
   551  	var r1 *model.AppError
   552  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
   553  		r1 = rf(message)
   554  	} else {
   555  		if ret.Get(1) != nil {
   556  			r1 = ret.Get(1).(*model.AppError)
   557  		}
   558  	}
   559  
   560  	return r0, r1
   561  }
   562  
   563  
   564  
   565  
   566  
   567  // InvalidateLastPostTimeCache provides a mock function with given fields: channelId
   568  func (_m *PostStore) InvalidateLastPostTimeCache(channelId string) {
   569  	_m.Called(channelId)
   570  }
   571  
   572  // Overwrite provides a mock function with given fields: post
   573  func (_m *PostStore) Overwrite(post *model.Post) (*model.Post, *model.AppError) {
   574  	ret := _m.Called(post)
   575  
   576  	var r0 *model.Post
   577  	if rf, ok := ret.Get(0).(func(*model.Post) *model.Post); ok {
   578  		r0 = rf(post)
   579  	} else {
   580  		if ret.Get(0) != nil {
   581  			r0 = ret.Get(0).(*model.Post)
   582  		}
   583  	}
   584  
   585  	var r1 *model.AppError
   586  	if rf, ok := ret.Get(1).(func(*model.Post) *model.AppError); ok {
   587  		r1 = rf(post)
   588  	} else {
   589  		if ret.Get(1) != nil {
   590  			r1 = ret.Get(1).(*model.AppError)
   591  		}
   592  	}
   593  
   594  	return r0, r1
   595  }
   596  
   597  // PermanentDeleteBatch provides a mock function with given fields: endTime, limit
   598  func (_m *PostStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, *model.AppError) {
   599  	ret := _m.Called(endTime, limit)
   600  
   601  	var r0 int64
   602  	if rf, ok := ret.Get(0).(func(int64, int64) int64); ok {
   603  		r0 = rf(endTime, limit)
   604  	} else {
   605  		r0 = ret.Get(0).(int64)
   606  	}
   607  
   608  	var r1 *model.AppError
   609  	if rf, ok := ret.Get(1).(func(int64, int64) *model.AppError); ok {
   610  		r1 = rf(endTime, limit)
   611  	} else {
   612  		if ret.Get(1) != nil {
   613  			r1 = ret.Get(1).(*model.AppError)
   614  		}
   615  	}
   616  
   617  	return r0, r1
   618  }
   619  
   620  // PermanentDeleteByChannel provides a mock function with given fields: channelId
   621  func (_m *PostStore) PermanentDeleteByChannel(channelId string) *model.AppError {
   622  	ret := _m.Called(channelId)
   623  
   624  	var r0 *model.AppError
   625  	if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
   626  		r0 = rf(channelId)
   627  	} else {
   628  		if ret.Get(0) != nil {
   629  			r0 = ret.Get(0).(*model.AppError)
   630  		}
   631  	}
   632  
   633  	return r0
   634  }
   635  
   636  // PermanentDeleteByUser provides a mock function with given fields: userId
   637  func (_m *PostStore) PermanentDeleteByUser(userId string) *model.AppError {
   638  	ret := _m.Called(userId)
   639  
   640  	var r0 *model.AppError
   641  	if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
   642  		r0 = rf(userId)
   643  	} else {
   644  		if ret.Get(0) != nil {
   645  			r0 = ret.Get(0).(*model.AppError)
   646  		}
   647  	}
   648  
   649  	return r0
   650  }
   651  
   652  // Save provides a mock function with given fields: post
   653  func (_m *PostStore) Save(post *model.Post) (*model.Post, *model.AppError) {
   654  	ret := _m.Called(post)
   655  
   656  	var r0 *model.Post
   657  	if rf, ok := ret.Get(0).(func(*model.Post) *model.Post); ok {
   658  		r0 = rf(post)
   659  	} else {
   660  		if ret.Get(0) != nil {
   661  			r0 = ret.Get(0).(*model.Post)
   662  		}
   663  	}
   664  
   665  	var r1 *model.AppError
   666  	if rf, ok := ret.Get(1).(func(*model.Post) *model.AppError); ok {
   667  		r1 = rf(post)
   668  	} else {
   669  		if ret.Get(1) != nil {
   670  			r1 = ret.Get(1).(*model.AppError)
   671  		}
   672  	}
   673  
   674  	return r0, r1
   675  }
   676  
   677  // Search provides a mock function with given fields: teamId, userId, params
   678  func (_m *PostStore) Search(teamId string, userId string, params *model.SearchParams) store.StoreChannel {
   679  	ret := _m.Called(teamId, userId, params)
   680  
   681  	var r0 store.StoreChannel
   682  	if rf, ok := ret.Get(0).(func(string, string, *model.SearchParams) store.StoreChannel); ok {
   683  		r0 = rf(teamId, userId, params)
   684  	} else {
   685  		if ret.Get(0) != nil {
   686  			r0 = ret.Get(0).(store.StoreChannel)
   687  		}
   688  	}
   689  
   690  	return r0
   691  }
   692  
   693  // Update provides a mock function with given fields: newPost, oldPost
   694  func (_m *PostStore) Update(newPost *model.Post, oldPost *model.Post) (*model.Post, *model.AppError) {
   695  	ret := _m.Called(newPost, oldPost)
   696  
   697  	var r0 *model.Post
   698  	if rf, ok := ret.Get(0).(func(*model.Post, *model.Post) *model.Post); ok {
   699  		r0 = rf(newPost, oldPost)
   700  	} else {
   701  		if ret.Get(0) != nil {
   702  			r0 = ret.Get(0).(*model.Post)
   703  		}
   704  	}
   705  
   706  	var r1 *model.AppError
   707  	if rf, ok := ret.Get(1).(func(*model.Post, *model.Post) *model.AppError); ok {
   708  		r1 = rf(newPost, oldPost)
   709  	} else {
   710  		if ret.Get(1) != nil {
   711  			r1 = ret.Get(1).(*model.AppError)
   712  		}
   713  	}
   714  
   715  	return r0, r1
   716  }