2022-05-06 01:59:28 +00:00
|
|
|
// Code generated by mockery v2.10.0. DO NOT EDIT.
|
2020-09-15 07:28:53 +00:00
|
|
|
|
|
|
|
package mocks
|
|
|
|
|
|
|
|
import (
|
2022-05-19 07:49:32 +00:00
|
|
|
context "context"
|
|
|
|
|
2022-07-13 06:30:54 +00:00
|
|
|
file "github.com/stashapp/stash/pkg/file"
|
2020-09-15 07:28:53 +00:00
|
|
|
mock "github.com/stretchr/testify/mock"
|
2022-07-13 06:30:54 +00:00
|
|
|
|
|
|
|
models "github.com/stashapp/stash/pkg/models"
|
2020-09-15 07:28:53 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// SceneReaderWriter is an autogenerated mock type for the SceneReaderWriter type
|
|
|
|
type SceneReaderWriter struct {
|
|
|
|
mock.Mock
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// All provides a mock function with given fields: ctx
|
|
|
|
func (_m *SceneReaderWriter) All(ctx context.Context) ([]*models.Scene, error) {
|
|
|
|
ret := _m.Called(ctx)
|
2020-09-15 07:28:53 +00:00
|
|
|
|
|
|
|
var r0 []*models.Scene
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context) []*models.Scene); ok {
|
|
|
|
r0 = rf(ctx)
|
2020-09-15 07:28:53 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).([]*models.Scene)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
|
|
r1 = rf(ctx)
|
2020-09-15 07:28:53 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// Count provides a mock function with given fields: ctx
|
|
|
|
func (_m *SceneReaderWriter) Count(ctx context.Context) (int, error) {
|
|
|
|
ret := _m.Called(ctx)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 int
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context) int); ok {
|
|
|
|
r0 = rf(ctx)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Get(0).(int)
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
|
|
r1 = rf(ctx)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// CountByMovieID provides a mock function with given fields: ctx, movieID
|
|
|
|
func (_m *SceneReaderWriter) CountByMovieID(ctx context.Context, movieID int) (int, error) {
|
|
|
|
ret := _m.Called(ctx, movieID)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 int
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) int); ok {
|
|
|
|
r0 = rf(ctx, movieID)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Get(0).(int)
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
|
|
r1 = rf(ctx, movieID)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// CountByPerformerID provides a mock function with given fields: ctx, performerID
|
|
|
|
func (_m *SceneReaderWriter) CountByPerformerID(ctx context.Context, performerID int) (int, error) {
|
|
|
|
ret := _m.Called(ctx, performerID)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 int
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) int); ok {
|
|
|
|
r0 = rf(ctx, performerID)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Get(0).(int)
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
|
|
r1 = rf(ctx, performerID)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// CountByStudioID provides a mock function with given fields: ctx, studioID
|
|
|
|
func (_m *SceneReaderWriter) CountByStudioID(ctx context.Context, studioID int) (int, error) {
|
|
|
|
ret := _m.Called(ctx, studioID)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 int
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) int); ok {
|
|
|
|
r0 = rf(ctx, studioID)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Get(0).(int)
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
|
|
r1 = rf(ctx, studioID)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// CountByTagID provides a mock function with given fields: ctx, tagID
|
|
|
|
func (_m *SceneReaderWriter) CountByTagID(ctx context.Context, tagID int) (int, error) {
|
|
|
|
ret := _m.Called(ctx, tagID)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 int
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) int); ok {
|
|
|
|
r0 = rf(ctx, tagID)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Get(0).(int)
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
|
|
r1 = rf(ctx, tagID)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// CountMissingChecksum provides a mock function with given fields: ctx
|
|
|
|
func (_m *SceneReaderWriter) CountMissingChecksum(ctx context.Context) (int, error) {
|
|
|
|
ret := _m.Called(ctx)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 int
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context) int); ok {
|
|
|
|
r0 = rf(ctx)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Get(0).(int)
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
|
|
r1 = rf(ctx)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// CountMissingOSHash provides a mock function with given fields: ctx
|
|
|
|
func (_m *SceneReaderWriter) CountMissingOSHash(ctx context.Context) (int, error) {
|
|
|
|
ret := _m.Called(ctx)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 int
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context) int); ok {
|
|
|
|
r0 = rf(ctx)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Get(0).(int)
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
|
|
r1 = rf(ctx)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-07-13 06:30:54 +00:00
|
|
|
// Create provides a mock function with given fields: ctx, newScene, fileIDs
|
|
|
|
func (_m *SceneReaderWriter) Create(ctx context.Context, newScene *models.Scene, fileIDs []file.ID) error {
|
|
|
|
ret := _m.Called(ctx, newScene, fileIDs)
|
2020-09-20 08:36:02 +00:00
|
|
|
|
2022-07-13 06:30:54 +00:00
|
|
|
var r0 error
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, *models.Scene, []file.ID) error); ok {
|
|
|
|
r0 = rf(ctx, newScene, fileIDs)
|
2020-09-20 08:36:02 +00:00
|
|
|
} else {
|
2022-07-13 06:30:54 +00:00
|
|
|
r0 = ret.Error(0)
|
2020-09-20 08:36:02 +00:00
|
|
|
}
|
|
|
|
|
2022-07-13 06:30:54 +00:00
|
|
|
return r0
|
2020-09-20 08:36:02 +00:00
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// DecrementOCounter provides a mock function with given fields: ctx, id
|
|
|
|
func (_m *SceneReaderWriter) DecrementOCounter(ctx context.Context, id int) (int, error) {
|
|
|
|
ret := _m.Called(ctx, id)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 int
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) int); ok {
|
|
|
|
r0 = rf(ctx, id)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Get(0).(int)
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
|
|
r1 = rf(ctx, id)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// Destroy provides a mock function with given fields: ctx, id
|
|
|
|
func (_m *SceneReaderWriter) Destroy(ctx context.Context, id int) error {
|
|
|
|
ret := _m.Called(ctx, id)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) error); ok {
|
|
|
|
r0 = rf(ctx, id)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Error(0)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// DestroyCover provides a mock function with given fields: ctx, sceneID
|
|
|
|
func (_m *SceneReaderWriter) DestroyCover(ctx context.Context, sceneID int) error {
|
|
|
|
ret := _m.Called(ctx, sceneID)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) error); ok {
|
|
|
|
r0 = rf(ctx, sceneID)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Error(0)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// Duration provides a mock function with given fields: ctx
|
|
|
|
func (_m *SceneReaderWriter) Duration(ctx context.Context) (float64, error) {
|
|
|
|
ret := _m.Called(ctx)
|
2021-08-26 03:37:08 +00:00
|
|
|
|
|
|
|
var r0 float64
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context) float64); ok {
|
|
|
|
r0 = rf(ctx)
|
2021-08-26 03:37:08 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Get(0).(float64)
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
|
|
r1 = rf(ctx)
|
2021-08-26 03:37:08 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// Find provides a mock function with given fields: ctx, id
|
|
|
|
func (_m *SceneReaderWriter) Find(ctx context.Context, id int) (*models.Scene, error) {
|
|
|
|
ret := _m.Called(ctx, id)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 *models.Scene
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) *models.Scene); ok {
|
|
|
|
r0 = rf(ctx, id)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).(*models.Scene)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
|
|
r1 = rf(ctx, id)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// FindByChecksum provides a mock function with given fields: ctx, checksum
|
2022-07-13 06:30:54 +00:00
|
|
|
func (_m *SceneReaderWriter) FindByChecksum(ctx context.Context, checksum string) ([]*models.Scene, error) {
|
2022-05-19 07:49:32 +00:00
|
|
|
ret := _m.Called(ctx, checksum)
|
2020-09-20 08:36:02 +00:00
|
|
|
|
2022-07-13 06:30:54 +00:00
|
|
|
var r0 []*models.Scene
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) []*models.Scene); ok {
|
2022-05-19 07:49:32 +00:00
|
|
|
r0 = rf(ctx, checksum)
|
2020-09-20 08:36:02 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
2022-07-13 06:30:54 +00:00
|
|
|
r0 = ret.Get(0).([]*models.Scene)
|
2020-09-20 08:36:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
|
|
r1 = rf(ctx, checksum)
|
2020-09-20 08:36:02 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// FindByGalleryID provides a mock function with given fields: ctx, performerID
|
|
|
|
func (_m *SceneReaderWriter) FindByGalleryID(ctx context.Context, performerID int) ([]*models.Scene, error) {
|
|
|
|
ret := _m.Called(ctx, performerID)
|
2021-03-10 01:25:51 +00:00
|
|
|
|
|
|
|
var r0 []*models.Scene
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) []*models.Scene); ok {
|
|
|
|
r0 = rf(ctx, performerID)
|
2021-03-10 01:25:51 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).([]*models.Scene)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
|
|
r1 = rf(ctx, performerID)
|
2021-03-10 01:25:51 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// FindByMovieID provides a mock function with given fields: ctx, movieID
|
|
|
|
func (_m *SceneReaderWriter) FindByMovieID(ctx context.Context, movieID int) ([]*models.Scene, error) {
|
|
|
|
ret := _m.Called(ctx, movieID)
|
2020-10-30 22:41:12 +00:00
|
|
|
|
|
|
|
var r0 []*models.Scene
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) []*models.Scene); ok {
|
|
|
|
r0 = rf(ctx, movieID)
|
2020-10-30 22:41:12 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).([]*models.Scene)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
|
|
r1 = rf(ctx, movieID)
|
2020-10-30 22:41:12 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// FindByOSHash provides a mock function with given fields: ctx, oshash
|
2022-07-13 06:30:54 +00:00
|
|
|
func (_m *SceneReaderWriter) FindByOSHash(ctx context.Context, oshash string) ([]*models.Scene, error) {
|
2022-05-19 07:49:32 +00:00
|
|
|
ret := _m.Called(ctx, oshash)
|
2020-09-20 08:36:02 +00:00
|
|
|
|
2022-07-13 06:30:54 +00:00
|
|
|
var r0 []*models.Scene
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) []*models.Scene); ok {
|
2022-05-19 07:49:32 +00:00
|
|
|
r0 = rf(ctx, oshash)
|
2020-09-20 08:36:02 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
2022-07-13 06:30:54 +00:00
|
|
|
r0 = ret.Get(0).([]*models.Scene)
|
2020-09-20 08:36:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
|
|
r1 = rf(ctx, oshash)
|
2020-09-20 08:36:02 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// FindByPath provides a mock function with given fields: ctx, path
|
2022-07-13 06:30:54 +00:00
|
|
|
func (_m *SceneReaderWriter) FindByPath(ctx context.Context, path string) ([]*models.Scene, error) {
|
2022-05-19 07:49:32 +00:00
|
|
|
ret := _m.Called(ctx, path)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
2022-07-13 06:30:54 +00:00
|
|
|
var r0 []*models.Scene
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) []*models.Scene); ok {
|
2022-05-19 07:49:32 +00:00
|
|
|
r0 = rf(ctx, path)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
2022-07-13 06:30:54 +00:00
|
|
|
r0 = ret.Get(0).([]*models.Scene)
|
2021-01-18 01:23:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
|
|
r1 = rf(ctx, path)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// FindByPerformerID provides a mock function with given fields: ctx, performerID
|
|
|
|
func (_m *SceneReaderWriter) FindByPerformerID(ctx context.Context, performerID int) ([]*models.Scene, error) {
|
|
|
|
ret := _m.Called(ctx, performerID)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 []*models.Scene
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) []*models.Scene); ok {
|
|
|
|
r0 = rf(ctx, performerID)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).([]*models.Scene)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
|
|
r1 = rf(ctx, performerID)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// FindDuplicates provides a mock function with given fields: ctx, distance
|
|
|
|
func (_m *SceneReaderWriter) FindDuplicates(ctx context.Context, distance int) ([][]*models.Scene, error) {
|
|
|
|
ret := _m.Called(ctx, distance)
|
2020-09-15 07:28:53 +00:00
|
|
|
|
2021-04-15 00:46:31 +00:00
|
|
|
var r0 [][]*models.Scene
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) [][]*models.Scene); ok {
|
|
|
|
r0 = rf(ctx, distance)
|
2020-09-15 07:28:53 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
2021-04-15 00:46:31 +00:00
|
|
|
r0 = ret.Get(0).([][]*models.Scene)
|
2020-09-15 07:28:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
|
|
r1 = rf(ctx, distance)
|
2020-09-15 07:28:53 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// FindMany provides a mock function with given fields: ctx, ids
|
|
|
|
func (_m *SceneReaderWriter) FindMany(ctx context.Context, ids []int) ([]*models.Scene, error) {
|
|
|
|
ret := _m.Called(ctx, ids)
|
2021-04-11 23:04:40 +00:00
|
|
|
|
2021-04-15 00:46:31 +00:00
|
|
|
var r0 []*models.Scene
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, []int) []*models.Scene); ok {
|
|
|
|
r0 = rf(ctx, ids)
|
2021-04-11 23:04:40 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
2021-04-15 00:46:31 +00:00
|
|
|
r0 = ret.Get(0).([]*models.Scene)
|
2021-04-11 23:04:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, []int) error); ok {
|
|
|
|
r1 = rf(ctx, ids)
|
2021-04-11 23:04:40 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// GetCover provides a mock function with given fields: ctx, sceneID
|
|
|
|
func (_m *SceneReaderWriter) GetCover(ctx context.Context, sceneID int) ([]byte, error) {
|
|
|
|
ret := _m.Called(ctx, sceneID)
|
2020-09-15 07:28:53 +00:00
|
|
|
|
|
|
|
var r0 []byte
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) []byte); ok {
|
|
|
|
r0 = rf(ctx, sceneID)
|
2020-09-15 07:28:53 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).([]byte)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
|
|
r1 = rf(ctx, sceneID)
|
2020-09-15 07:28:53 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
2020-09-20 08:36:02 +00:00
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// IncrementOCounter provides a mock function with given fields: ctx, id
|
|
|
|
func (_m *SceneReaderWriter) IncrementOCounter(ctx context.Context, id int) (int, error) {
|
|
|
|
ret := _m.Called(ctx, id)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 int
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) int); ok {
|
|
|
|
r0 = rf(ctx, id)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Get(0).(int)
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
|
|
r1 = rf(ctx, id)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// Query provides a mock function with given fields: ctx, options
|
|
|
|
func (_m *SceneReaderWriter) Query(ctx context.Context, options models.SceneQueryOptions) (*models.SceneQueryResult, error) {
|
|
|
|
ret := _m.Called(ctx, options)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
2021-10-25 00:40:13 +00:00
|
|
|
var r0 *models.SceneQueryResult
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, models.SceneQueryOptions) *models.SceneQueryResult); ok {
|
|
|
|
r0 = rf(ctx, options)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
2021-10-25 00:40:13 +00:00
|
|
|
r0 = ret.Get(0).(*models.SceneQueryResult)
|
2021-01-18 01:23:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-25 00:40:13 +00:00
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, models.SceneQueryOptions) error); ok {
|
|
|
|
r1 = rf(ctx, options)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
2021-10-25 00:40:13 +00:00
|
|
|
r1 = ret.Error(1)
|
2021-01-18 01:23:20 +00:00
|
|
|
}
|
|
|
|
|
2021-10-25 00:40:13 +00:00
|
|
|
return r0, r1
|
2021-01-18 01:23:20 +00:00
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// ResetOCounter provides a mock function with given fields: ctx, id
|
|
|
|
func (_m *SceneReaderWriter) ResetOCounter(ctx context.Context, id int) (int, error) {
|
|
|
|
ret := _m.Called(ctx, id)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 int
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) int); ok {
|
|
|
|
r0 = rf(ctx, id)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Get(0).(int)
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
|
|
r1 = rf(ctx, id)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// Size provides a mock function with given fields: ctx
|
|
|
|
func (_m *SceneReaderWriter) Size(ctx context.Context) (float64, error) {
|
|
|
|
ret := _m.Called(ctx)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 float64
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context) float64); ok {
|
|
|
|
r0 = rf(ctx)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Get(0).(float64)
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
|
|
r1 = rf(ctx)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// Update provides a mock function with given fields: ctx, updatedScene
|
2022-07-13 06:30:54 +00:00
|
|
|
func (_m *SceneReaderWriter) Update(ctx context.Context, updatedScene *models.Scene) error {
|
2022-05-19 07:49:32 +00:00
|
|
|
ret := _m.Called(ctx, updatedScene)
|
2020-09-20 08:36:02 +00:00
|
|
|
|
2022-05-06 01:59:28 +00:00
|
|
|
var r0 error
|
2022-07-13 06:30:54 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, *models.Scene) error); ok {
|
|
|
|
r0 = rf(ctx, updatedScene)
|
2022-05-06 01:59:28 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Error(0)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// UpdateCover provides a mock function with given fields: ctx, sceneID, cover
|
|
|
|
func (_m *SceneReaderWriter) UpdateCover(ctx context.Context, sceneID int, cover []byte) error {
|
|
|
|
ret := _m.Called(ctx, sceneID, cover)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int, []byte) error); ok {
|
|
|
|
r0 = rf(ctx, sceneID, cover)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Error(0)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0
|
|
|
|
}
|
|
|
|
|
2022-07-13 06:30:54 +00:00
|
|
|
// UpdatePartial provides a mock function with given fields: ctx, id, updatedScene
|
|
|
|
func (_m *SceneReaderWriter) UpdatePartial(ctx context.Context, id int, updatedScene models.ScenePartial) (*models.Scene, error) {
|
|
|
|
ret := _m.Called(ctx, id, updatedScene)
|
2020-09-20 08:36:02 +00:00
|
|
|
|
|
|
|
var r0 *models.Scene
|
2022-07-13 06:30:54 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int, models.ScenePartial) *models.Scene); ok {
|
|
|
|
r0 = rf(ctx, id, updatedScene)
|
2020-09-20 08:36:02 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).(*models.Scene)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-07-13 06:30:54 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int, models.ScenePartial) error); ok {
|
|
|
|
r1 = rf(ctx, id, updatedScene)
|
2020-09-20 08:36:02 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// Wall provides a mock function with given fields: ctx, q
|
|
|
|
func (_m *SceneReaderWriter) Wall(ctx context.Context, q *string) ([]*models.Scene, error) {
|
|
|
|
ret := _m.Called(ctx, q)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 []*models.Scene
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, *string) []*models.Scene); ok {
|
|
|
|
r0 = rf(ctx, q)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).([]*models.Scene)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *string) error); ok {
|
|
|
|
r1 = rf(ctx, q)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|