stash/pkg/models/mocks/AudioReaderWriter.go
Bob bb76aff557 Able to Generate
Lots of errors to fix and TODO notes
2026-04-22 21:43:27 -07:00

1465 lines
35 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"
time "time"
)
// AudioReaderWriter is an autogenerated mock type for the AudioReaderWriter type
type AudioReaderWriter struct {
mock.Mock
}
// AddFileID provides a mock function with given fields: ctx, id, fileID
func (_m *AudioReaderWriter) AddFileID(ctx context.Context, id int, fileID models.FileID) error {
ret := _m.Called(ctx, id, fileID)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int, models.FileID) error); ok {
r0 = rf(ctx, id, fileID)
} else {
r0 = ret.Error(0)
}
return r0
}
// AddGalleryIDs provides a mock function with given fields: ctx, audioID, galleryIDs
func (_m *AudioReaderWriter) AddGalleryIDs(ctx context.Context, audioID int, galleryIDs []int) error {
ret := _m.Called(ctx, audioID, galleryIDs)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int, []int) error); ok {
r0 = rf(ctx, audioID, galleryIDs)
} else {
r0 = ret.Error(0)
}
return r0
}
// AddO provides a mock function with given fields: ctx, id, dates
func (_m *AudioReaderWriter) AddO(ctx context.Context, id int, dates []time.Time) ([]time.Time, error) {
ret := _m.Called(ctx, id, dates)
var r0 []time.Time
if rf, ok := ret.Get(0).(func(context.Context, int, []time.Time) []time.Time); ok {
r0 = rf(ctx, id, dates)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]time.Time)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int, []time.Time) error); ok {
r1 = rf(ctx, id, dates)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// AddViews provides a mock function with given fields: ctx, audioID, dates
func (_m *AudioReaderWriter) AddViews(ctx context.Context, audioID int, dates []time.Time) ([]time.Time, error) {
ret := _m.Called(ctx, audioID, dates)
var r0 []time.Time
if rf, ok := ret.Get(0).(func(context.Context, int, []time.Time) []time.Time); ok {
r0 = rf(ctx, audioID, dates)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]time.Time)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int, []time.Time) error); ok {
r1 = rf(ctx, audioID, dates)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// All provides a mock function with given fields: ctx
func (_m *AudioReaderWriter) All(ctx context.Context) ([]*models.Audio, error) {
ret := _m.Called(ctx)
var r0 []*models.Audio
if rf, ok := ret.Get(0).(func(context.Context) []*models.Audio); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*models.Audio)
}
}
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
}
// AssignFiles provides a mock function with given fields: ctx, audioID, fileID
func (_m *AudioReaderWriter) AssignFiles(ctx context.Context, audioID int, fileID []models.FileID) error {
ret := _m.Called(ctx, audioID, fileID)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int, []models.FileID) error); ok {
r0 = rf(ctx, audioID, fileID)
} else {
r0 = ret.Error(0)
}
return r0
}
// Count provides a mock function with given fields: ctx
func (_m *AudioReaderWriter) 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
}
// CountAllViews provides a mock function with given fields: ctx
func (_m *AudioReaderWriter) CountAllViews(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
}
// CountByFileID provides a mock function with given fields: ctx, fileID
func (_m *AudioReaderWriter) CountByFileID(ctx context.Context, fileID models.FileID) (int, error) {
ret := _m.Called(ctx, fileID)
var r0 int
if rf, ok := ret.Get(0).(func(context.Context, models.FileID) int); ok {
r0 = rf(ctx, fileID)
} else {
r0 = ret.Get(0).(int)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, models.FileID) error); ok {
r1 = rf(ctx, fileID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CountByPerformerID provides a mock function with given fields: ctx, performerID
func (_m *AudioReaderWriter) 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
}
// CountMissingChecksum provides a mock function with given fields: ctx
func (_m *AudioReaderWriter) CountMissingChecksum(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
}
// CountMissingOSHash provides a mock function with given fields: ctx
func (_m *AudioReaderWriter) CountMissingOSHash(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
}
// CountUniqueViews provides a mock function with given fields: ctx
func (_m *AudioReaderWriter) CountUniqueViews(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
}
// CountViews provides a mock function with given fields: ctx, id
func (_m *AudioReaderWriter) CountViews(ctx context.Context, id int) (int, error) {
ret := _m.Called(ctx, id)
var r0 int
if rf, ok := ret.Get(0).(func(context.Context, int) int); ok {
r0 = rf(ctx, id)
} else {
r0 = ret.Get(0).(int)
}
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
}
// Create provides a mock function with given fields: ctx, newAudio, fileIDs
func (_m *AudioReaderWriter) Create(ctx context.Context, newAudio *models.Audio, fileIDs []models.FileID) error {
ret := _m.Called(ctx, newAudio, fileIDs)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *models.Audio, []models.FileID) error); ok {
r0 = rf(ctx, newAudio, fileIDs)
} else {
r0 = ret.Error(0)
}
return r0
}
// DeleteAllViews provides a mock function with given fields: ctx, id
func (_m *AudioReaderWriter) DeleteAllViews(ctx context.Context, id int) (int, error) {
ret := _m.Called(ctx, id)
var r0 int
if rf, ok := ret.Get(0).(func(context.Context, int) int); ok {
r0 = rf(ctx, id)
} else {
r0 = ret.Get(0).(int)
}
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
}
// DeleteO provides a mock function with given fields: ctx, id, dates
func (_m *AudioReaderWriter) DeleteO(ctx context.Context, id int, dates []time.Time) ([]time.Time, error) {
ret := _m.Called(ctx, id, dates)
var r0 []time.Time
if rf, ok := ret.Get(0).(func(context.Context, int, []time.Time) []time.Time); ok {
r0 = rf(ctx, id, dates)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]time.Time)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int, []time.Time) error); ok {
r1 = rf(ctx, id, dates)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// DeleteViews provides a mock function with given fields: ctx, id, dates
func (_m *AudioReaderWriter) DeleteViews(ctx context.Context, id int, dates []time.Time) ([]time.Time, error) {
ret := _m.Called(ctx, id, dates)
var r0 []time.Time
if rf, ok := ret.Get(0).(func(context.Context, int, []time.Time) []time.Time); ok {
r0 = rf(ctx, id, dates)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]time.Time)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int, []time.Time) error); ok {
r1 = rf(ctx, id, dates)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Destroy provides a mock function with given fields: ctx, id
func (_m *AudioReaderWriter) 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
}
// Duration provides a mock function with given fields: ctx
func (_m *AudioReaderWriter) Duration(ctx context.Context) (float64, error) {
ret := _m.Called(ctx)
var r0 float64
if rf, ok := ret.Get(0).(func(context.Context) float64); ok {
r0 = rf(ctx)
} else {
r0 = ret.Get(0).(float64)
}
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
}
// Find provides a mock function with given fields: ctx, id
func (_m *AudioReaderWriter) Find(ctx context.Context, id int) (*models.Audio, error) {
ret := _m.Called(ctx, id)
var r0 *models.Audio
if rf, ok := ret.Get(0).(func(context.Context, int) *models.Audio); ok {
r0 = rf(ctx, id)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*models.Audio)
}
}
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
}
// FindByChecksum provides a mock function with given fields: ctx, checksum
func (_m *AudioReaderWriter) FindByChecksum(ctx context.Context, checksum string) ([]*models.Audio, error) {
ret := _m.Called(ctx, checksum)
var r0 []*models.Audio
if rf, ok := ret.Get(0).(func(context.Context, string) []*models.Audio); ok {
r0 = rf(ctx, checksum)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*models.Audio)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, checksum)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FindByFileID provides a mock function with given fields: ctx, fileID
func (_m *AudioReaderWriter) FindByFileID(ctx context.Context, fileID models.FileID) ([]*models.Audio, error) {
ret := _m.Called(ctx, fileID)
var r0 []*models.Audio
if rf, ok := ret.Get(0).(func(context.Context, models.FileID) []*models.Audio); ok {
r0 = rf(ctx, fileID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*models.Audio)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, models.FileID) error); ok {
r1 = rf(ctx, fileID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FindByFingerprints provides a mock function with given fields: ctx, fp
func (_m *AudioReaderWriter) FindByFingerprints(ctx context.Context, fp []models.Fingerprint) ([]*models.Audio, error) {
ret := _m.Called(ctx, fp)
var r0 []*models.Audio
if rf, ok := ret.Get(0).(func(context.Context, []models.Fingerprint) []*models.Audio); ok {
r0 = rf(ctx, fp)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*models.Audio)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, []models.Fingerprint) error); ok {
r1 = rf(ctx, fp)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FindByGalleryID provides a mock function with given fields: ctx, performerID
func (_m *AudioReaderWriter) FindByGalleryID(ctx context.Context, performerID int) ([]*models.Audio, error) {
ret := _m.Called(ctx, performerID)
var r0 []*models.Audio
if rf, ok := ret.Get(0).(func(context.Context, int) []*models.Audio); ok {
r0 = rf(ctx, performerID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*models.Audio)
}
}
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
}
// FindByGroupID provides a mock function with given fields: ctx, groupID
func (_m *AudioReaderWriter) FindByGroupID(ctx context.Context, groupID int) ([]*models.Audio, error) {
ret := _m.Called(ctx, groupID)
var r0 []*models.Audio
if rf, ok := ret.Get(0).(func(context.Context, int) []*models.Audio); ok {
r0 = rf(ctx, groupID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*models.Audio)
}
}
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
}
// FindByIDs provides a mock function with given fields: ctx, ids
func (_m *AudioReaderWriter) FindByIDs(ctx context.Context, ids []int) ([]*models.Audio, error) {
ret := _m.Called(ctx, ids)
var r0 []*models.Audio
if rf, ok := ret.Get(0).(func(context.Context, []int) []*models.Audio); ok {
r0 = rf(ctx, ids)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*models.Audio)
}
}
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
}
// FindByOSHash provides a mock function with given fields: ctx, oshash
func (_m *AudioReaderWriter) FindByOSHash(ctx context.Context, oshash string) ([]*models.Audio, error) {
ret := _m.Called(ctx, oshash)
var r0 []*models.Audio
if rf, ok := ret.Get(0).(func(context.Context, string) []*models.Audio); ok {
r0 = rf(ctx, oshash)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*models.Audio)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, oshash)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FindByPath provides a mock function with given fields: ctx, path
func (_m *AudioReaderWriter) FindByPath(ctx context.Context, path string) ([]*models.Audio, error) {
ret := _m.Called(ctx, path)
var r0 []*models.Audio
if rf, ok := ret.Get(0).(func(context.Context, string) []*models.Audio); ok {
r0 = rf(ctx, path)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*models.Audio)
}
}
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
}
// FindByPerformerID provides a mock function with given fields: ctx, performerID
func (_m *AudioReaderWriter) FindByPerformerID(ctx context.Context, performerID int) ([]*models.Audio, error) {
ret := _m.Called(ctx, performerID)
var r0 []*models.Audio
if rf, ok := ret.Get(0).(func(context.Context, int) []*models.Audio); ok {
r0 = rf(ctx, performerID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*models.Audio)
}
}
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
}
// FindByPrimaryFileID provides a mock function with given fields: ctx, fileID
func (_m *AudioReaderWriter) FindByPrimaryFileID(ctx context.Context, fileID models.FileID) ([]*models.Audio, error) {
ret := _m.Called(ctx, fileID)
var r0 []*models.Audio
if rf, ok := ret.Get(0).(func(context.Context, models.FileID) []*models.Audio); ok {
r0 = rf(ctx, fileID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*models.Audio)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, models.FileID) error); ok {
r1 = rf(ctx, fileID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FindDuplicates provides a mock function with given fields: ctx, distance, durationDiff
func (_m *AudioReaderWriter) FindDuplicates(ctx context.Context, distance int, durationDiff float64) ([][]*models.Audio, error) {
ret := _m.Called(ctx, distance, durationDiff)
var r0 [][]*models.Audio
if rf, ok := ret.Get(0).(func(context.Context, int, float64) [][]*models.Audio); ok {
r0 = rf(ctx, distance, durationDiff)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([][]*models.Audio)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int, float64) error); ok {
r1 = rf(ctx, distance, durationDiff)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FindMany provides a mock function with given fields: ctx, ids
func (_m *AudioReaderWriter) FindMany(ctx context.Context, ids []int) ([]*models.Audio, error) {
ret := _m.Called(ctx, ids)
var r0 []*models.Audio
if rf, ok := ret.Get(0).(func(context.Context, []int) []*models.Audio); ok {
r0 = rf(ctx, ids)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*models.Audio)
}
}
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
}
// GetAllOCount provides a mock function with given fields: ctx
func (_m *AudioReaderWriter) GetAllOCount(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
}
// GetCover provides a mock function with given fields: ctx, audioID
func (_m *AudioReaderWriter) GetCover(ctx context.Context, audioID int) ([]byte, error) {
ret := _m.Called(ctx, audioID)
var r0 []byte
if rf, ok := ret.Get(0).(func(context.Context, int) []byte); ok {
r0 = rf(ctx, audioID)
} 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, audioID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetCustomFields provides a mock function with given fields: ctx, id
func (_m *AudioReaderWriter) GetCustomFields(ctx context.Context, id int) (map[string]interface{}, error) {
ret := _m.Called(ctx, id)
var r0 map[string]interface{}
if rf, ok := ret.Get(0).(func(context.Context, int) map[string]interface{}); ok {
r0 = rf(ctx, id)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(map[string]interface{})
}
}
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
}
// GetCustomFieldsBulk provides a mock function with given fields: ctx, ids
func (_m *AudioReaderWriter) GetCustomFieldsBulk(ctx context.Context, ids []int) ([]models.CustomFieldMap, error) {
ret := _m.Called(ctx, ids)
var r0 []models.CustomFieldMap
if rf, ok := ret.Get(0).(func(context.Context, []int) []models.CustomFieldMap); ok {
r0 = rf(ctx, ids)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]models.CustomFieldMap)
}
}
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
}
// GetFiles provides a mock function with given fields: ctx, relatedID
func (_m *AudioReaderWriter) GetFiles(ctx context.Context, relatedID int) ([]*models.AudioFile, error) {
ret := _m.Called(ctx, relatedID)
var r0 []*models.AudioFile
if rf, ok := ret.Get(0).(func(context.Context, int) []*models.AudioFile); ok {
r0 = rf(ctx, relatedID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*models.AudioFile)
}
}
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
}
// GetGalleryIDs provides a mock function with given fields: ctx, relatedID
func (_m *AudioReaderWriter) GetGalleryIDs(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
}
// GetGroups provides a mock function with given fields: ctx, id
func (_m *AudioReaderWriter) GetGroups(ctx context.Context, id int) ([]models.GroupsAudios, error) {
ret := _m.Called(ctx, id)
var r0 []models.GroupsAudios
if rf, ok := ret.Get(0).(func(context.Context, int) []models.GroupsAudios); ok {
r0 = rf(ctx, id)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]models.GroupsAudios)
}
}
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
}
// GetManyFileIDs provides a mock function with given fields: ctx, ids
func (_m *AudioReaderWriter) GetManyFileIDs(ctx context.Context, ids []int) ([][]models.FileID, error) {
ret := _m.Called(ctx, ids)
var r0 [][]models.FileID
if rf, ok := ret.Get(0).(func(context.Context, []int) [][]models.FileID); ok {
r0 = rf(ctx, ids)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([][]models.FileID)
}
}
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
}
// GetManyLastViewed provides a mock function with given fields: ctx, ids
func (_m *AudioReaderWriter) GetManyLastViewed(ctx context.Context, ids []int) ([]*time.Time, error) {
ret := _m.Called(ctx, ids)
var r0 []*time.Time
if rf, ok := ret.Get(0).(func(context.Context, []int) []*time.Time); ok {
r0 = rf(ctx, ids)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*time.Time)
}
}
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
}
// GetManyOCount provides a mock function with given fields: ctx, ids
func (_m *AudioReaderWriter) GetManyOCount(ctx context.Context, ids []int) ([]int, error) {
ret := _m.Called(ctx, ids)
var r0 []int
if rf, ok := ret.Get(0).(func(context.Context, []int) []int); ok {
r0 = rf(ctx, ids)
} 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, ids)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetManyODates provides a mock function with given fields: ctx, ids
func (_m *AudioReaderWriter) GetManyODates(ctx context.Context, ids []int) ([][]time.Time, error) {
ret := _m.Called(ctx, ids)
var r0 [][]time.Time
if rf, ok := ret.Get(0).(func(context.Context, []int) [][]time.Time); ok {
r0 = rf(ctx, ids)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([][]time.Time)
}
}
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
}
// GetManyViewCount provides a mock function with given fields: ctx, ids
func (_m *AudioReaderWriter) GetManyViewCount(ctx context.Context, ids []int) ([]int, error) {
ret := _m.Called(ctx, ids)
var r0 []int
if rf, ok := ret.Get(0).(func(context.Context, []int) []int); ok {
r0 = rf(ctx, ids)
} 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, ids)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetManyViewDates provides a mock function with given fields: ctx, ids
func (_m *AudioReaderWriter) GetManyViewDates(ctx context.Context, ids []int) ([][]time.Time, error) {
ret := _m.Called(ctx, ids)
var r0 [][]time.Time
if rf, ok := ret.Get(0).(func(context.Context, []int) [][]time.Time); ok {
r0 = rf(ctx, ids)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([][]time.Time)
}
}
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
}
// GetOCount provides a mock function with given fields: ctx, id
func (_m *AudioReaderWriter) GetOCount(ctx context.Context, id int) (int, error) {
ret := _m.Called(ctx, id)
var r0 int
if rf, ok := ret.Get(0).(func(context.Context, int) int); ok {
r0 = rf(ctx, id)
} else {
r0 = ret.Get(0).(int)
}
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
}
// GetODates provides a mock function with given fields: ctx, relatedID
func (_m *AudioReaderWriter) GetODates(ctx context.Context, relatedID int) ([]time.Time, error) {
ret := _m.Called(ctx, relatedID)
var r0 []time.Time
if rf, ok := ret.Get(0).(func(context.Context, int) []time.Time); ok {
r0 = rf(ctx, relatedID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]time.Time)
}
}
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
}
// GetPerformerIDs provides a mock function with given fields: ctx, relatedID
func (_m *AudioReaderWriter) GetPerformerIDs(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
}
// GetTagIDs provides a mock function with given fields: ctx, relatedID
func (_m *AudioReaderWriter) 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 *AudioReaderWriter) 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
}
// GetViewDates provides a mock function with given fields: ctx, relatedID
func (_m *AudioReaderWriter) GetViewDates(ctx context.Context, relatedID int) ([]time.Time, error) {
ret := _m.Called(ctx, relatedID)
var r0 []time.Time
if rf, ok := ret.Get(0).(func(context.Context, int) []time.Time); ok {
r0 = rf(ctx, relatedID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]time.Time)
}
}
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
}
// HasCover provides a mock function with given fields: ctx, audioID
func (_m *AudioReaderWriter) HasCover(ctx context.Context, audioID int) (bool, error) {
ret := _m.Called(ctx, audioID)
var r0 bool
if rf, ok := ret.Get(0).(func(context.Context, int) bool); ok {
r0 = rf(ctx, audioID)
} else {
r0 = ret.Get(0).(bool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
r1 = rf(ctx, audioID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// OCountByGroupID provides a mock function with given fields: ctx, groupID
func (_m *AudioReaderWriter) OCountByGroupID(ctx context.Context, groupID int) (int, error) {
ret := _m.Called(ctx, groupID)
var r0 int
if rf, ok := ret.Get(0).(func(context.Context, int) int); ok {
r0 = rf(ctx, groupID)
} else {
r0 = ret.Get(0).(int)
}
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
}
// OCountByPerformerID provides a mock function with given fields: ctx, performerID
func (_m *AudioReaderWriter) OCountByPerformerID(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
}
// OCountByStudioID provides a mock function with given fields: ctx, studioID
func (_m *AudioReaderWriter) OCountByStudioID(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
}
// PlayDuration provides a mock function with given fields: ctx
func (_m *AudioReaderWriter) PlayDuration(ctx context.Context) (float64, error) {
ret := _m.Called(ctx)
var r0 float64
if rf, ok := ret.Get(0).(func(context.Context) float64); ok {
r0 = rf(ctx)
} else {
r0 = ret.Get(0).(float64)
}
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
}
// Query provides a mock function with given fields: ctx, options
func (_m *AudioReaderWriter) Query(ctx context.Context, options models.AudioQueryOptions) (*models.AudioQueryResult, error) {
ret := _m.Called(ctx, options)
var r0 *models.AudioQueryResult
if rf, ok := ret.Get(0).(func(context.Context, models.AudioQueryOptions) *models.AudioQueryResult); ok {
r0 = rf(ctx, options)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*models.AudioQueryResult)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, models.AudioQueryOptions) error); ok {
r1 = rf(ctx, options)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// QueryCount provides a mock function with given fields: ctx, audioFilter, findFilter
func (_m *AudioReaderWriter) QueryCount(ctx context.Context, audioFilter *models.AudioFilterType, findFilter *models.FindFilterType) (int, error) {
ret := _m.Called(ctx, audioFilter, findFilter)
var r0 int
if rf, ok := ret.Get(0).(func(context.Context, *models.AudioFilterType, *models.FindFilterType) int); ok {
r0 = rf(ctx, audioFilter, findFilter)
} else {
r0 = ret.Get(0).(int)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *models.AudioFilterType, *models.FindFilterType) error); ok {
r1 = rf(ctx, audioFilter, findFilter)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ResetActivity provides a mock function with given fields: ctx, audioID, resetResume, resetDuration
func (_m *AudioReaderWriter) ResetActivity(ctx context.Context, audioID int, resetResume bool, resetDuration bool) (bool, error) {
ret := _m.Called(ctx, audioID, resetResume, resetDuration)
var r0 bool
if rf, ok := ret.Get(0).(func(context.Context, int, bool, bool) bool); ok {
r0 = rf(ctx, audioID, resetResume, resetDuration)
} else {
r0 = ret.Get(0).(bool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int, bool, bool) error); ok {
r1 = rf(ctx, audioID, resetResume, resetDuration)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ResetO provides a mock function with given fields: ctx, id
func (_m *AudioReaderWriter) ResetO(ctx context.Context, id int) (int, error) {
ret := _m.Called(ctx, id)
var r0 int
if rf, ok := ret.Get(0).(func(context.Context, int) int); ok {
r0 = rf(ctx, id)
} else {
r0 = ret.Get(0).(int)
}
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
}
// SaveActivity provides a mock function with given fields: ctx, audioID, resumeTime, playDuration
func (_m *AudioReaderWriter) SaveActivity(ctx context.Context, audioID int, resumeTime *float64, playDuration *float64) (bool, error) {
ret := _m.Called(ctx, audioID, resumeTime, playDuration)
var r0 bool
if rf, ok := ret.Get(0).(func(context.Context, int, *float64, *float64) bool); ok {
r0 = rf(ctx, audioID, resumeTime, playDuration)
} else {
r0 = ret.Get(0).(bool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int, *float64, *float64) error); ok {
r1 = rf(ctx, audioID, resumeTime, playDuration)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// SetCustomFields provides a mock function with given fields: ctx, id, fields
func (_m *AudioReaderWriter) SetCustomFields(ctx context.Context, id int, fields models.CustomFieldsInput) error {
ret := _m.Called(ctx, id, fields)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int, models.CustomFieldsInput) error); ok {
r0 = rf(ctx, id, fields)
} else {
r0 = ret.Error(0)
}
return r0
}
// Size provides a mock function with given fields: ctx
func (_m *AudioReaderWriter) Size(ctx context.Context) (float64, error) {
ret := _m.Called(ctx)
var r0 float64
if rf, ok := ret.Get(0).(func(context.Context) float64); ok {
r0 = rf(ctx)
} else {
r0 = ret.Get(0).(float64)
}
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
}
// Update provides a mock function with given fields: ctx, updatedAudio
func (_m *AudioReaderWriter) Update(ctx context.Context, updatedAudio *models.Audio) error {
ret := _m.Called(ctx, updatedAudio)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *models.Audio) error); ok {
r0 = rf(ctx, updatedAudio)
} else {
r0 = ret.Error(0)
}
return r0
}
// UpdateCover provides a mock function with given fields: ctx, audioID, cover
func (_m *AudioReaderWriter) UpdateCover(ctx context.Context, audioID int, cover []byte) error {
ret := _m.Called(ctx, audioID, cover)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int, []byte) error); ok {
r0 = rf(ctx, audioID, cover)
} else {
r0 = ret.Error(0)
}
return r0
}
// UpdatePartial provides a mock function with given fields: ctx, id, updatedAudio
func (_m *AudioReaderWriter) UpdatePartial(ctx context.Context, id int, updatedAudio models.AudioPartial) (*models.Audio, error) {
ret := _m.Called(ctx, id, updatedAudio)
var r0 *models.Audio
if rf, ok := ret.Get(0).(func(context.Context, int, models.AudioPartial) *models.Audio); ok {
r0 = rf(ctx, id, updatedAudio)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*models.Audio)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int, models.AudioPartial) error); ok {
r1 = rf(ctx, id, updatedAudio)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Wall provides a mock function with given fields: ctx, q
func (_m *AudioReaderWriter) Wall(ctx context.Context, q *string) ([]*models.Audio, error) {
ret := _m.Called(ctx, q)
var r0 []*models.Audio
if rf, ok := ret.Get(0).(func(context.Context, *string) []*models.Audio); ok {
r0 = rf(ctx, q)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*models.Audio)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *string) error); ok {
r1 = rf(ctx, q)
} else {
r1 = ret.Error(1)
}
return r0, r1
}