Some checks failed
Server CI / Postgres (shard 0) (push) Has been skipped
Server CI / Postgres (shard 3) (push) Has been skipped
BuildEnv Docker Image / build-image (push) Failing after 4s
BuildEnv Docker Image / build-image-fips (push) Failing after 4s
Migration Review & Release Notes / Generate migration review & release notes (push) Failing after 3s
Server CI / Build Environment (push) Failing after 3s
Server CI / Postgres (shard 1) (push) Has been skipped
Tools CI / check-style (mattermost-govet) (push) Failing after 4s
Server CI / Postgres (shard 2) (push) Has been skipped
Tools CI / check-style (mmgotool) (push) Failing after 3s
Server CI / Elasticsearch v8 Compatibility (push) Has been skipped
Server CI / OpenSearch v2 Compatibility (push) Has been skipped
Server CI / Postgres FIPS (shard 0) (push) Has been skipped
Tools CI / Test (mattermost-govet) (push) Failing after 3s
Server CI / Postgres FIPS (shard 1) (push) Has been skipped
Server CI / Postgres FIPS (shard 2) (push) Has been skipped
Tools CI / Test (mmgotool) (push) Failing after 3s
Server CI / Postgres FIPS (shard 3) (push) Has been skipped
Server CI / Run mmctl tests (push) Has been skipped
Server CI / Run mmctl tests (FIPS) (push) Has been skipped
Server CI / Merge Postgres Test Results (push) Has been skipped
Server CI / Merge Postgres FIPS Test Results (push) Has been skipped
Server CI / Check backport migrations (push) Has been skipped
Server CI / Check generated files (push) Has been skipped
Server CI / check-style (push) Has been skipped
Server CI / Vet API (push) Has been skipped
Server CI / Build mattermost server app (push) Has been skipped
Server CI / Server CI Complete (push) Failing after 2s
Server CI / Server CI Artifacts (push) Has been skipped
Server CI / Sentry Upload (push) Has been skipped
Server CI / Server CI Report (push) Failing after 5m1s
Server CI Nightly Race / Race Detector (push) Has been skipped
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Webapp CI Cache Warm / Warm Webapp node_modules Cache (push) Has been cancelled
E2E CI Cache Warm / Warm E2E npm Registry Cache (push) Has been cancelled
API / build (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-external-links (push) Has been cancelled
Web App CI / test (platform) (push) Has been cancelled
Web App CI / test (mattermost-redux) (push) Has been cancelled
Web App CI / test (channels shard 1/4) (push) Has been cancelled
Web App CI / test (channels shard 2/4) (push) Has been cancelled
Web App CI / test (channels shard 3/4) (push) Has been cancelled
Web App CI / test (channels shard 4/4) (push) Has been cancelled
Web App CI / upload-coverage (push) Has been cancelled
Web App CI / build (push) Has been cancelled
YAML Lint / yamllint (push) Has been cancelled
Push mirrored docker images / cd/Push mirrored docker images (push) Has been cancelled
docs-cd / Build and deploy docs (push) Has been cancelled
Docs CI / build (push) Has been cancelled
E2E Cache Warm: Cypress deps / Warm Cypress deps cache (push) Has been cancelled
Scorecards supply-chain security / Scorecard analysis (push) Has been cancelled
Server CI Weekly / Postgres FIPS (push) Has been skipped
Server CI Weekly / Run mmctl tests (FIPS) (push) Has been skipped
Server CI Weekly / Postgres with binary parameters (push) Has been skipped
Server CI Weekly / Build Environment (push) Failing after 1s
Server CI Cache Warm / Warm Go Module and Build Cache (push) Failing after 2s
Server CI Nightly Race / Build Environment (push) Failing after 1s
665 lines
17 KiB
Go
665 lines
17 KiB
Go
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
|
|
|
// Regenerate this file using `make store-mocks`.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
model "github.com/mattermost/mattermost/server/public/model"
|
|
request "github.com/mattermost/mattermost/server/public/shared/request"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// FileInfoStore is an autogenerated mock type for the FileInfoStore type
|
|
type FileInfoStore struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// AttachToPost provides a mock function with given fields: rctx, fileID, postID, channelID, creatorID
|
|
func (_m *FileInfoStore) AttachToPost(rctx request.CTX, fileID string, postID string, channelID string, creatorID string) error {
|
|
ret := _m.Called(rctx, fileID, postID, channelID, creatorID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AttachToPost")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, string, string, string) error); ok {
|
|
r0 = rf(rctx, fileID, postID, channelID, creatorID)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// ClearCaches provides a mock function with no fields
|
|
func (_m *FileInfoStore) ClearCaches() {
|
|
_m.Called()
|
|
}
|
|
|
|
// CountAll provides a mock function with no fields
|
|
func (_m *FileInfoStore) CountAll() (int64, error) {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CountAll")
|
|
}
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func() (int64, error)); ok {
|
|
return rf()
|
|
}
|
|
if rf, ok := ret.Get(0).(func() int64); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func() error); ok {
|
|
r1 = rf()
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// DeleteForPost provides a mock function with given fields: rctx, postID
|
|
func (_m *FileInfoStore) DeleteForPost(rctx request.CTX, postID string) (string, error) {
|
|
ret := _m.Called(rctx, postID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteForPost")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string) (string, error)); ok {
|
|
return rf(rctx, postID)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string) string); ok {
|
|
r0 = rf(rctx, postID)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, string) error); ok {
|
|
r1 = rf(rctx, postID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// DeleteForPostByIds provides a mock function with given fields: rctx, postId, fileIDs
|
|
func (_m *FileInfoStore) DeleteForPostByIds(rctx request.CTX, postId string, fileIDs []string) error {
|
|
ret := _m.Called(rctx, postId, fileIDs)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteForPostByIds")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, []string) error); ok {
|
|
r0 = rf(rctx, postId, fileIDs)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Get provides a mock function with given fields: id
|
|
func (_m *FileInfoStore) Get(id string) (*model.FileInfo, error) {
|
|
ret := _m.Called(id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Get")
|
|
}
|
|
|
|
var r0 *model.FileInfo
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string) (*model.FileInfo, error)); ok {
|
|
return rf(id)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) *model.FileInfo); ok {
|
|
r0 = rf(id)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.FileInfo)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetByIds provides a mock function with given fields: ids, includeDeleted, allowFromCache, readFromMaster
|
|
func (_m *FileInfoStore) GetByIds(ids []string, includeDeleted bool, allowFromCache bool, readFromMaster bool) ([]*model.FileInfo, error) {
|
|
ret := _m.Called(ids, includeDeleted, allowFromCache, readFromMaster)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetByIds")
|
|
}
|
|
|
|
var r0 []*model.FileInfo
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func([]string, bool, bool, bool) ([]*model.FileInfo, error)); ok {
|
|
return rf(ids, includeDeleted, allowFromCache, readFromMaster)
|
|
}
|
|
if rf, ok := ret.Get(0).(func([]string, bool, bool, bool) []*model.FileInfo); ok {
|
|
r0 = rf(ids, includeDeleted, allowFromCache, readFromMaster)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.FileInfo)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func([]string, bool, bool, bool) error); ok {
|
|
r1 = rf(ids, includeDeleted, allowFromCache, readFromMaster)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetByPath provides a mock function with given fields: path
|
|
func (_m *FileInfoStore) GetByPath(path string) (*model.FileInfo, error) {
|
|
ret := _m.Called(path)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetByPath")
|
|
}
|
|
|
|
var r0 *model.FileInfo
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string) (*model.FileInfo, error)); ok {
|
|
return rf(path)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) *model.FileInfo); ok {
|
|
r0 = rf(path)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.FileInfo)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(path)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetFilesBatchForIndexing provides a mock function with given fields: startTime, startFileID, includeDeleted, limit
|
|
func (_m *FileInfoStore) GetFilesBatchForIndexing(startTime int64, startFileID string, includeDeleted bool, limit int) ([]*model.FileForIndexing, error) {
|
|
ret := _m.Called(startTime, startFileID, includeDeleted, limit)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetFilesBatchForIndexing")
|
|
}
|
|
|
|
var r0 []*model.FileForIndexing
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(int64, string, bool, int) ([]*model.FileForIndexing, error)); ok {
|
|
return rf(startTime, startFileID, includeDeleted, limit)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(int64, string, bool, int) []*model.FileForIndexing); ok {
|
|
r0 = rf(startTime, startFileID, includeDeleted, limit)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.FileForIndexing)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(int64, string, bool, int) error); ok {
|
|
r1 = rf(startTime, startFileID, includeDeleted, limit)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetForPost provides a mock function with given fields: postID, readFromMaster, includeDeleted, allowFromCache
|
|
func (_m *FileInfoStore) GetForPost(postID string, readFromMaster bool, includeDeleted bool, allowFromCache bool) ([]*model.FileInfo, error) {
|
|
ret := _m.Called(postID, readFromMaster, includeDeleted, allowFromCache)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetForPost")
|
|
}
|
|
|
|
var r0 []*model.FileInfo
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, bool, bool, bool) ([]*model.FileInfo, error)); ok {
|
|
return rf(postID, readFromMaster, includeDeleted, allowFromCache)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, bool, bool, bool) []*model.FileInfo); ok {
|
|
r0 = rf(postID, readFromMaster, includeDeleted, allowFromCache)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.FileInfo)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, bool, bool, bool) error); ok {
|
|
r1 = rf(postID, readFromMaster, includeDeleted, allowFromCache)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetForUser provides a mock function with given fields: userID
|
|
func (_m *FileInfoStore) GetForUser(userID string) ([]*model.FileInfo, error) {
|
|
ret := _m.Called(userID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetForUser")
|
|
}
|
|
|
|
var r0 []*model.FileInfo
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string) ([]*model.FileInfo, error)); ok {
|
|
return rf(userID)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) []*model.FileInfo); ok {
|
|
r0 = rf(userID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.FileInfo)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(userID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetFromMaster provides a mock function with given fields: id
|
|
func (_m *FileInfoStore) GetFromMaster(id string) (*model.FileInfo, error) {
|
|
ret := _m.Called(id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetFromMaster")
|
|
}
|
|
|
|
var r0 *model.FileInfo
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string) (*model.FileInfo, error)); ok {
|
|
return rf(id)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) *model.FileInfo); ok {
|
|
r0 = rf(id)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.FileInfo)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetStorageUsage provides a mock function with given fields: allowFromCache, includeDeleted
|
|
func (_m *FileInfoStore) GetStorageUsage(allowFromCache bool, includeDeleted bool) (int64, error) {
|
|
ret := _m.Called(allowFromCache, includeDeleted)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetStorageUsage")
|
|
}
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(bool, bool) (int64, error)); ok {
|
|
return rf(allowFromCache, includeDeleted)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(bool, bool) int64); ok {
|
|
r0 = rf(allowFromCache, includeDeleted)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(bool, bool) error); ok {
|
|
r1 = rf(allowFromCache, includeDeleted)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetUptoNSizeFileTime provides a mock function with given fields: n
|
|
func (_m *FileInfoStore) GetUptoNSizeFileTime(n int64) (int64, error) {
|
|
ret := _m.Called(n)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetUptoNSizeFileTime")
|
|
}
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(int64) (int64, error)); ok {
|
|
return rf(n)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(int64) int64); ok {
|
|
r0 = rf(n)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(int64) error); ok {
|
|
r1 = rf(n)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetWithOptions provides a mock function with given fields: page, perPage, opt
|
|
func (_m *FileInfoStore) GetWithOptions(page int, perPage int, opt *model.GetFileInfosOptions) ([]*model.FileInfo, error) {
|
|
ret := _m.Called(page, perPage, opt)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetWithOptions")
|
|
}
|
|
|
|
var r0 []*model.FileInfo
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(int, int, *model.GetFileInfosOptions) ([]*model.FileInfo, error)); ok {
|
|
return rf(page, perPage, opt)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(int, int, *model.GetFileInfosOptions) []*model.FileInfo); ok {
|
|
r0 = rf(page, perPage, opt)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.FileInfo)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(int, int, *model.GetFileInfosOptions) error); ok {
|
|
r1 = rf(page, perPage, opt)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// InvalidateFileInfosForPostCache provides a mock function with given fields: postID, deleted
|
|
func (_m *FileInfoStore) InvalidateFileInfosForPostCache(postID string, deleted bool) {
|
|
_m.Called(postID, deleted)
|
|
}
|
|
|
|
// PermanentDelete provides a mock function with given fields: rctx, fileID
|
|
func (_m *FileInfoStore) PermanentDelete(rctx request.CTX, fileID string) error {
|
|
ret := _m.Called(rctx, fileID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for PermanentDelete")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string) error); ok {
|
|
r0 = rf(rctx, fileID)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// PermanentDeleteBatch provides a mock function with given fields: rctx, endTime, limit
|
|
func (_m *FileInfoStore) PermanentDeleteBatch(rctx request.CTX, endTime int64, limit int64) (int64, error) {
|
|
ret := _m.Called(rctx, endTime, limit)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for PermanentDeleteBatch")
|
|
}
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, int64, int64) (int64, error)); ok {
|
|
return rf(rctx, endTime, limit)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, int64, int64) int64); ok {
|
|
r0 = rf(rctx, endTime, limit)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, int64, int64) error); ok {
|
|
r1 = rf(rctx, endTime, limit)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// PermanentDeleteByUser provides a mock function with given fields: rctx, userID
|
|
func (_m *FileInfoStore) PermanentDeleteByUser(rctx request.CTX, userID string) (int64, error) {
|
|
ret := _m.Called(rctx, userID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for PermanentDeleteByUser")
|
|
}
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string) (int64, error)); ok {
|
|
return rf(rctx, userID)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string) int64); ok {
|
|
r0 = rf(rctx, userID)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, string) error); ok {
|
|
r1 = rf(rctx, userID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// PermanentDeleteForPost provides a mock function with given fields: rctx, postID
|
|
func (_m *FileInfoStore) PermanentDeleteForPost(rctx request.CTX, postID string) error {
|
|
ret := _m.Called(rctx, postID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for PermanentDeleteForPost")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string) error); ok {
|
|
r0 = rf(rctx, postID)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// RefreshFileStats provides a mock function with no fields
|
|
func (_m *FileInfoStore) RefreshFileStats() error {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RefreshFileStats")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func() error); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// RestoreForPostByIds provides a mock function with given fields: rctx, postId, fileIDs
|
|
func (_m *FileInfoStore) RestoreForPostByIds(rctx request.CTX, postId string, fileIDs []string) error {
|
|
ret := _m.Called(rctx, postId, fileIDs)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RestoreForPostByIds")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, []string) error); ok {
|
|
r0 = rf(rctx, postId, fileIDs)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Save provides a mock function with given fields: rctx, info
|
|
func (_m *FileInfoStore) Save(rctx request.CTX, info *model.FileInfo) (*model.FileInfo, error) {
|
|
ret := _m.Called(rctx, info)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Save")
|
|
}
|
|
|
|
var r0 *model.FileInfo
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.FileInfo) (*model.FileInfo, error)); ok {
|
|
return rf(rctx, info)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.FileInfo) *model.FileInfo); ok {
|
|
r0 = rf(rctx, info)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.FileInfo)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, *model.FileInfo) error); ok {
|
|
r1 = rf(rctx, info)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Search provides a mock function with given fields: rctx, paramsList, userID, teamID, page, perPage
|
|
func (_m *FileInfoStore) Search(rctx request.CTX, paramsList []*model.SearchParams, userID string, teamID string, page int, perPage int) (*model.FileInfoList, error) {
|
|
ret := _m.Called(rctx, paramsList, userID, teamID, page, perPage)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Search")
|
|
}
|
|
|
|
var r0 *model.FileInfoList
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, []*model.SearchParams, string, string, int, int) (*model.FileInfoList, error)); ok {
|
|
return rf(rctx, paramsList, userID, teamID, page, perPage)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, []*model.SearchParams, string, string, int, int) *model.FileInfoList); ok {
|
|
r0 = rf(rctx, paramsList, userID, teamID, page, perPage)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.FileInfoList)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, []*model.SearchParams, string, string, int, int) error); ok {
|
|
r1 = rf(rctx, paramsList, userID, teamID, page, perPage)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// SetContent provides a mock function with given fields: rctx, fileID, content
|
|
func (_m *FileInfoStore) SetContent(rctx request.CTX, fileID string, content string) error {
|
|
ret := _m.Called(rctx, fileID, content)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SetContent")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, string) error); ok {
|
|
r0 = rf(rctx, fileID, content)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Upsert provides a mock function with given fields: rctx, info
|
|
func (_m *FileInfoStore) Upsert(rctx request.CTX, info *model.FileInfo) (*model.FileInfo, error) {
|
|
ret := _m.Called(rctx, info)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Upsert")
|
|
}
|
|
|
|
var r0 *model.FileInfo
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.FileInfo) (*model.FileInfo, error)); ok {
|
|
return rf(rctx, info)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.FileInfo) *model.FileInfo); ok {
|
|
r0 = rf(rctx, info)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.FileInfo)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, *model.FileInfo) error); ok {
|
|
r1 = rf(rctx, info)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// NewFileInfoStore creates a new instance of FileInfoStore. 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 NewFileInfoStore(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *FileInfoStore {
|
|
mock := &FileInfoStore{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|