Gallery scrubber (#5133)

This commit is contained in:
WithoutPants
2024-08-28 08:59:41 +10:00
committed by GitHub
parent ce47efc415
commit 996dfb1c2f
21 changed files with 501 additions and 102 deletions

View File

@@ -301,6 +301,29 @@ func (_m *ImageReaderWriter) FindByGalleryID(ctx context.Context, galleryID int)
return r0, r1
}
// FindByGalleryIDIndex provides a mock function with given fields: ctx, galleryID, index
func (_m *ImageReaderWriter) FindByGalleryIDIndex(ctx context.Context, galleryID int, index uint) (*models.Image, error) {
ret := _m.Called(ctx, galleryID, index)
var r0 *models.Image
if rf, ok := ret.Get(0).(func(context.Context, int, uint) *models.Image); ok {
r0 = rf(ctx, galleryID, index)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*models.Image)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int, uint) error); ok {
r1 = rf(ctx, galleryID, index)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FindByZipFileID provides a mock function with given fields: ctx, zipFileID
func (_m *ImageReaderWriter) FindByZipFileID(ctx context.Context, zipFileID models.FileID) ([]*models.Image, error) {
ret := _m.Called(ctx, zipFileID)

View File

@@ -18,6 +18,7 @@ type ImageFinder interface {
FindByFolderID(ctx context.Context, fileID FolderID) ([]*Image, error)
FindByZipFileID(ctx context.Context, zipFileID FileID) ([]*Image, error)
FindByGalleryID(ctx context.Context, galleryID int) ([]*Image, error)
FindByGalleryIDIndex(ctx context.Context, galleryID int, index uint) (*Image, error)
}
// ImageQueryer provides methods to query images.