github.com/qichengzx/mattermost-server@v4.5.1-0.20180604164826-2c75247c97d0+incompatible/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/mattermost/mattermost-server/model"
     9  import store "github.com/mattermost/mattermost-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) store.StoreChannel {
    18  	ret := _m.Called(teamId, mustHaveFile, mustHaveHashtag)
    19  
    20  	var r0 store.StoreChannel
    21  	if rf, ok := ret.Get(0).(func(string, bool, bool) store.StoreChannel); ok {
    22  		r0 = rf(teamId, mustHaveFile, mustHaveHashtag)
    23  	} else {
    24  		if ret.Get(0) != nil {
    25  			r0 = ret.Get(0).(store.StoreChannel)
    26  		}
    27  	}
    28  
    29  	return r0
    30  }
    31  
    32  // AnalyticsPostCountsByDay provides a mock function with given fields: teamId
    33  func (_m *PostStore) AnalyticsPostCountsByDay(teamId string) store.StoreChannel {
    34  	ret := _m.Called(teamId)
    35  
    36  	var r0 store.StoreChannel
    37  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
    38  		r0 = rf(teamId)
    39  	} else {
    40  		if ret.Get(0) != nil {
    41  			r0 = ret.Get(0).(store.StoreChannel)
    42  		}
    43  	}
    44  
    45  	return r0
    46  }
    47  
    48  // AnalyticsUserCountsWithPostsByDay provides a mock function with given fields: teamId
    49  func (_m *PostStore) AnalyticsUserCountsWithPostsByDay(teamId string) store.StoreChannel {
    50  	ret := _m.Called(teamId)
    51  
    52  	var r0 store.StoreChannel
    53  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
    54  		r0 = rf(teamId)
    55  	} else {
    56  		if ret.Get(0) != nil {
    57  			r0 = ret.Get(0).(store.StoreChannel)
    58  		}
    59  	}
    60  
    61  	return r0
    62  }
    63  
    64  // ClearCaches provides a mock function with given fields:
    65  func (_m *PostStore) ClearCaches() {
    66  	_m.Called()
    67  }
    68  
    69  // Delete provides a mock function with given fields: postId, time
    70  func (_m *PostStore) Delete(postId string, time int64, deleteByID string) store.StoreChannel {
    71  	ret := _m.Called(postId, time)
    72  
    73  	var r0 store.StoreChannel
    74  	if rf, ok := ret.Get(0).(func(string, int64, string) store.StoreChannel); ok {
    75  		r0 = rf(postId, time, deleteByID)
    76  	} else {
    77  		if ret.Get(0) != nil {
    78  			r0 = ret.Get(0).(store.StoreChannel)
    79  		}
    80  	}
    81  
    82  	return r0
    83  }
    84  
    85  // Get provides a mock function with given fields: id
    86  func (_m *PostStore) Get(id string) store.StoreChannel {
    87  	ret := _m.Called(id)
    88  
    89  	var r0 store.StoreChannel
    90  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
    91  		r0 = rf(id)
    92  	} else {
    93  		if ret.Get(0) != nil {
    94  			r0 = ret.Get(0).(store.StoreChannel)
    95  		}
    96  	}
    97  
    98  	return r0
    99  }
   100  
   101  // GetEtag provides a mock function with given fields: channelId, allowFromCache
   102  func (_m *PostStore) GetEtag(channelId string, allowFromCache bool) store.StoreChannel {
   103  	ret := _m.Called(channelId, allowFromCache)
   104  
   105  	var r0 store.StoreChannel
   106  	if rf, ok := ret.Get(0).(func(string, bool) store.StoreChannel); ok {
   107  		r0 = rf(channelId, allowFromCache)
   108  	} else {
   109  		if ret.Get(0) != nil {
   110  			r0 = ret.Get(0).(store.StoreChannel)
   111  		}
   112  	}
   113  
   114  	return r0
   115  }
   116  
   117  // GetFlaggedPosts provides a mock function with given fields: userId, offset, limit
   118  func (_m *PostStore) GetFlaggedPosts(userId string, offset int, limit int) store.StoreChannel {
   119  	ret := _m.Called(userId, offset, limit)
   120  
   121  	var r0 store.StoreChannel
   122  	if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok {
   123  		r0 = rf(userId, offset, limit)
   124  	} else {
   125  		if ret.Get(0) != nil {
   126  			r0 = ret.Get(0).(store.StoreChannel)
   127  		}
   128  	}
   129  
   130  	return r0
   131  }
   132  
   133  // GetFlaggedPostsForChannel provides a mock function with given fields: userId, channelId, offset, limit
   134  func (_m *PostStore) GetFlaggedPostsForChannel(userId string, channelId string, offset int, limit int) store.StoreChannel {
   135  	ret := _m.Called(userId, channelId, offset, limit)
   136  
   137  	var r0 store.StoreChannel
   138  	if rf, ok := ret.Get(0).(func(string, string, int, int) store.StoreChannel); ok {
   139  		r0 = rf(userId, channelId, offset, limit)
   140  	} else {
   141  		if ret.Get(0) != nil {
   142  			r0 = ret.Get(0).(store.StoreChannel)
   143  		}
   144  	}
   145  
   146  	return r0
   147  }
   148  
   149  // GetFlaggedPostsForTeam provides a mock function with given fields: userId, teamId, offset, limit
   150  func (_m *PostStore) GetFlaggedPostsForTeam(userId string, teamId string, offset int, limit int) store.StoreChannel {
   151  	ret := _m.Called(userId, teamId, offset, limit)
   152  
   153  	var r0 store.StoreChannel
   154  	if rf, ok := ret.Get(0).(func(string, string, int, int) store.StoreChannel); ok {
   155  		r0 = rf(userId, teamId, offset, limit)
   156  	} else {
   157  		if ret.Get(0) != nil {
   158  			r0 = ret.Get(0).(store.StoreChannel)
   159  		}
   160  	}
   161  
   162  	return r0
   163  }
   164  
   165  // GetMaxPostSize provides a mock function with given fields:
   166  func (_m *PostStore) GetMaxPostSize() store.StoreChannel {
   167  	ret := _m.Called()
   168  
   169  	var r0 store.StoreChannel
   170  	if rf, ok := ret.Get(0).(func() store.StoreChannel); ok {
   171  		r0 = rf()
   172  	} else {
   173  		if ret.Get(0) != nil {
   174  			r0 = ret.Get(0).(store.StoreChannel)
   175  		}
   176  	}
   177  
   178  	return r0
   179  }
   180  
   181  // GetOldest provides a mock function with given fields:
   182  func (_m *PostStore) GetOldest() store.StoreChannel {
   183  	ret := _m.Called()
   184  
   185  	var r0 store.StoreChannel
   186  	if rf, ok := ret.Get(0).(func() store.StoreChannel); ok {
   187  		r0 = rf()
   188  	} else {
   189  		if ret.Get(0) != nil {
   190  			r0 = ret.Get(0).(store.StoreChannel)
   191  		}
   192  	}
   193  
   194  	return r0
   195  }
   196  
   197  // GetPosts provides a mock function with given fields: channelId, offset, limit, allowFromCache
   198  func (_m *PostStore) GetPosts(channelId string, offset int, limit int, allowFromCache bool) store.StoreChannel {
   199  	ret := _m.Called(channelId, offset, limit, allowFromCache)
   200  
   201  	var r0 store.StoreChannel
   202  	if rf, ok := ret.Get(0).(func(string, int, int, bool) store.StoreChannel); ok {
   203  		r0 = rf(channelId, offset, limit, allowFromCache)
   204  	} else {
   205  		if ret.Get(0) != nil {
   206  			r0 = ret.Get(0).(store.StoreChannel)
   207  		}
   208  	}
   209  
   210  	return r0
   211  }
   212  
   213  // GetPostsAfter provides a mock function with given fields: channelId, postId, numPosts, offset
   214  func (_m *PostStore) GetPostsAfter(channelId string, postId string, numPosts int, offset int) store.StoreChannel {
   215  	ret := _m.Called(channelId, postId, numPosts, offset)
   216  
   217  	var r0 store.StoreChannel
   218  	if rf, ok := ret.Get(0).(func(string, string, int, int) store.StoreChannel); ok {
   219  		r0 = rf(channelId, postId, numPosts, offset)
   220  	} else {
   221  		if ret.Get(0) != nil {
   222  			r0 = ret.Get(0).(store.StoreChannel)
   223  		}
   224  	}
   225  
   226  	return r0
   227  }
   228  
   229  // GetPostsBatchForIndexing provides a mock function with given fields: startTime, endTime, limit
   230  func (_m *PostStore) GetPostsBatchForIndexing(startTime int64, endTime int64, limit int) store.StoreChannel {
   231  	ret := _m.Called(startTime, endTime, limit)
   232  
   233  	var r0 store.StoreChannel
   234  	if rf, ok := ret.Get(0).(func(int64, int64, int) store.StoreChannel); ok {
   235  		r0 = rf(startTime, endTime, limit)
   236  	} else {
   237  		if ret.Get(0) != nil {
   238  			r0 = ret.Get(0).(store.StoreChannel)
   239  		}
   240  	}
   241  
   242  	return r0
   243  }
   244  
   245  // GetPostsBefore provides a mock function with given fields: channelId, postId, numPosts, offset
   246  func (_m *PostStore) GetPostsBefore(channelId string, postId string, numPosts int, offset int) store.StoreChannel {
   247  	ret := _m.Called(channelId, postId, numPosts, offset)
   248  
   249  	var r0 store.StoreChannel
   250  	if rf, ok := ret.Get(0).(func(string, string, int, int) store.StoreChannel); ok {
   251  		r0 = rf(channelId, postId, numPosts, offset)
   252  	} else {
   253  		if ret.Get(0) != nil {
   254  			r0 = ret.Get(0).(store.StoreChannel)
   255  		}
   256  	}
   257  
   258  	return r0
   259  }
   260  
   261  // GetPostsByIds provides a mock function with given fields: postIds
   262  func (_m *PostStore) GetPostsByIds(postIds []string) store.StoreChannel {
   263  	ret := _m.Called(postIds)
   264  
   265  	var r0 store.StoreChannel
   266  	if rf, ok := ret.Get(0).(func([]string) store.StoreChannel); ok {
   267  		r0 = rf(postIds)
   268  	} else {
   269  		if ret.Get(0) != nil {
   270  			r0 = ret.Get(0).(store.StoreChannel)
   271  		}
   272  	}
   273  
   274  	return r0
   275  }
   276  
   277  // GetPostsCreatedAt provides a mock function with given fields: channelId, time
   278  func (_m *PostStore) GetPostsCreatedAt(channelId string, time int64) store.StoreChannel {
   279  	ret := _m.Called(channelId, time)
   280  
   281  	var r0 store.StoreChannel
   282  	if rf, ok := ret.Get(0).(func(string, int64) store.StoreChannel); ok {
   283  		r0 = rf(channelId, time)
   284  	} else {
   285  		if ret.Get(0) != nil {
   286  			r0 = ret.Get(0).(store.StoreChannel)
   287  		}
   288  	}
   289  
   290  	return r0
   291  }
   292  
   293  // GetPostsSince provides a mock function with given fields: channelId, time, allowFromCache
   294  func (_m *PostStore) GetPostsSince(channelId string, time int64, allowFromCache bool) store.StoreChannel {
   295  	ret := _m.Called(channelId, time, allowFromCache)
   296  
   297  	var r0 store.StoreChannel
   298  	if rf, ok := ret.Get(0).(func(string, int64, bool) store.StoreChannel); ok {
   299  		r0 = rf(channelId, time, allowFromCache)
   300  	} else {
   301  		if ret.Get(0) != nil {
   302  			r0 = ret.Get(0).(store.StoreChannel)
   303  		}
   304  	}
   305  
   306  	return r0
   307  }
   308  
   309  // GetSingle provides a mock function with given fields: id
   310  func (_m *PostStore) GetSingle(id string) store.StoreChannel {
   311  	ret := _m.Called(id)
   312  
   313  	var r0 store.StoreChannel
   314  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
   315  		r0 = rf(id)
   316  	} else {
   317  		if ret.Get(0) != nil {
   318  			r0 = ret.Get(0).(store.StoreChannel)
   319  		}
   320  	}
   321  
   322  	return r0
   323  }
   324  
   325  // InvalidateLastPostTimeCache provides a mock function with given fields: channelId
   326  func (_m *PostStore) InvalidateLastPostTimeCache(channelId string) {
   327  	_m.Called(channelId)
   328  }
   329  
   330  // Overwrite provides a mock function with given fields: post
   331  func (_m *PostStore) Overwrite(post *model.Post) store.StoreChannel {
   332  	ret := _m.Called(post)
   333  
   334  	var r0 store.StoreChannel
   335  	if rf, ok := ret.Get(0).(func(*model.Post) store.StoreChannel); ok {
   336  		r0 = rf(post)
   337  	} else {
   338  		if ret.Get(0) != nil {
   339  			r0 = ret.Get(0).(store.StoreChannel)
   340  		}
   341  	}
   342  
   343  	return r0
   344  }
   345  
   346  // PermanentDeleteBatch provides a mock function with given fields: endTime, limit
   347  func (_m *PostStore) PermanentDeleteBatch(endTime int64, limit int64) store.StoreChannel {
   348  	ret := _m.Called(endTime, limit)
   349  
   350  	var r0 store.StoreChannel
   351  	if rf, ok := ret.Get(0).(func(int64, int64) store.StoreChannel); ok {
   352  		r0 = rf(endTime, limit)
   353  	} else {
   354  		if ret.Get(0) != nil {
   355  			r0 = ret.Get(0).(store.StoreChannel)
   356  		}
   357  	}
   358  
   359  	return r0
   360  }
   361  
   362  // PermanentDeleteByChannel provides a mock function with given fields: channelId
   363  func (_m *PostStore) PermanentDeleteByChannel(channelId string) store.StoreChannel {
   364  	ret := _m.Called(channelId)
   365  
   366  	var r0 store.StoreChannel
   367  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
   368  		r0 = rf(channelId)
   369  	} else {
   370  		if ret.Get(0) != nil {
   371  			r0 = ret.Get(0).(store.StoreChannel)
   372  		}
   373  	}
   374  
   375  	return r0
   376  }
   377  
   378  // PermanentDeleteByUser provides a mock function with given fields: userId
   379  func (_m *PostStore) PermanentDeleteByUser(userId string) store.StoreChannel {
   380  	ret := _m.Called(userId)
   381  
   382  	var r0 store.StoreChannel
   383  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
   384  		r0 = rf(userId)
   385  	} else {
   386  		if ret.Get(0) != nil {
   387  			r0 = ret.Get(0).(store.StoreChannel)
   388  		}
   389  	}
   390  
   391  	return r0
   392  }
   393  
   394  // Save provides a mock function with given fields: post
   395  func (_m *PostStore) Save(post *model.Post) store.StoreChannel {
   396  	ret := _m.Called(post)
   397  
   398  	var r0 store.StoreChannel
   399  	if rf, ok := ret.Get(0).(func(*model.Post) store.StoreChannel); ok {
   400  		r0 = rf(post)
   401  	} else {
   402  		if ret.Get(0) != nil {
   403  			r0 = ret.Get(0).(store.StoreChannel)
   404  		}
   405  	}
   406  
   407  	return r0
   408  }
   409  
   410  // Search provides a mock function with given fields: teamId, userId, params
   411  func (_m *PostStore) Search(teamId string, userId string, params *model.SearchParams) store.StoreChannel {
   412  	ret := _m.Called(teamId, userId, params)
   413  
   414  	var r0 store.StoreChannel
   415  	if rf, ok := ret.Get(0).(func(string, string, *model.SearchParams) store.StoreChannel); ok {
   416  		r0 = rf(teamId, userId, params)
   417  	} else {
   418  		if ret.Get(0) != nil {
   419  			r0 = ret.Get(0).(store.StoreChannel)
   420  		}
   421  	}
   422  
   423  	return r0
   424  }
   425  
   426  // Update provides a mock function with given fields: newPost, oldPost
   427  func (_m *PostStore) Update(newPost *model.Post, oldPost *model.Post) store.StoreChannel {
   428  	ret := _m.Called(newPost, oldPost)
   429  
   430  	var r0 store.StoreChannel
   431  	if rf, ok := ret.Get(0).(func(*model.Post, *model.Post) store.StoreChannel); ok {
   432  		r0 = rf(newPost, oldPost)
   433  	} else {
   434  		if ret.Get(0) != nil {
   435  			r0 = ret.Get(0).(store.StoreChannel)
   436  		}
   437  	}
   438  
   439  	return r0
   440  }