mirror of
https://github.com/hanzoai/team.git
synced 2026-09-30 01:57:35 +00:00
* Revert "Revert "MM-57759: Bump mockery to version 2.42.2 to support go 1.22^" (#26772)"
This reverts commit ce1b0e7aa4.
* Added the hooks.go file changes as well
```release-note
NONE
```
96 lines
2.2 KiB
Go
96 lines
2.2 KiB
Go
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
|
|
|
// Regenerate this file using `make store-mocks`.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
model "github.com/mattermost/mattermost/server/public/model"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// 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, error) {
|
|
ret := _m.Called(user_id, offset, limit)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Get")
|
|
}
|
|
|
|
var r0 model.Audits
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, int, int) (model.Audits, error)); ok {
|
|
return rf(user_id, offset, limit)
|
|
}
|
|
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)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, int, int) error); ok {
|
|
r1 = rf(user_id, offset, limit)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// PermanentDeleteByUser provides a mock function with given fields: userID
|
|
func (_m *AuditStore) PermanentDeleteByUser(userID string) error {
|
|
ret := _m.Called(userID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for PermanentDeleteByUser")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = rf(userID)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Save provides a mock function with given fields: audit
|
|
func (_m *AuditStore) Save(audit *model.Audit) error {
|
|
ret := _m.Called(audit)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Save")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(*model.Audit) error); ok {
|
|
r0 = rf(audit)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// NewAuditStore creates a new instance of AuditStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewAuditStore(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *AuditStore {
|
|
mock := &AuditStore{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|