mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 16:34:02 +01:00
* Add UI support for setting containing groups * Show containing groups in group details panel * Move tag hierarchical filter code into separate type * Add depth to scene_count and add sub_group_count * Add sub-groups tab to groups page * Add containing groups to edit groups dialog * Show containing group description in sub-group view * Show group scene number in group scenes view * Add ability to drag move grid cards * Add sub group order option * Add reorder sub-groups interface * Separate page size selector component * Add interfaces to add and remove sub-groups to a group * Separate MultiSet components * Allow setting description while setting containing groups
563 lines
14 KiB
Go
563 lines
14 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"
|
|
)
|
|
|
|
// GroupReaderWriter is an autogenerated mock type for the GroupReaderWriter type
|
|
type GroupReaderWriter struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// All provides a mock function with given fields: ctx
|
|
func (_m *GroupReaderWriter) All(ctx context.Context) ([]*models.Group, error) {
|
|
ret := _m.Called(ctx)
|
|
|
|
var r0 []*models.Group
|
|
if rf, ok := ret.Get(0).(func(context.Context) []*models.Group); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*models.Group)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = rf(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Count provides a mock function with given fields: ctx
|
|
func (_m *GroupReaderWriter) Count(ctx context.Context) (int, error) {
|
|
ret := _m.Called(ctx)
|
|
|
|
var r0 int
|
|
if rf, ok := ret.Get(0).(func(context.Context) int); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
r0 = ret.Get(0).(int)
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = rf(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// CountByPerformerID provides a mock function with given fields: ctx, performerID
|
|
func (_m *GroupReaderWriter) CountByPerformerID(ctx context.Context, performerID int) (int, error) {
|
|
ret := _m.Called(ctx, performerID)
|
|
|
|
var r0 int
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) int); ok {
|
|
r0 = rf(ctx, performerID)
|
|
} else {
|
|
r0 = ret.Get(0).(int)
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
r1 = rf(ctx, performerID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// CountByStudioID provides a mock function with given fields: ctx, studioID
|
|
func (_m *GroupReaderWriter) CountByStudioID(ctx context.Context, studioID int) (int, error) {
|
|
ret := _m.Called(ctx, studioID)
|
|
|
|
var r0 int
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) int); ok {
|
|
r0 = rf(ctx, studioID)
|
|
} else {
|
|
r0 = ret.Get(0).(int)
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
r1 = rf(ctx, studioID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Create provides a mock function with given fields: ctx, newGroup
|
|
func (_m *GroupReaderWriter) Create(ctx context.Context, newGroup *models.Group) error {
|
|
ret := _m.Called(ctx, newGroup)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *models.Group) error); ok {
|
|
r0 = rf(ctx, newGroup)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Destroy provides a mock function with given fields: ctx, id
|
|
func (_m *GroupReaderWriter) Destroy(ctx context.Context, id int) error {
|
|
ret := _m.Called(ctx, id)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) 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 *GroupReaderWriter) Find(ctx context.Context, id int) (*models.Group, error) {
|
|
ret := _m.Called(ctx, id)
|
|
|
|
var r0 *models.Group
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) *models.Group); ok {
|
|
r0 = rf(ctx, id)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*models.Group)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
r1 = rf(ctx, id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FindByName provides a mock function with given fields: ctx, name, nocase
|
|
func (_m *GroupReaderWriter) FindByName(ctx context.Context, name string, nocase bool) (*models.Group, error) {
|
|
ret := _m.Called(ctx, name, nocase)
|
|
|
|
var r0 *models.Group
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, bool) *models.Group); ok {
|
|
r0 = rf(ctx, name, nocase)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*models.Group)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, bool) error); ok {
|
|
r1 = rf(ctx, name, nocase)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FindByNames provides a mock function with given fields: ctx, names, nocase
|
|
func (_m *GroupReaderWriter) FindByNames(ctx context.Context, names []string, nocase bool) ([]*models.Group, error) {
|
|
ret := _m.Called(ctx, names, nocase)
|
|
|
|
var r0 []*models.Group
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string, bool) []*models.Group); ok {
|
|
r0 = rf(ctx, names, nocase)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*models.Group)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, []string, bool) error); ok {
|
|
r1 = rf(ctx, names, nocase)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FindByPerformerID provides a mock function with given fields: ctx, performerID
|
|
func (_m *GroupReaderWriter) FindByPerformerID(ctx context.Context, performerID int) ([]*models.Group, error) {
|
|
ret := _m.Called(ctx, performerID)
|
|
|
|
var r0 []*models.Group
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) []*models.Group); ok {
|
|
r0 = rf(ctx, performerID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*models.Group)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
r1 = rf(ctx, performerID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FindByStudioID provides a mock function with given fields: ctx, studioID
|
|
func (_m *GroupReaderWriter) FindByStudioID(ctx context.Context, studioID int) ([]*models.Group, error) {
|
|
ret := _m.Called(ctx, studioID)
|
|
|
|
var r0 []*models.Group
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) []*models.Group); ok {
|
|
r0 = rf(ctx, studioID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*models.Group)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
r1 = rf(ctx, studioID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FindMany provides a mock function with given fields: ctx, ids
|
|
func (_m *GroupReaderWriter) FindMany(ctx context.Context, ids []int) ([]*models.Group, error) {
|
|
ret := _m.Called(ctx, ids)
|
|
|
|
var r0 []*models.Group
|
|
if rf, ok := ret.Get(0).(func(context.Context, []int) []*models.Group); ok {
|
|
r0 = rf(ctx, ids)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*models.Group)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, []int) error); ok {
|
|
r1 = rf(ctx, ids)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetBackImage provides a mock function with given fields: ctx, groupID
|
|
func (_m *GroupReaderWriter) GetBackImage(ctx context.Context, groupID int) ([]byte, error) {
|
|
ret := _m.Called(ctx, groupID)
|
|
|
|
var r0 []byte
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) []byte); ok {
|
|
r0 = rf(ctx, groupID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]byte)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
r1 = rf(ctx, groupID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetContainingGroupDescriptions provides a mock function with given fields: ctx, id
|
|
func (_m *GroupReaderWriter) GetContainingGroupDescriptions(ctx context.Context, id int) ([]models.GroupIDDescription, error) {
|
|
ret := _m.Called(ctx, id)
|
|
|
|
var r0 []models.GroupIDDescription
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) []models.GroupIDDescription); ok {
|
|
r0 = rf(ctx, id)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]models.GroupIDDescription)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
r1 = rf(ctx, id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetFrontImage provides a mock function with given fields: ctx, groupID
|
|
func (_m *GroupReaderWriter) GetFrontImage(ctx context.Context, groupID int) ([]byte, error) {
|
|
ret := _m.Called(ctx, groupID)
|
|
|
|
var r0 []byte
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) []byte); ok {
|
|
r0 = rf(ctx, groupID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]byte)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
r1 = rf(ctx, groupID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetSubGroupDescriptions provides a mock function with given fields: ctx, id
|
|
func (_m *GroupReaderWriter) GetSubGroupDescriptions(ctx context.Context, id int) ([]models.GroupIDDescription, error) {
|
|
ret := _m.Called(ctx, id)
|
|
|
|
var r0 []models.GroupIDDescription
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) []models.GroupIDDescription); ok {
|
|
r0 = rf(ctx, id)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]models.GroupIDDescription)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
r1 = rf(ctx, id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetTagIDs provides a mock function with given fields: ctx, relatedID
|
|
func (_m *GroupReaderWriter) GetTagIDs(ctx context.Context, relatedID int) ([]int, error) {
|
|
ret := _m.Called(ctx, relatedID)
|
|
|
|
var r0 []int
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) []int); ok {
|
|
r0 = rf(ctx, relatedID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]int)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
r1 = rf(ctx, relatedID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetURLs provides a mock function with given fields: ctx, relatedID
|
|
func (_m *GroupReaderWriter) GetURLs(ctx context.Context, relatedID int) ([]string, error) {
|
|
ret := _m.Called(ctx, relatedID)
|
|
|
|
var r0 []string
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) []string); ok {
|
|
r0 = rf(ctx, relatedID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
r1 = rf(ctx, relatedID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// HasBackImage provides a mock function with given fields: ctx, groupID
|
|
func (_m *GroupReaderWriter) HasBackImage(ctx context.Context, groupID int) (bool, error) {
|
|
ret := _m.Called(ctx, groupID)
|
|
|
|
var r0 bool
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) bool); ok {
|
|
r0 = rf(ctx, groupID)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
r1 = rf(ctx, groupID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// HasFrontImage provides a mock function with given fields: ctx, groupID
|
|
func (_m *GroupReaderWriter) HasFrontImage(ctx context.Context, groupID int) (bool, error) {
|
|
ret := _m.Called(ctx, groupID)
|
|
|
|
var r0 bool
|
|
if rf, ok := ret.Get(0).(func(context.Context, int) bool); ok {
|
|
r0 = rf(ctx, groupID)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
|
|
r1 = rf(ctx, groupID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Query provides a mock function with given fields: ctx, groupFilter, findFilter
|
|
func (_m *GroupReaderWriter) Query(ctx context.Context, groupFilter *models.GroupFilterType, findFilter *models.FindFilterType) ([]*models.Group, int, error) {
|
|
ret := _m.Called(ctx, groupFilter, findFilter)
|
|
|
|
var r0 []*models.Group
|
|
if rf, ok := ret.Get(0).(func(context.Context, *models.GroupFilterType, *models.FindFilterType) []*models.Group); ok {
|
|
r0 = rf(ctx, groupFilter, findFilter)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*models.Group)
|
|
}
|
|
}
|
|
|
|
var r1 int
|
|
if rf, ok := ret.Get(1).(func(context.Context, *models.GroupFilterType, *models.FindFilterType) int); ok {
|
|
r1 = rf(ctx, groupFilter, findFilter)
|
|
} else {
|
|
r1 = ret.Get(1).(int)
|
|
}
|
|
|
|
var r2 error
|
|
if rf, ok := ret.Get(2).(func(context.Context, *models.GroupFilterType, *models.FindFilterType) error); ok {
|
|
r2 = rf(ctx, groupFilter, findFilter)
|
|
} else {
|
|
r2 = ret.Error(2)
|
|
}
|
|
|
|
return r0, r1, r2
|
|
}
|
|
|
|
// QueryCount provides a mock function with given fields: ctx, groupFilter, findFilter
|
|
func (_m *GroupReaderWriter) QueryCount(ctx context.Context, groupFilter *models.GroupFilterType, findFilter *models.FindFilterType) (int, error) {
|
|
ret := _m.Called(ctx, groupFilter, findFilter)
|
|
|
|
var r0 int
|
|
if rf, ok := ret.Get(0).(func(context.Context, *models.GroupFilterType, *models.FindFilterType) int); ok {
|
|
r0 = rf(ctx, groupFilter, findFilter)
|
|
} else {
|
|
r0 = ret.Get(0).(int)
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, *models.GroupFilterType, *models.FindFilterType) error); ok {
|
|
r1 = rf(ctx, groupFilter, findFilter)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Update provides a mock function with given fields: ctx, updatedGroup
|
|
func (_m *GroupReaderWriter) Update(ctx context.Context, updatedGroup *models.Group) error {
|
|
ret := _m.Called(ctx, updatedGroup)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *models.Group) error); ok {
|
|
r0 = rf(ctx, updatedGroup)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// UpdateBackImage provides a mock function with given fields: ctx, groupID, backImage
|
|
func (_m *GroupReaderWriter) UpdateBackImage(ctx context.Context, groupID int, backImage []byte) error {
|
|
ret := _m.Called(ctx, groupID, backImage)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int, []byte) error); ok {
|
|
r0 = rf(ctx, groupID, backImage)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// UpdateFrontImage provides a mock function with given fields: ctx, groupID, frontImage
|
|
func (_m *GroupReaderWriter) UpdateFrontImage(ctx context.Context, groupID int, frontImage []byte) error {
|
|
ret := _m.Called(ctx, groupID, frontImage)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int, []byte) error); ok {
|
|
r0 = rf(ctx, groupID, frontImage)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// UpdatePartial provides a mock function with given fields: ctx, id, updatedGroup
|
|
func (_m *GroupReaderWriter) UpdatePartial(ctx context.Context, id int, updatedGroup models.GroupPartial) (*models.Group, error) {
|
|
ret := _m.Called(ctx, id, updatedGroup)
|
|
|
|
var r0 *models.Group
|
|
if rf, ok := ret.Get(0).(func(context.Context, int, models.GroupPartial) *models.Group); ok {
|
|
r0 = rf(ctx, id, updatedGroup)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*models.Group)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, int, models.GroupPartial) error); ok {
|
|
r1 = rf(ctx, id, updatedGroup)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|