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"
|
|
|
|
|
2020-09-15 07:28:53 +00:00
|
|
|
models "github.com/stashapp/stash/pkg/models"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
)
|
|
|
|
|
|
|
|
// StudioReaderWriter is an autogenerated mock type for the StudioReaderWriter type
|
|
|
|
type StudioReaderWriter struct {
|
|
|
|
mock.Mock
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// All provides a mock function with given fields: ctx
|
|
|
|
func (_m *StudioReaderWriter) All(ctx context.Context) ([]*models.Studio, error) {
|
|
|
|
ret := _m.Called(ctx)
|
2020-09-15 07:28:53 +00:00
|
|
|
|
|
|
|
var r0 []*models.Studio
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context) []*models.Studio); ok {
|
|
|
|
r0 = rf(ctx)
|
2020-09-15 07:28:53 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).([]*models.Studio)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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 *StudioReaderWriter) 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
|
|
|
// Create provides a mock function with given fields: ctx, newStudio
|
|
|
|
func (_m *StudioReaderWriter) Create(ctx context.Context, newStudio models.Studio) (*models.Studio, error) {
|
|
|
|
ret := _m.Called(ctx, newStudio)
|
2020-09-20 08:36:02 +00:00
|
|
|
|
|
|
|
var r0 *models.Studio
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, models.Studio) *models.Studio); ok {
|
|
|
|
r0 = rf(ctx, newStudio)
|
2020-09-20 08:36:02 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).(*models.Studio)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, models.Studio) error); ok {
|
|
|
|
r1 = rf(ctx, newStudio)
|
2020-09-20 08:36:02 +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 *StudioReaderWriter) 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
|
|
|
// DestroyImage provides a mock function with given fields: ctx, studioID
|
|
|
|
func (_m *StudioReaderWriter) DestroyImage(ctx context.Context, studioID int) error {
|
|
|
|
ret := _m.Called(ctx, studioID)
|
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, studioID)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Error(0)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// Find provides a mock function with given fields: ctx, id
|
|
|
|
func (_m *StudioReaderWriter) Find(ctx context.Context, id int) (*models.Studio, error) {
|
|
|
|
ret := _m.Called(ctx, id)
|
2020-09-15 07:28:53 +00:00
|
|
|
|
|
|
|
var r0 *models.Studio
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) *models.Studio); ok {
|
|
|
|
r0 = rf(ctx, id)
|
2020-09-15 07:28:53 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).(*models.Studio)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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)
|
2020-09-15 07:28:53 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// FindByName provides a mock function with given fields: ctx, name, nocase
|
|
|
|
func (_m *StudioReaderWriter) FindByName(ctx context.Context, name string, nocase bool) (*models.Studio, error) {
|
|
|
|
ret := _m.Called(ctx, name, nocase)
|
2020-09-20 08:36:02 +00:00
|
|
|
|
|
|
|
var r0 *models.Studio
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, bool) *models.Studio); ok {
|
|
|
|
r0 = rf(ctx, name, nocase)
|
2020-09-20 08:36:02 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).(*models.Studio)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, bool) error); ok {
|
|
|
|
r1 = rf(ctx, name, nocase)
|
2020-09-20 08:36:02 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// FindByStashID provides a mock function with given fields: ctx, stashID
|
|
|
|
func (_m *StudioReaderWriter) FindByStashID(ctx context.Context, stashID models.StashID) ([]*models.Studio, error) {
|
|
|
|
ret := _m.Called(ctx, stashID)
|
2021-11-14 20:51:52 +00:00
|
|
|
|
|
|
|
var r0 []*models.Studio
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, models.StashID) []*models.Studio); ok {
|
|
|
|
r0 = rf(ctx, stashID)
|
2021-11-14 20:51:52 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).([]*models.Studio)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, models.StashID) error); ok {
|
|
|
|
r1 = rf(ctx, stashID)
|
2021-11-14 20:51:52 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// FindChildren provides a mock function with given fields: ctx, id
|
|
|
|
func (_m *StudioReaderWriter) FindChildren(ctx context.Context, id int) ([]*models.Studio, error) {
|
|
|
|
ret := _m.Called(ctx, id)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 []*models.Studio
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) []*models.Studio); ok {
|
|
|
|
r0 = rf(ctx, id)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).([]*models.Studio)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
// FindMany provides a mock function with given fields: ctx, ids
|
|
|
|
func (_m *StudioReaderWriter) FindMany(ctx context.Context, ids []int) ([]*models.Studio, error) {
|
|
|
|
ret := _m.Called(ctx, ids)
|
2020-09-15 07:28:53 +00:00
|
|
|
|
|
|
|
var r0 []*models.Studio
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, []int) []*models.Studio); ok {
|
|
|
|
r0 = rf(ctx, ids)
|
2020-09-15 07:28:53 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).([]*models.Studio)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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)
|
2020-09-15 07:28:53 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// GetAliases provides a mock function with given fields: ctx, studioID
|
|
|
|
func (_m *StudioReaderWriter) GetAliases(ctx context.Context, studioID int) ([]string, error) {
|
|
|
|
ret := _m.Called(ctx, studioID)
|
2021-09-09 08:13:42 +00:00
|
|
|
|
|
|
|
var r0 []string
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) []string); ok {
|
|
|
|
r0 = rf(ctx, studioID)
|
2021-09-09 08:13:42 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).([]string)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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-09-09 08:13:42 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// GetImage provides a mock function with given fields: ctx, studioID
|
|
|
|
func (_m *StudioReaderWriter) GetImage(ctx context.Context, studioID int) ([]byte, error) {
|
|
|
|
ret := _m.Called(ctx, studioID)
|
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, studioID)
|
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, studioID)
|
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-08-12 02:21:46 +00:00
|
|
|
// GetStashIDs provides a mock function with given fields: ctx, relatedID
|
|
|
|
func (_m *StudioReaderWriter) GetStashIDs(ctx context.Context, relatedID int) ([]models.StashID, error) {
|
|
|
|
ret := _m.Called(ctx, relatedID)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
2022-08-12 02:21:46 +00:00
|
|
|
var r0 []models.StashID
|
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) []models.StashID); ok {
|
|
|
|
r0 = rf(ctx, relatedID)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
2022-08-12 02:21:46 +00:00
|
|
|
r0 = ret.Get(0).([]models.StashID)
|
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, int) error); ok {
|
2022-08-12 02:21:46 +00:00
|
|
|
r1 = rf(ctx, relatedID)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// HasImage provides a mock function with given fields: ctx, studioID
|
|
|
|
func (_m *StudioReaderWriter) HasImage(ctx context.Context, studioID int) (bool, error) {
|
|
|
|
ret := _m.Called(ctx, studioID)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 bool
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) bool); ok {
|
|
|
|
r0 = rf(ctx, studioID)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Get(0).(bool)
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
// Query provides a mock function with given fields: ctx, studioFilter, findFilter
|
|
|
|
func (_m *StudioReaderWriter) Query(ctx context.Context, studioFilter *models.StudioFilterType, findFilter *models.FindFilterType) ([]*models.Studio, int, error) {
|
|
|
|
ret := _m.Called(ctx, studioFilter, findFilter)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 []*models.Studio
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, *models.StudioFilterType, *models.FindFilterType) []*models.Studio); ok {
|
|
|
|
r0 = rf(ctx, studioFilter, findFilter)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).([]*models.Studio)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 int
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *models.StudioFilterType, *models.FindFilterType) int); ok {
|
|
|
|
r1 = rf(ctx, studioFilter, findFilter)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Get(1).(int)
|
|
|
|
}
|
|
|
|
|
|
|
|
var r2 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(2).(func(context.Context, *models.StudioFilterType, *models.FindFilterType) error); ok {
|
|
|
|
r2 = rf(ctx, studioFilter, findFilter)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r2 = ret.Error(2)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1, r2
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// QueryForAutoTag provides a mock function with given fields: ctx, words
|
|
|
|
func (_m *StudioReaderWriter) QueryForAutoTag(ctx context.Context, words []string) ([]*models.Studio, error) {
|
|
|
|
ret := _m.Called(ctx, words)
|
2021-04-26 02:51:31 +00:00
|
|
|
|
|
|
|
var r0 []*models.Studio
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string) []*models.Studio); ok {
|
|
|
|
r0 = rf(ctx, words)
|
2021-04-26 02:51:31 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).([]*models.Studio)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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, words)
|
2021-04-26 02:51:31 +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, updatedStudio
|
|
|
|
func (_m *StudioReaderWriter) Update(ctx context.Context, updatedStudio models.StudioPartial) (*models.Studio, error) {
|
|
|
|
ret := _m.Called(ctx, updatedStudio)
|
2020-09-20 08:36:02 +00:00
|
|
|
|
|
|
|
var r0 *models.Studio
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, models.StudioPartial) *models.Studio); ok {
|
|
|
|
r0 = rf(ctx, updatedStudio)
|
2020-09-20 08:36:02 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).(*models.Studio)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, models.StudioPartial) error); ok {
|
|
|
|
r1 = rf(ctx, updatedStudio)
|
2020-09-20 08:36:02 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// UpdateAliases provides a mock function with given fields: ctx, studioID, aliases
|
|
|
|
func (_m *StudioReaderWriter) UpdateAliases(ctx context.Context, studioID int, aliases []string) error {
|
|
|
|
ret := _m.Called(ctx, studioID, aliases)
|
2021-09-09 08:13:42 +00:00
|
|
|
|
|
|
|
var r0 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int, []string) error); ok {
|
|
|
|
r0 = rf(ctx, studioID, aliases)
|
2021-09-09 08:13:42 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Error(0)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// UpdateFull provides a mock function with given fields: ctx, updatedStudio
|
|
|
|
func (_m *StudioReaderWriter) UpdateFull(ctx context.Context, updatedStudio models.Studio) (*models.Studio, error) {
|
|
|
|
ret := _m.Called(ctx, updatedStudio)
|
2020-09-20 08:36:02 +00:00
|
|
|
|
|
|
|
var r0 *models.Studio
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, models.Studio) *models.Studio); ok {
|
|
|
|
r0 = rf(ctx, updatedStudio)
|
2020-09-20 08:36:02 +00:00
|
|
|
} else {
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
r0 = ret.Get(0).(*models.Studio)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var r1 error
|
2022-05-19 07:49:32 +00:00
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, models.Studio) error); ok {
|
|
|
|
r1 = rf(ctx, updatedStudio)
|
2020-09-20 08:36:02 +00:00
|
|
|
} else {
|
|
|
|
r1 = ret.Error(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
}
|
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// UpdateImage provides a mock function with given fields: ctx, studioID, image
|
|
|
|
func (_m *StudioReaderWriter) UpdateImage(ctx context.Context, studioID int, image []byte) error {
|
|
|
|
ret := _m.Called(ctx, studioID, image)
|
2020-09-20 08:36:02 +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, studioID, image)
|
2020-09-20 08:36:02 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Error(0)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0
|
|
|
|
}
|
2021-01-18 01:23:20 +00:00
|
|
|
|
2022-05-19 07:49:32 +00:00
|
|
|
// UpdateStashIDs provides a mock function with given fields: ctx, studioID, stashIDs
|
2022-08-12 02:21:46 +00:00
|
|
|
func (_m *StudioReaderWriter) UpdateStashIDs(ctx context.Context, studioID int, stashIDs []models.StashID) error {
|
2022-05-19 07:49:32 +00:00
|
|
|
ret := _m.Called(ctx, studioID, stashIDs)
|
2021-01-18 01:23:20 +00:00
|
|
|
|
|
|
|
var r0 error
|
2022-08-12 02:21:46 +00:00
|
|
|
if rf, ok := ret.Get(0).(func(context.Context, int, []models.StashID) error); ok {
|
2022-05-19 07:49:32 +00:00
|
|
|
r0 = rf(ctx, studioID, stashIDs)
|
2021-01-18 01:23:20 +00:00
|
|
|
} else {
|
|
|
|
r0 = ret.Error(0)
|
|
|
|
}
|
|
|
|
|
|
|
|
return r0
|
|
|
|
}
|