mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
* Add findFile and findFiles * Add parent folder and zip file fields to file graphql types * Add parent_folder, zip_file fields to Folder graphql type * Add format to ImageFile type * Add format filter fields to image/video file filters
216 lines
5.3 KiB
Go
216 lines
5.3 KiB
Go
// Code generated by mockery v2.10.0. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
context "context"
|
|
|
|
models "github.com/stashapp/stash/pkg/models"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// FolderReaderWriter is an autogenerated mock type for the FolderReaderWriter type
|
|
type FolderReaderWriter struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// CountAllInPaths provides a mock function with given fields: ctx, p
|
|
func (_m *FolderReaderWriter) CountAllInPaths(ctx context.Context, p []string) (int, error) {
|
|
ret := _m.Called(ctx, p)
|
|
|
|
var r0 int
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string) int); ok {
|
|
r0 = rf(ctx, p)
|
|
} else {
|
|
r0 = ret.Get(0).(int)
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok {
|
|
r1 = rf(ctx, p)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Create provides a mock function with given fields: ctx, f
|
|
func (_m *FolderReaderWriter) Create(ctx context.Context, f *models.Folder) error {
|
|
ret := _m.Called(ctx, f)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *models.Folder) error); ok {
|
|
r0 = rf(ctx, f)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Destroy provides a mock function with given fields: ctx, id
|
|
func (_m *FolderReaderWriter) Destroy(ctx context.Context, id models.FolderID) error {
|
|
ret := _m.Called(ctx, id)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, models.FolderID) error); ok {
|
|
r0 = rf(ctx, id)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Find provides a mock function with given fields: ctx, id
|
|
func (_m *FolderReaderWriter) Find(ctx context.Context, id models.FolderID) (*models.Folder, error) {
|
|
ret := _m.Called(ctx, id)
|
|
|
|
var r0 *models.Folder
|
|
if rf, ok := ret.Get(0).(func(context.Context, models.FolderID) *models.Folder); ok {
|
|
r0 = rf(ctx, id)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*models.Folder)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, models.FolderID) error); ok {
|
|
r1 = rf(ctx, id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FindAllInPaths provides a mock function with given fields: ctx, p, limit, offset
|
|
func (_m *FolderReaderWriter) FindAllInPaths(ctx context.Context, p []string, limit int, offset int) ([]*models.Folder, error) {
|
|
ret := _m.Called(ctx, p, limit, offset)
|
|
|
|
var r0 []*models.Folder
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string, int, int) []*models.Folder); ok {
|
|
r0 = rf(ctx, p, limit, offset)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*models.Folder)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, []string, int, int) error); ok {
|
|
r1 = rf(ctx, p, limit, offset)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FindByParentFolderID provides a mock function with given fields: ctx, parentFolderID
|
|
func (_m *FolderReaderWriter) FindByParentFolderID(ctx context.Context, parentFolderID models.FolderID) ([]*models.Folder, error) {
|
|
ret := _m.Called(ctx, parentFolderID)
|
|
|
|
var r0 []*models.Folder
|
|
if rf, ok := ret.Get(0).(func(context.Context, models.FolderID) []*models.Folder); ok {
|
|
r0 = rf(ctx, parentFolderID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*models.Folder)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, models.FolderID) error); ok {
|
|
r1 = rf(ctx, parentFolderID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FindByPath provides a mock function with given fields: ctx, path
|
|
func (_m *FolderReaderWriter) FindByPath(ctx context.Context, path string) (*models.Folder, error) {
|
|
ret := _m.Called(ctx, path)
|
|
|
|
var r0 *models.Folder
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) *models.Folder); ok {
|
|
r0 = rf(ctx, path)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*models.Folder)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = rf(ctx, path)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FindByZipFileID provides a mock function with given fields: ctx, zipFileID
|
|
func (_m *FolderReaderWriter) FindByZipFileID(ctx context.Context, zipFileID models.FileID) ([]*models.Folder, error) {
|
|
ret := _m.Called(ctx, zipFileID)
|
|
|
|
var r0 []*models.Folder
|
|
if rf, ok := ret.Get(0).(func(context.Context, models.FileID) []*models.Folder); ok {
|
|
r0 = rf(ctx, zipFileID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*models.Folder)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, models.FileID) error); ok {
|
|
r1 = rf(ctx, zipFileID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FindMany provides a mock function with given fields: ctx, id
|
|
func (_m *FolderReaderWriter) FindMany(ctx context.Context, id []models.FolderID) ([]*models.Folder, error) {
|
|
ret := _m.Called(ctx, id)
|
|
|
|
var r0 []*models.Folder
|
|
if rf, ok := ret.Get(0).(func(context.Context, []models.FolderID) []*models.Folder); ok {
|
|
r0 = rf(ctx, id)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*models.Folder)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, []models.FolderID) error); ok {
|
|
r1 = rf(ctx, id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Update provides a mock function with given fields: ctx, f
|
|
func (_m *FolderReaderWriter) Update(ctx context.Context, f *models.Folder) error {
|
|
ret := _m.Called(ctx, f)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *models.Folder) error); ok {
|
|
r0 = rf(ctx, f)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|