1448 lines
48 KiB
Go
1448 lines
48 KiB
Go
// Code generated by mockery v2.53.6. DO NOT EDIT.
|
|
|
|
package merch
|
|
|
|
import (
|
|
context "context"
|
|
sql "database/sql"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
time "time"
|
|
)
|
|
|
|
// MockRepository is an autogenerated mock type for the Repository type
|
|
type MockRepository struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type MockRepository_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *MockRepository) EXPECT() *MockRepository_Expecter {
|
|
return &MockRepository_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// attachLabel provides a mock function with given fields: ctx, userId, label
|
|
func (_m *MockRepository) attachLabel(ctx context.Context, userId int64, label *LabelLink) error {
|
|
ret := _m.Called(ctx, userId, label)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for attachLabel")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, *LabelLink) error); ok {
|
|
r0 = rf(ctx, userId, label)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockRepository_attachLabel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'attachLabel'
|
|
type MockRepository_attachLabel_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// attachLabel is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - userId int64
|
|
// - label *LabelLink
|
|
func (_e *MockRepository_Expecter) attachLabel(ctx interface{}, userId interface{}, label interface{}) *MockRepository_attachLabel_Call {
|
|
return &MockRepository_attachLabel_Call{Call: _e.mock.On("attachLabel", ctx, userId, label)}
|
|
}
|
|
|
|
func (_c *MockRepository_attachLabel_Call) Run(run func(ctx context.Context, userId int64, label *LabelLink)) *MockRepository_attachLabel_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(*LabelLink))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_attachLabel_Call) Return(_a0 error) *MockRepository_attachLabel_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_attachLabel_Call) RunAndReturn(run func(context.Context, int64, *LabelLink) error) *MockRepository_attachLabel_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// createLabel provides a mock function with given fields: ctx, userId, label
|
|
func (_m *MockRepository) createLabel(ctx context.Context, userId int64, label *Label) error {
|
|
ret := _m.Called(ctx, userId, label)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for createLabel")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, *Label) error); ok {
|
|
r0 = rf(ctx, userId, label)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockRepository_createLabel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'createLabel'
|
|
type MockRepository_createLabel_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// createLabel is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - userId int64
|
|
// - label *Label
|
|
func (_e *MockRepository_Expecter) createLabel(ctx interface{}, userId interface{}, label interface{}) *MockRepository_createLabel_Call {
|
|
return &MockRepository_createLabel_Call{Call: _e.mock.On("createLabel", ctx, userId, label)}
|
|
}
|
|
|
|
func (_c *MockRepository_createLabel_Call) Run(run func(ctx context.Context, userId int64, label *Label)) *MockRepository_createLabel_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(*Label))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_createLabel_Call) Return(_a0 error) *MockRepository_createLabel_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_createLabel_Call) RunAndReturn(run func(context.Context, int64, *Label) error) *MockRepository_createLabel_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// createMerch provides a mock function with given fields: ctx, merch, extra
|
|
func (_m *MockRepository) createMerch(ctx context.Context, merch *Merch, extra []ExtraData) error {
|
|
ret := _m.Called(ctx, merch, extra)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for createMerch")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *Merch, []ExtraData) error); ok {
|
|
r0 = rf(ctx, merch, extra)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockRepository_createMerch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'createMerch'
|
|
type MockRepository_createMerch_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// createMerch is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - merch *Merch
|
|
// - extra []ExtraData
|
|
func (_e *MockRepository_Expecter) createMerch(ctx interface{}, merch interface{}, extra interface{}) *MockRepository_createMerch_Call {
|
|
return &MockRepository_createMerch_Call{Call: _e.mock.On("createMerch", ctx, merch, extra)}
|
|
}
|
|
|
|
func (_c *MockRepository_createMerch_Call) Run(run func(ctx context.Context, merch *Merch, extra []ExtraData)) *MockRepository_createMerch_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*Merch), args[2].([]ExtraData))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_createMerch_Call) Return(_a0 error) *MockRepository_createMerch_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_createMerch_Call) RunAndReturn(run func(context.Context, *Merch, []ExtraData) error) *MockRepository_createMerch_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// createOrigin provides a mock function with given fields: ctx, origin
|
|
func (_m *MockRepository) createOrigin(ctx context.Context, origin *Origin) error {
|
|
ret := _m.Called(ctx, origin)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for createOrigin")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *Origin) error); ok {
|
|
r0 = rf(ctx, origin)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockRepository_createOrigin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'createOrigin'
|
|
type MockRepository_createOrigin_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// createOrigin is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - origin *Origin
|
|
func (_e *MockRepository_Expecter) createOrigin(ctx interface{}, origin interface{}) *MockRepository_createOrigin_Call {
|
|
return &MockRepository_createOrigin_Call{Call: _e.mock.On("createOrigin", ctx, origin)}
|
|
}
|
|
|
|
func (_c *MockRepository_createOrigin_Call) Run(run func(ctx context.Context, origin *Origin)) *MockRepository_createOrigin_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*Origin))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_createOrigin_Call) Return(_a0 error) *MockRepository_createOrigin_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_createOrigin_Call) RunAndReturn(run func(context.Context, *Origin) error) *MockRepository_createOrigin_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// deleteLabel provides a mock function with given fields: ctx, userId, labelUuid, now
|
|
func (_m *MockRepository) deleteLabel(ctx context.Context, userId int64, labelUuid string, now sql.NullTime) error {
|
|
ret := _m.Called(ctx, userId, labelUuid, now)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for deleteLabel")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, string, sql.NullTime) error); ok {
|
|
r0 = rf(ctx, userId, labelUuid, now)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockRepository_deleteLabel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'deleteLabel'
|
|
type MockRepository_deleteLabel_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// deleteLabel is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - userId int64
|
|
// - labelUuid string
|
|
// - now sql.NullTime
|
|
func (_e *MockRepository_Expecter) deleteLabel(ctx interface{}, userId interface{}, labelUuid interface{}, now interface{}) *MockRepository_deleteLabel_Call {
|
|
return &MockRepository_deleteLabel_Call{Call: _e.mock.On("deleteLabel", ctx, userId, labelUuid, now)}
|
|
}
|
|
|
|
func (_c *MockRepository_deleteLabel_Call) Run(run func(ctx context.Context, userId int64, labelUuid string, now sql.NullTime)) *MockRepository_deleteLabel_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(string), args[3].(sql.NullTime))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_deleteLabel_Call) Return(_a0 error) *MockRepository_deleteLabel_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_deleteLabel_Call) RunAndReturn(run func(context.Context, int64, string, sql.NullTime) error) *MockRepository_deleteLabel_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// deleteOneMerchRecord provides a mock function with given fields: ctx, userId, merchUuid, delTime
|
|
func (_m *MockRepository) deleteOneMerchRecord(ctx context.Context, userId int64, merchUuid string, delTime time.Time) error {
|
|
ret := _m.Called(ctx, userId, merchUuid, delTime)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for deleteOneMerchRecord")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, string, time.Time) error); ok {
|
|
r0 = rf(ctx, userId, merchUuid, delTime)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockRepository_deleteOneMerchRecord_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'deleteOneMerchRecord'
|
|
type MockRepository_deleteOneMerchRecord_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// deleteOneMerchRecord is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - userId int64
|
|
// - merchUuid string
|
|
// - delTime time.Time
|
|
func (_e *MockRepository_Expecter) deleteOneMerchRecord(ctx interface{}, userId interface{}, merchUuid interface{}, delTime interface{}) *MockRepository_deleteOneMerchRecord_Call {
|
|
return &MockRepository_deleteOneMerchRecord_Call{Call: _e.mock.On("deleteOneMerchRecord", ctx, userId, merchUuid, delTime)}
|
|
}
|
|
|
|
func (_c *MockRepository_deleteOneMerchRecord_Call) Run(run func(ctx context.Context, userId int64, merchUuid string, delTime time.Time)) *MockRepository_deleteOneMerchRecord_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(string), args[3].(time.Time))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_deleteOneMerchRecord_Call) Return(_a0 error) *MockRepository_deleteOneMerchRecord_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_deleteOneMerchRecord_Call) RunAndReturn(run func(context.Context, int64, string, time.Time) error) *MockRepository_deleteOneMerchRecord_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// deleteOriginByName provides a mock function with given fields: ctx, name, deletedAt
|
|
func (_m *MockRepository) deleteOriginByName(ctx context.Context, name string, deletedAt sql.NullTime) error {
|
|
ret := _m.Called(ctx, name, deletedAt)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for deleteOriginByName")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, sql.NullTime) error); ok {
|
|
r0 = rf(ctx, name, deletedAt)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockRepository_deleteOriginByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'deleteOriginByName'
|
|
type MockRepository_deleteOriginByName_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// deleteOriginByName is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - name string
|
|
// - deletedAt sql.NullTime
|
|
func (_e *MockRepository_Expecter) deleteOriginByName(ctx interface{}, name interface{}, deletedAt interface{}) *MockRepository_deleteOriginByName_Call {
|
|
return &MockRepository_deleteOriginByName_Call{Call: _e.mock.On("deleteOriginByName", ctx, name, deletedAt)}
|
|
}
|
|
|
|
func (_c *MockRepository_deleteOriginByName_Call) Run(run func(ctx context.Context, name string, deletedAt sql.NullTime)) *MockRepository_deleteOriginByName_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(sql.NullTime))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_deleteOriginByName_Call) Return(_a0 error) *MockRepository_deleteOriginByName_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_deleteOriginByName_Call) RunAndReturn(run func(context.Context, string, sql.NullTime) error) *MockRepository_deleteOriginByName_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// deleteZeroPrices provides a mock function with given fields: ctx, userId, now, list
|
|
func (_m *MockRepository) deleteZeroPrices(ctx context.Context, userId int64, now sql.NullTime, list []int64) error {
|
|
ret := _m.Called(ctx, userId, now, list)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for deleteZeroPrices")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, sql.NullTime, []int64) error); ok {
|
|
r0 = rf(ctx, userId, now, list)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockRepository_deleteZeroPrices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'deleteZeroPrices'
|
|
type MockRepository_deleteZeroPrices_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// deleteZeroPrices is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - userId int64
|
|
// - now sql.NullTime
|
|
// - list []int64
|
|
func (_e *MockRepository_Expecter) deleteZeroPrices(ctx interface{}, userId interface{}, now interface{}, list interface{}) *MockRepository_deleteZeroPrices_Call {
|
|
return &MockRepository_deleteZeroPrices_Call{Call: _e.mock.On("deleteZeroPrices", ctx, userId, now, list)}
|
|
}
|
|
|
|
func (_c *MockRepository_deleteZeroPrices_Call) Run(run func(ctx context.Context, userId int64, now sql.NullTime, list []int64)) *MockRepository_deleteZeroPrices_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(sql.NullTime), args[3].([]int64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_deleteZeroPrices_Call) Return(_a0 error) *MockRepository_deleteZeroPrices_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_deleteZeroPrices_Call) RunAndReturn(run func(context.Context, int64, sql.NullTime, []int64) error) *MockRepository_deleteZeroPrices_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// deleteZeroPricesPeriod provides a mock function with given fields: ctx, userId, start, end, now
|
|
func (_m *MockRepository) deleteZeroPricesPeriod(ctx context.Context, userId int64, start time.Time, end time.Time, now sql.NullTime) error {
|
|
ret := _m.Called(ctx, userId, start, end, now)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for deleteZeroPricesPeriod")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, time.Time, time.Time, sql.NullTime) error); ok {
|
|
r0 = rf(ctx, userId, start, end, now)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockRepository_deleteZeroPricesPeriod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'deleteZeroPricesPeriod'
|
|
type MockRepository_deleteZeroPricesPeriod_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// deleteZeroPricesPeriod is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - userId int64
|
|
// - start time.Time
|
|
// - end time.Time
|
|
// - now sql.NullTime
|
|
func (_e *MockRepository_Expecter) deleteZeroPricesPeriod(ctx interface{}, userId interface{}, start interface{}, end interface{}, now interface{}) *MockRepository_deleteZeroPricesPeriod_Call {
|
|
return &MockRepository_deleteZeroPricesPeriod_Call{Call: _e.mock.On("deleteZeroPricesPeriod", ctx, userId, start, end, now)}
|
|
}
|
|
|
|
func (_c *MockRepository_deleteZeroPricesPeriod_Call) Run(run func(ctx context.Context, userId int64, start time.Time, end time.Time, now sql.NullTime)) *MockRepository_deleteZeroPricesPeriod_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(time.Time), args[3].(time.Time), args[4].(sql.NullTime))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_deleteZeroPricesPeriod_Call) Return(_a0 error) *MockRepository_deleteZeroPricesPeriod_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_deleteZeroPricesPeriod_Call) RunAndReturn(run func(context.Context, int64, time.Time, time.Time, sql.NullTime) error) *MockRepository_deleteZeroPricesPeriod_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// detachLabel provides a mock function with given fields: ctx, userId, label
|
|
func (_m *MockRepository) detachLabel(ctx context.Context, userId int64, label *LabelLink) error {
|
|
ret := _m.Called(ctx, userId, label)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for detachLabel")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, *LabelLink) error); ok {
|
|
r0 = rf(ctx, userId, label)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockRepository_detachLabel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'detachLabel'
|
|
type MockRepository_detachLabel_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// detachLabel is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - userId int64
|
|
// - label *LabelLink
|
|
func (_e *MockRepository_Expecter) detachLabel(ctx interface{}, userId interface{}, label interface{}) *MockRepository_detachLabel_Call {
|
|
return &MockRepository_detachLabel_Call{Call: _e.mock.On("detachLabel", ctx, userId, label)}
|
|
}
|
|
|
|
func (_c *MockRepository_detachLabel_Call) Run(run func(ctx context.Context, userId int64, label *LabelLink)) *MockRepository_detachLabel_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(*LabelLink))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_detachLabel_Call) Return(_a0 error) *MockRepository_detachLabel_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_detachLabel_Call) RunAndReturn(run func(context.Context, int64, *LabelLink) error) *MockRepository_detachLabel_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// getAllUserMerch provides a mock function with given fields: ctx, userId
|
|
func (_m *MockRepository) getAllUserMerch(ctx context.Context, userId int64) ([]Merch, error) {
|
|
ret := _m.Called(ctx, userId)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for getAllUserMerch")
|
|
}
|
|
|
|
var r0 []Merch
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]Merch, error)); ok {
|
|
return rf(ctx, userId)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64) []Merch); ok {
|
|
r0 = rf(ctx, userId)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]Merch)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
|
|
r1 = rf(ctx, userId)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockRepository_getAllUserMerch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getAllUserMerch'
|
|
type MockRepository_getAllUserMerch_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// getAllUserMerch is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - userId int64
|
|
func (_e *MockRepository_Expecter) getAllUserMerch(ctx interface{}, userId interface{}) *MockRepository_getAllUserMerch_Call {
|
|
return &MockRepository_getAllUserMerch_Call{Call: _e.mock.On("getAllUserMerch", ctx, userId)}
|
|
}
|
|
|
|
func (_c *MockRepository_getAllUserMerch_Call) Run(run func(ctx context.Context, userId int64)) *MockRepository_getAllUserMerch_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getAllUserMerch_Call) Return(_a0 []Merch, _a1 error) *MockRepository_getAllUserMerch_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getAllUserMerch_Call) RunAndReturn(run func(context.Context, int64) ([]Merch, error)) *MockRepository_getAllUserMerch_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// getAttachedLabelsByUuid provides a mock function with given fields: ctx, userId, merchUuid
|
|
func (_m *MockRepository) getAttachedLabelsByUuid(ctx context.Context, userId int64, merchUuid string) ([]string, error) {
|
|
ret := _m.Called(ctx, userId, merchUuid)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for getAttachedLabelsByUuid")
|
|
}
|
|
|
|
var r0 []string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, string) ([]string, error)); ok {
|
|
return rf(ctx, userId, merchUuid)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, string) []string); ok {
|
|
r0 = rf(ctx, userId, merchUuid)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok {
|
|
r1 = rf(ctx, userId, merchUuid)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockRepository_getAttachedLabelsByUuid_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getAttachedLabelsByUuid'
|
|
type MockRepository_getAttachedLabelsByUuid_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// getAttachedLabelsByUuid is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - userId int64
|
|
// - merchUuid string
|
|
func (_e *MockRepository_Expecter) getAttachedLabelsByUuid(ctx interface{}, userId interface{}, merchUuid interface{}) *MockRepository_getAttachedLabelsByUuid_Call {
|
|
return &MockRepository_getAttachedLabelsByUuid_Call{Call: _e.mock.On("getAttachedLabelsByUuid", ctx, userId, merchUuid)}
|
|
}
|
|
|
|
func (_c *MockRepository_getAttachedLabelsByUuid_Call) Run(run func(ctx context.Context, userId int64, merchUuid string)) *MockRepository_getAttachedLabelsByUuid_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getAttachedLabelsByUuid_Call) Return(_a0 []string, _a1 error) *MockRepository_getAttachedLabelsByUuid_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getAttachedLabelsByUuid_Call) RunAndReturn(run func(context.Context, int64, string) ([]string, error)) *MockRepository_getAttachedLabelsByUuid_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// getDistinctPrices provides a mock function with given fields: ctx, userId, merchUuid, days
|
|
func (_m *MockRepository) getDistinctPrices(ctx context.Context, userId int64, merchUuid string, days time.Time) ([]Price, error) {
|
|
ret := _m.Called(ctx, userId, merchUuid, days)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for getDistinctPrices")
|
|
}
|
|
|
|
var r0 []Price
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, string, time.Time) ([]Price, error)); ok {
|
|
return rf(ctx, userId, merchUuid, days)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, string, time.Time) []Price); ok {
|
|
r0 = rf(ctx, userId, merchUuid, days)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]Price)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int64, string, time.Time) error); ok {
|
|
r1 = rf(ctx, userId, merchUuid, days)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockRepository_getDistinctPrices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getDistinctPrices'
|
|
type MockRepository_getDistinctPrices_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// getDistinctPrices is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - userId int64
|
|
// - merchUuid string
|
|
// - days time.Time
|
|
func (_e *MockRepository_Expecter) getDistinctPrices(ctx interface{}, userId interface{}, merchUuid interface{}, days interface{}) *MockRepository_getDistinctPrices_Call {
|
|
return &MockRepository_getDistinctPrices_Call{Call: _e.mock.On("getDistinctPrices", ctx, userId, merchUuid, days)}
|
|
}
|
|
|
|
func (_c *MockRepository_getDistinctPrices_Call) Run(run func(ctx context.Context, userId int64, merchUuid string, days time.Time)) *MockRepository_getDistinctPrices_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(string), args[3].(time.Time))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getDistinctPrices_Call) Return(_a0 []Price, _a1 error) *MockRepository_getDistinctPrices_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getDistinctPrices_Call) RunAndReturn(run func(context.Context, int64, string, time.Time) ([]Price, error)) *MockRepository_getDistinctPrices_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// getLabels provides a mock function with given fields: ctx, userId
|
|
func (_m *MockRepository) getLabels(ctx context.Context, userId int64) ([]LabelsList, error) {
|
|
ret := _m.Called(ctx, userId)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for getLabels")
|
|
}
|
|
|
|
var r0 []LabelsList
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]LabelsList, error)); ok {
|
|
return rf(ctx, userId)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64) []LabelsList); ok {
|
|
r0 = rf(ctx, userId)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]LabelsList)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
|
|
r1 = rf(ctx, userId)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockRepository_getLabels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getLabels'
|
|
type MockRepository_getLabels_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// getLabels is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - userId int64
|
|
func (_e *MockRepository_Expecter) getLabels(ctx interface{}, userId interface{}) *MockRepository_getLabels_Call {
|
|
return &MockRepository_getLabels_Call{Call: _e.mock.On("getLabels", ctx, userId)}
|
|
}
|
|
|
|
func (_c *MockRepository_getLabels_Call) Run(run func(ctx context.Context, userId int64)) *MockRepository_getLabels_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getLabels_Call) Return(_a0 []LabelsList, _a1 error) *MockRepository_getLabels_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getLabels_Call) RunAndReturn(run func(context.Context, int64) ([]LabelsList, error)) *MockRepository_getLabels_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// getMany provides a mock function with given fields: ctx, userId
|
|
func (_m *MockRepository) getMany(ctx context.Context, userId int64) ([]getMerchInternal, error) {
|
|
ret := _m.Called(ctx, userId)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for getMany")
|
|
}
|
|
|
|
var r0 []getMerchInternal
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]getMerchInternal, error)); ok {
|
|
return rf(ctx, userId)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64) []getMerchInternal); ok {
|
|
r0 = rf(ctx, userId)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]getMerchInternal)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
|
|
r1 = rf(ctx, userId)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockRepository_getMany_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getMany'
|
|
type MockRepository_getMany_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// getMany is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - userId int64
|
|
func (_e *MockRepository_Expecter) getMany(ctx interface{}, userId interface{}) *MockRepository_getMany_Call {
|
|
return &MockRepository_getMany_Call{Call: _e.mock.On("getMany", ctx, userId)}
|
|
}
|
|
|
|
func (_c *MockRepository_getMany_Call) Run(run func(ctx context.Context, userId int64)) *MockRepository_getMany_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getMany_Call) Return(_a0 []getMerchInternal, _a1 error) *MockRepository_getMany_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getMany_Call) RunAndReturn(run func(context.Context, int64) ([]getMerchInternal, error)) *MockRepository_getMany_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// getManyAttachedLabelsByList provides a mock function with given fields: ctx, userId, list
|
|
func (_m *MockRepository) getManyAttachedLabelsByList(ctx context.Context, userId int64, list []int64) (map[int64][]string, error) {
|
|
ret := _m.Called(ctx, userId, list)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for getManyAttachedLabelsByList")
|
|
}
|
|
|
|
var r0 map[int64][]string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, []int64) (map[int64][]string, error)); ok {
|
|
return rf(ctx, userId, list)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, []int64) map[int64][]string); ok {
|
|
r0 = rf(ctx, userId, list)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(map[int64][]string)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int64, []int64) error); ok {
|
|
r1 = rf(ctx, userId, list)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockRepository_getManyAttachedLabelsByList_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getManyAttachedLabelsByList'
|
|
type MockRepository_getManyAttachedLabelsByList_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// getManyAttachedLabelsByList is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - userId int64
|
|
// - list []int64
|
|
func (_e *MockRepository_Expecter) getManyAttachedLabelsByList(ctx interface{}, userId interface{}, list interface{}) *MockRepository_getManyAttachedLabelsByList_Call {
|
|
return &MockRepository_getManyAttachedLabelsByList_Call{Call: _e.mock.On("getManyAttachedLabelsByList", ctx, userId, list)}
|
|
}
|
|
|
|
func (_c *MockRepository_getManyAttachedLabelsByList_Call) Run(run func(ctx context.Context, userId int64, list []int64)) *MockRepository_getManyAttachedLabelsByList_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].([]int64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getManyAttachedLabelsByList_Call) Return(_a0 map[int64][]string, _a1 error) *MockRepository_getManyAttachedLabelsByList_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getManyAttachedLabelsByList_Call) RunAndReturn(run func(context.Context, int64, []int64) (map[int64][]string, error)) *MockRepository_getManyAttachedLabelsByList_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// getMerchIdByUuid provides a mock function with given fields: ctx, userId, uuid
|
|
func (_m *MockRepository) getMerchIdByUuid(ctx context.Context, userId int64, uuid string) (int64, error) {
|
|
ret := _m.Called(ctx, userId, uuid)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for getMerchIdByUuid")
|
|
}
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, string) (int64, error)); ok {
|
|
return rf(ctx, userId, uuid)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, string) int64); ok {
|
|
r0 = rf(ctx, userId, uuid)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok {
|
|
r1 = rf(ctx, userId, uuid)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockRepository_getMerchIdByUuid_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getMerchIdByUuid'
|
|
type MockRepository_getMerchIdByUuid_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// getMerchIdByUuid is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - userId int64
|
|
// - uuid string
|
|
func (_e *MockRepository_Expecter) getMerchIdByUuid(ctx interface{}, userId interface{}, uuid interface{}) *MockRepository_getMerchIdByUuid_Call {
|
|
return &MockRepository_getMerchIdByUuid_Call{Call: _e.mock.On("getMerchIdByUuid", ctx, userId, uuid)}
|
|
}
|
|
|
|
func (_c *MockRepository_getMerchIdByUuid_Call) Run(run func(ctx context.Context, userId int64, uuid string)) *MockRepository_getMerchIdByUuid_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getMerchIdByUuid_Call) Return(_a0 int64, _a1 error) *MockRepository_getMerchIdByUuid_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getMerchIdByUuid_Call) RunAndReturn(run func(context.Context, int64, string) (int64, error)) *MockRepository_getMerchIdByUuid_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// getMerchUuidMap provides a mock function with given fields: ctx, merchUuids
|
|
func (_m *MockRepository) getMerchUuidMap(ctx context.Context, merchUuids []string) (map[string]int64, error) {
|
|
ret := _m.Called(ctx, merchUuids)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for getMerchUuidMap")
|
|
}
|
|
|
|
var r0 map[string]int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string) (map[string]int64, error)); ok {
|
|
return rf(ctx, merchUuids)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string) map[string]int64); ok {
|
|
r0 = rf(ctx, merchUuids)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(map[string]int64)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok {
|
|
r1 = rf(ctx, merchUuids)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockRepository_getMerchUuidMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getMerchUuidMap'
|
|
type MockRepository_getMerchUuidMap_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// getMerchUuidMap is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - merchUuids []string
|
|
func (_e *MockRepository_Expecter) getMerchUuidMap(ctx interface{}, merchUuids interface{}) *MockRepository_getMerchUuidMap_Call {
|
|
return &MockRepository_getMerchUuidMap_Call{Call: _e.mock.On("getMerchUuidMap", ctx, merchUuids)}
|
|
}
|
|
|
|
func (_c *MockRepository_getMerchUuidMap_Call) Run(run func(ctx context.Context, merchUuids []string)) *MockRepository_getMerchUuidMap_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].([]string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getMerchUuidMap_Call) Return(_a0 map[string]int64, _a1 error) *MockRepository_getMerchUuidMap_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getMerchUuidMap_Call) RunAndReturn(run func(context.Context, []string) (map[string]int64, error)) *MockRepository_getMerchUuidMap_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// getOrigins provides a mock function with given fields: ctx
|
|
func (_m *MockRepository) getOrigins(ctx context.Context) ([]Origin, error) {
|
|
ret := _m.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for getOrigins")
|
|
}
|
|
|
|
var r0 []Origin
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context) ([]Origin, error)); ok {
|
|
return rf(ctx)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context) []Origin); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]Origin)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = rf(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockRepository_getOrigins_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getOrigins'
|
|
type MockRepository_getOrigins_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// getOrigins is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *MockRepository_Expecter) getOrigins(ctx interface{}) *MockRepository_getOrigins_Call {
|
|
return &MockRepository_getOrigins_Call{Call: _e.mock.On("getOrigins", ctx)}
|
|
}
|
|
|
|
func (_c *MockRepository_getOrigins_Call) Run(run func(ctx context.Context)) *MockRepository_getOrigins_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getOrigins_Call) Return(_a0 []Origin, _a1 error) *MockRepository_getOrigins_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getOrigins_Call) RunAndReturn(run func(context.Context) ([]Origin, error)) *MockRepository_getOrigins_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// getPricesWithDays provides a mock function with given fields: ctx, userId, days
|
|
func (_m *MockRepository) getPricesWithDays(ctx context.Context, userId int64, days time.Time) ([]Price, error) {
|
|
ret := _m.Called(ctx, userId, days)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for getPricesWithDays")
|
|
}
|
|
|
|
var r0 []Price
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, time.Time) ([]Price, error)); ok {
|
|
return rf(ctx, userId, days)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, time.Time) []Price); ok {
|
|
r0 = rf(ctx, userId, days)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]Price)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int64, time.Time) error); ok {
|
|
r1 = rf(ctx, userId, days)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockRepository_getPricesWithDays_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getPricesWithDays'
|
|
type MockRepository_getPricesWithDays_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// getPricesWithDays is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - userId int64
|
|
// - days time.Time
|
|
func (_e *MockRepository_Expecter) getPricesWithDays(ctx interface{}, userId interface{}, days interface{}) *MockRepository_getPricesWithDays_Call {
|
|
return &MockRepository_getPricesWithDays_Call{Call: _e.mock.On("getPricesWithDays", ctx, userId, days)}
|
|
}
|
|
|
|
func (_c *MockRepository_getPricesWithDays_Call) Run(run func(ctx context.Context, userId int64, days time.Time)) *MockRepository_getPricesWithDays_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(time.Time))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getPricesWithDays_Call) Return(_a0 []Price, _a1 error) *MockRepository_getPricesWithDays_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getPricesWithDays_Call) RunAndReturn(run func(context.Context, int64, time.Time) ([]Price, error)) *MockRepository_getPricesWithDays_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// getTaskData provides a mock function with given fields: ctx
|
|
func (_m *MockRepository) getTaskData(ctx context.Context) ([]taskData, error) {
|
|
ret := _m.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for getTaskData")
|
|
}
|
|
|
|
var r0 []taskData
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context) ([]taskData, error)); ok {
|
|
return rf(ctx)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context) []taskData); ok {
|
|
r0 = rf(ctx)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]taskData)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
|
r1 = rf(ctx)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockRepository_getTaskData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getTaskData'
|
|
type MockRepository_getTaskData_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// getTaskData is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
func (_e *MockRepository_Expecter) getTaskData(ctx interface{}) *MockRepository_getTaskData_Call {
|
|
return &MockRepository_getTaskData_Call{Call: _e.mock.On("getTaskData", ctx)}
|
|
}
|
|
|
|
func (_c *MockRepository_getTaskData_Call) Run(run func(ctx context.Context)) *MockRepository_getTaskData_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getTaskData_Call) Return(_a0 []taskData, _a1 error) *MockRepository_getTaskData_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getTaskData_Call) RunAndReturn(run func(context.Context) ([]taskData, error)) *MockRepository_getTaskData_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// getZeroPrices provides a mock function with given fields: ctx, userId
|
|
func (_m *MockRepository) getZeroPrices(ctx context.Context, userId int64) ([]ZeroPrice, error) {
|
|
ret := _m.Called(ctx, userId)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for getZeroPrices")
|
|
}
|
|
|
|
var r0 []ZeroPrice
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]ZeroPrice, error)); ok {
|
|
return rf(ctx, userId)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64) []ZeroPrice); ok {
|
|
r0 = rf(ctx, userId)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]ZeroPrice)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
|
|
r1 = rf(ctx, userId)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockRepository_getZeroPrices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getZeroPrices'
|
|
type MockRepository_getZeroPrices_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// getZeroPrices is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - userId int64
|
|
func (_e *MockRepository_Expecter) getZeroPrices(ctx interface{}, userId interface{}) *MockRepository_getZeroPrices_Call {
|
|
return &MockRepository_getZeroPrices_Call{Call: _e.mock.On("getZeroPrices", ctx, userId)}
|
|
}
|
|
|
|
func (_c *MockRepository_getZeroPrices_Call) Run(run func(ctx context.Context, userId int64)) *MockRepository_getZeroPrices_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getZeroPrices_Call) Return(_a0 []ZeroPrice, _a1 error) *MockRepository_getZeroPrices_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_getZeroPrices_Call) RunAndReturn(run func(context.Context, int64) ([]ZeroPrice, error)) *MockRepository_getZeroPrices_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// insertPrices provides a mock function with given fields: ctx, prices
|
|
func (_m *MockRepository) insertPrices(ctx context.Context, prices []Price) error {
|
|
ret := _m.Called(ctx, prices)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for insertPrices")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, []Price) error); ok {
|
|
r0 = rf(ctx, prices)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockRepository_insertPrices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'insertPrices'
|
|
type MockRepository_insertPrices_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// insertPrices is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - prices []Price
|
|
func (_e *MockRepository_Expecter) insertPrices(ctx interface{}, prices interface{}) *MockRepository_insertPrices_Call {
|
|
return &MockRepository_insertPrices_Call{Call: _e.mock.On("insertPrices", ctx, prices)}
|
|
}
|
|
|
|
func (_c *MockRepository_insertPrices_Call) Run(run func(ctx context.Context, prices []Price)) *MockRepository_insertPrices_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].([]Price))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_insertPrices_Call) Return(_a0 error) *MockRepository_insertPrices_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_insertPrices_Call) RunAndReturn(run func(context.Context, []Price) error) *MockRepository_insertPrices_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// updateExtraData provides a mock function with given fields: ctx, merchId, insertData
|
|
func (_m *MockRepository) updateExtraData(ctx context.Context, merchId int64, insertData []ExtraData) ([]ExtraData, error) {
|
|
ret := _m.Called(ctx, merchId, insertData)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for updateExtraData")
|
|
}
|
|
|
|
var r0 []ExtraData
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, []ExtraData) ([]ExtraData, error)); ok {
|
|
return rf(ctx, merchId, insertData)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, []ExtraData) []ExtraData); ok {
|
|
r0 = rf(ctx, merchId, insertData)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]ExtraData)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int64, []ExtraData) error); ok {
|
|
r1 = rf(ctx, merchId, insertData)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockRepository_updateExtraData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'updateExtraData'
|
|
type MockRepository_updateExtraData_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// updateExtraData is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - merchId int64
|
|
// - insertData []ExtraData
|
|
func (_e *MockRepository_Expecter) updateExtraData(ctx interface{}, merchId interface{}, insertData interface{}) *MockRepository_updateExtraData_Call {
|
|
return &MockRepository_updateExtraData_Call{Call: _e.mock.On("updateExtraData", ctx, merchId, insertData)}
|
|
}
|
|
|
|
func (_c *MockRepository_updateExtraData_Call) Run(run func(ctx context.Context, merchId int64, insertData []ExtraData)) *MockRepository_updateExtraData_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].([]ExtraData))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_updateExtraData_Call) Return(_a0 []ExtraData, _a1 error) *MockRepository_updateExtraData_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_updateExtraData_Call) RunAndReturn(run func(context.Context, int64, []ExtraData) ([]ExtraData, error)) *MockRepository_updateExtraData_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// updateLabel provides a mock function with given fields: ctx, userId, label
|
|
func (_m *MockRepository) updateLabel(ctx context.Context, userId int64, label *Label) error {
|
|
ret := _m.Called(ctx, userId, label)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for updateLabel")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, *Label) error); ok {
|
|
r0 = rf(ctx, userId, label)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockRepository_updateLabel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'updateLabel'
|
|
type MockRepository_updateLabel_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// updateLabel is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - userId int64
|
|
// - label *Label
|
|
func (_e *MockRepository_Expecter) updateLabel(ctx interface{}, userId interface{}, label interface{}) *MockRepository_updateLabel_Call {
|
|
return &MockRepository_updateLabel_Call{Call: _e.mock.On("updateLabel", ctx, userId, label)}
|
|
}
|
|
|
|
func (_c *MockRepository_updateLabel_Call) Run(run func(ctx context.Context, userId int64, label *Label)) *MockRepository_updateLabel_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(*Label))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_updateLabel_Call) Return(_a0 error) *MockRepository_updateLabel_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_updateLabel_Call) RunAndReturn(run func(context.Context, int64, *Label) error) *MockRepository_updateLabel_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// updateMerch provides a mock function with given fields: ctx, userId, merch
|
|
func (_m *MockRepository) updateMerch(ctx context.Context, userId int64, merch *updateMerchDTO) (*merchDTO, error) {
|
|
ret := _m.Called(ctx, userId, merch)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for updateMerch")
|
|
}
|
|
|
|
var r0 *merchDTO
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, *updateMerchDTO) (*merchDTO, error)); ok {
|
|
return rf(ctx, userId, merch)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, *updateMerchDTO) *merchDTO); ok {
|
|
r0 = rf(ctx, userId, merch)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*merchDTO)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int64, *updateMerchDTO) error); ok {
|
|
r1 = rf(ctx, userId, merch)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockRepository_updateMerch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'updateMerch'
|
|
type MockRepository_updateMerch_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// updateMerch is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - userId int64
|
|
// - merch *updateMerchDTO
|
|
func (_e *MockRepository_Expecter) updateMerch(ctx interface{}, userId interface{}, merch interface{}) *MockRepository_updateMerch_Call {
|
|
return &MockRepository_updateMerch_Call{Call: _e.mock.On("updateMerch", ctx, userId, merch)}
|
|
}
|
|
|
|
func (_c *MockRepository_updateMerch_Call) Run(run func(ctx context.Context, userId int64, merch *updateMerchDTO)) *MockRepository_updateMerch_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(*updateMerchDTO))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_updateMerch_Call) Return(_a0 *merchDTO, _a1 error) *MockRepository_updateMerch_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockRepository_updateMerch_Call) RunAndReturn(run func(context.Context, int64, *updateMerchDTO) (*merchDTO, error)) *MockRepository_updateMerch_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewMockRepository creates a new instance of MockRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewMockRepository(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *MockRepository {
|
|
mock := &MockRepository{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|