mirror of
https://github.com/mattermost/mattermost.git
synced 2026-10-28 02:36:08 +08:00
* Migrating audit store * Final migration example for the audit store * async example * Ending migration * Removing Async helper * Fixing tests * Fixing govet problems with the StoreResult instanstiation
94 lines
2.2 KiB
Go
94 lines
2.2 KiB
Go
// Code generated by mockery v1.0.0. DO NOT EDIT.
|
|
|
|
// Regenerate this file using `make store-mocks`.
|
|
|
|
package mocks
|
|
|
|
import mock "github.com/stretchr/testify/mock"
|
|
import model "github.com/mattermost/mattermost-server/model"
|
|
|
|
// AuditStore is an autogenerated mock type for the AuditStore type
|
|
type AuditStore struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// Get provides a mock function with given fields: user_id, offset, limit
|
|
func (_m *AuditStore) Get(user_id string, offset int, limit int) (model.Audits, *model.AppError) {
|
|
ret := _m.Called(user_id, offset, limit)
|
|
|
|
var r0 model.Audits
|
|
if rf, ok := ret.Get(0).(func(string, int, int) model.Audits); ok {
|
|
r0 = rf(user_id, offset, limit)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(model.Audits)
|
|
}
|
|
}
|
|
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
|
|
r1 = rf(user_id, offset, limit)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// PermanentDeleteBatch provides a mock function with given fields: endTime, limit
|
|
func (_m *AuditStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, *model.AppError) {
|
|
ret := _m.Called(endTime, limit)
|
|
|
|
var r0 int64
|
|
if rf, ok := ret.Get(0).(func(int64, int64) int64); ok {
|
|
r0 = rf(endTime, limit)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(1).(func(int64, int64) *model.AppError); ok {
|
|
r1 = rf(endTime, limit)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// PermanentDeleteByUser provides a mock function with given fields: userId
|
|
func (_m *AuditStore) PermanentDeleteByUser(userId string) *model.AppError {
|
|
ret := _m.Called(userId)
|
|
|
|
var r0 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
|
|
r0 = rf(userId)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Save provides a mock function with given fields: audit
|
|
func (_m *AuditStore) Save(audit *model.Audit) *model.AppError {
|
|
ret := _m.Called(audit)
|
|
|
|
var r0 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(*model.Audit) *model.AppError); ok {
|
|
r0 = rf(audit)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|