mirror of
https://github.com/absmach/supermq.git
synced 2026-06-23 04:20:17 +00:00
7bdf4c681e
* NOISSUE - Update dependencies Signed-off-by: dusan <borovcanindusan1@gmail.com> * Update go.mod Signed-off-by: dusan <borovcanindusan1@gmail.com> --------- Signed-off-by: dusan <borovcanindusan1@gmail.com>
774 lines
24 KiB
Go
774 lines
24 KiB
Go
// Copyright (c) Abstract Machines
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// Code generated by mockery; DO NOT EDIT.
|
|
// github.com/vektra/mockery
|
|
// template: testify
|
|
|
|
package mocks
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"github.com/absmach/magistrala/reports"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// NewRepository creates a new instance of Repository. 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 NewRepository(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *Repository {
|
|
mock := &Repository{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// Repository is an autogenerated mock type for the Repository type
|
|
type Repository struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type Repository_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *Repository) EXPECT() *Repository_Expecter {
|
|
return &Repository_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// AddReportConfig provides a mock function for the type Repository
|
|
func (_mock *Repository) AddReportConfig(ctx context.Context, cfg reports.ReportConfig) (reports.ReportConfig, error) {
|
|
ret := _mock.Called(ctx, cfg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for AddReportConfig")
|
|
}
|
|
|
|
var r0 reports.ReportConfig
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, reports.ReportConfig) (reports.ReportConfig, error)); ok {
|
|
return returnFunc(ctx, cfg)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, reports.ReportConfig) reports.ReportConfig); ok {
|
|
r0 = returnFunc(ctx, cfg)
|
|
} else {
|
|
r0 = ret.Get(0).(reports.ReportConfig)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, reports.ReportConfig) error); ok {
|
|
r1 = returnFunc(ctx, cfg)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Repository_AddReportConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddReportConfig'
|
|
type Repository_AddReportConfig_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// AddReportConfig is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - cfg reports.ReportConfig
|
|
func (_e *Repository_Expecter) AddReportConfig(ctx interface{}, cfg interface{}) *Repository_AddReportConfig_Call {
|
|
return &Repository_AddReportConfig_Call{Call: _e.mock.On("AddReportConfig", ctx, cfg)}
|
|
}
|
|
|
|
func (_c *Repository_AddReportConfig_Call) Run(run func(ctx context.Context, cfg reports.ReportConfig)) *Repository_AddReportConfig_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 reports.ReportConfig
|
|
if args[1] != nil {
|
|
arg1 = args[1].(reports.ReportConfig)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_AddReportConfig_Call) Return(reportConfig reports.ReportConfig, err error) *Repository_AddReportConfig_Call {
|
|
_c.Call.Return(reportConfig, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_AddReportConfig_Call) RunAndReturn(run func(ctx context.Context, cfg reports.ReportConfig) (reports.ReportConfig, error)) *Repository_AddReportConfig_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeleteReportTemplate provides a mock function for the type Repository
|
|
func (_mock *Repository) DeleteReportTemplate(ctx context.Context, domainID string, reportID string) error {
|
|
ret := _mock.Called(ctx, domainID, reportID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DeleteReportTemplate")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
|
|
r0 = returnFunc(ctx, domainID, reportID)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Repository_DeleteReportTemplate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteReportTemplate'
|
|
type Repository_DeleteReportTemplate_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeleteReportTemplate is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - domainID string
|
|
// - reportID string
|
|
func (_e *Repository_Expecter) DeleteReportTemplate(ctx interface{}, domainID interface{}, reportID interface{}) *Repository_DeleteReportTemplate_Call {
|
|
return &Repository_DeleteReportTemplate_Call{Call: _e.mock.On("DeleteReportTemplate", ctx, domainID, reportID)}
|
|
}
|
|
|
|
func (_c *Repository_DeleteReportTemplate_Call) Run(run func(ctx context.Context, domainID string, reportID string)) *Repository_DeleteReportTemplate_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_DeleteReportTemplate_Call) Return(err error) *Repository_DeleteReportTemplate_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_DeleteReportTemplate_Call) RunAndReturn(run func(ctx context.Context, domainID string, reportID string) error) *Repository_DeleteReportTemplate_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListReportsConfig provides a mock function for the type Repository
|
|
func (_mock *Repository) ListReportsConfig(ctx context.Context, pm reports.PageMeta) (reports.ReportConfigPage, error) {
|
|
ret := _mock.Called(ctx, pm)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListReportsConfig")
|
|
}
|
|
|
|
var r0 reports.ReportConfigPage
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, reports.PageMeta) (reports.ReportConfigPage, error)); ok {
|
|
return returnFunc(ctx, pm)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, reports.PageMeta) reports.ReportConfigPage); ok {
|
|
r0 = returnFunc(ctx, pm)
|
|
} else {
|
|
r0 = ret.Get(0).(reports.ReportConfigPage)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, reports.PageMeta) error); ok {
|
|
r1 = returnFunc(ctx, pm)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Repository_ListReportsConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListReportsConfig'
|
|
type Repository_ListReportsConfig_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListReportsConfig is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - pm reports.PageMeta
|
|
func (_e *Repository_Expecter) ListReportsConfig(ctx interface{}, pm interface{}) *Repository_ListReportsConfig_Call {
|
|
return &Repository_ListReportsConfig_Call{Call: _e.mock.On("ListReportsConfig", ctx, pm)}
|
|
}
|
|
|
|
func (_c *Repository_ListReportsConfig_Call) Run(run func(ctx context.Context, pm reports.PageMeta)) *Repository_ListReportsConfig_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 reports.PageMeta
|
|
if args[1] != nil {
|
|
arg1 = args[1].(reports.PageMeta)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_ListReportsConfig_Call) Return(reportConfigPage reports.ReportConfigPage, err error) *Repository_ListReportsConfig_Call {
|
|
_c.Call.Return(reportConfigPage, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_ListReportsConfig_Call) RunAndReturn(run func(ctx context.Context, pm reports.PageMeta) (reports.ReportConfigPage, error)) *Repository_ListReportsConfig_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// RemoveReportConfig provides a mock function for the type Repository
|
|
func (_mock *Repository) RemoveReportConfig(ctx context.Context, id string) error {
|
|
ret := _mock.Called(ctx, id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RemoveReportConfig")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
|
r0 = returnFunc(ctx, id)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Repository_RemoveReportConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveReportConfig'
|
|
type Repository_RemoveReportConfig_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// RemoveReportConfig is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id string
|
|
func (_e *Repository_Expecter) RemoveReportConfig(ctx interface{}, id interface{}) *Repository_RemoveReportConfig_Call {
|
|
return &Repository_RemoveReportConfig_Call{Call: _e.mock.On("RemoveReportConfig", ctx, id)}
|
|
}
|
|
|
|
func (_c *Repository_RemoveReportConfig_Call) Run(run func(ctx context.Context, id string)) *Repository_RemoveReportConfig_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_RemoveReportConfig_Call) Return(err error) *Repository_RemoveReportConfig_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_RemoveReportConfig_Call) RunAndReturn(run func(ctx context.Context, id string) error) *Repository_RemoveReportConfig_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateReportConfig provides a mock function for the type Repository
|
|
func (_mock *Repository) UpdateReportConfig(ctx context.Context, cfg reports.ReportConfig) (reports.ReportConfig, error) {
|
|
ret := _mock.Called(ctx, cfg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateReportConfig")
|
|
}
|
|
|
|
var r0 reports.ReportConfig
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, reports.ReportConfig) (reports.ReportConfig, error)); ok {
|
|
return returnFunc(ctx, cfg)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, reports.ReportConfig) reports.ReportConfig); ok {
|
|
r0 = returnFunc(ctx, cfg)
|
|
} else {
|
|
r0 = ret.Get(0).(reports.ReportConfig)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, reports.ReportConfig) error); ok {
|
|
r1 = returnFunc(ctx, cfg)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Repository_UpdateReportConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateReportConfig'
|
|
type Repository_UpdateReportConfig_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateReportConfig is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - cfg reports.ReportConfig
|
|
func (_e *Repository_Expecter) UpdateReportConfig(ctx interface{}, cfg interface{}) *Repository_UpdateReportConfig_Call {
|
|
return &Repository_UpdateReportConfig_Call{Call: _e.mock.On("UpdateReportConfig", ctx, cfg)}
|
|
}
|
|
|
|
func (_c *Repository_UpdateReportConfig_Call) Run(run func(ctx context.Context, cfg reports.ReportConfig)) *Repository_UpdateReportConfig_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 reports.ReportConfig
|
|
if args[1] != nil {
|
|
arg1 = args[1].(reports.ReportConfig)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_UpdateReportConfig_Call) Return(reportConfig reports.ReportConfig, err error) *Repository_UpdateReportConfig_Call {
|
|
_c.Call.Return(reportConfig, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_UpdateReportConfig_Call) RunAndReturn(run func(ctx context.Context, cfg reports.ReportConfig) (reports.ReportConfig, error)) *Repository_UpdateReportConfig_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateReportConfigStatus provides a mock function for the type Repository
|
|
func (_mock *Repository) UpdateReportConfigStatus(ctx context.Context, cfg reports.ReportConfig) (reports.ReportConfig, error) {
|
|
ret := _mock.Called(ctx, cfg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateReportConfigStatus")
|
|
}
|
|
|
|
var r0 reports.ReportConfig
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, reports.ReportConfig) (reports.ReportConfig, error)); ok {
|
|
return returnFunc(ctx, cfg)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, reports.ReportConfig) reports.ReportConfig); ok {
|
|
r0 = returnFunc(ctx, cfg)
|
|
} else {
|
|
r0 = ret.Get(0).(reports.ReportConfig)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, reports.ReportConfig) error); ok {
|
|
r1 = returnFunc(ctx, cfg)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Repository_UpdateReportConfigStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateReportConfigStatus'
|
|
type Repository_UpdateReportConfigStatus_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateReportConfigStatus is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - cfg reports.ReportConfig
|
|
func (_e *Repository_Expecter) UpdateReportConfigStatus(ctx interface{}, cfg interface{}) *Repository_UpdateReportConfigStatus_Call {
|
|
return &Repository_UpdateReportConfigStatus_Call{Call: _e.mock.On("UpdateReportConfigStatus", ctx, cfg)}
|
|
}
|
|
|
|
func (_c *Repository_UpdateReportConfigStatus_Call) Run(run func(ctx context.Context, cfg reports.ReportConfig)) *Repository_UpdateReportConfigStatus_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 reports.ReportConfig
|
|
if args[1] != nil {
|
|
arg1 = args[1].(reports.ReportConfig)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_UpdateReportConfigStatus_Call) Return(reportConfig reports.ReportConfig, err error) *Repository_UpdateReportConfigStatus_Call {
|
|
_c.Call.Return(reportConfig, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_UpdateReportConfigStatus_Call) RunAndReturn(run func(ctx context.Context, cfg reports.ReportConfig) (reports.ReportConfig, error)) *Repository_UpdateReportConfigStatus_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateReportDue provides a mock function for the type Repository
|
|
func (_mock *Repository) UpdateReportDue(ctx context.Context, id string, due time.Time) (reports.ReportConfig, error) {
|
|
ret := _mock.Called(ctx, id, due)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateReportDue")
|
|
}
|
|
|
|
var r0 reports.ReportConfig
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, time.Time) (reports.ReportConfig, error)); ok {
|
|
return returnFunc(ctx, id, due)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, time.Time) reports.ReportConfig); ok {
|
|
r0 = returnFunc(ctx, id, due)
|
|
} else {
|
|
r0 = ret.Get(0).(reports.ReportConfig)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, time.Time) error); ok {
|
|
r1 = returnFunc(ctx, id, due)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Repository_UpdateReportDue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateReportDue'
|
|
type Repository_UpdateReportDue_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateReportDue is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id string
|
|
// - due time.Time
|
|
func (_e *Repository_Expecter) UpdateReportDue(ctx interface{}, id interface{}, due interface{}) *Repository_UpdateReportDue_Call {
|
|
return &Repository_UpdateReportDue_Call{Call: _e.mock.On("UpdateReportDue", ctx, id, due)}
|
|
}
|
|
|
|
func (_c *Repository_UpdateReportDue_Call) Run(run func(ctx context.Context, id string, due time.Time)) *Repository_UpdateReportDue_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 time.Time
|
|
if args[2] != nil {
|
|
arg2 = args[2].(time.Time)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_UpdateReportDue_Call) Return(reportConfig reports.ReportConfig, err error) *Repository_UpdateReportDue_Call {
|
|
_c.Call.Return(reportConfig, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_UpdateReportDue_Call) RunAndReturn(run func(ctx context.Context, id string, due time.Time) (reports.ReportConfig, error)) *Repository_UpdateReportDue_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateReportSchedule provides a mock function for the type Repository
|
|
func (_mock *Repository) UpdateReportSchedule(ctx context.Context, cfg reports.ReportConfig) (reports.ReportConfig, error) {
|
|
ret := _mock.Called(ctx, cfg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateReportSchedule")
|
|
}
|
|
|
|
var r0 reports.ReportConfig
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, reports.ReportConfig) (reports.ReportConfig, error)); ok {
|
|
return returnFunc(ctx, cfg)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, reports.ReportConfig) reports.ReportConfig); ok {
|
|
r0 = returnFunc(ctx, cfg)
|
|
} else {
|
|
r0 = ret.Get(0).(reports.ReportConfig)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, reports.ReportConfig) error); ok {
|
|
r1 = returnFunc(ctx, cfg)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Repository_UpdateReportSchedule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateReportSchedule'
|
|
type Repository_UpdateReportSchedule_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateReportSchedule is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - cfg reports.ReportConfig
|
|
func (_e *Repository_Expecter) UpdateReportSchedule(ctx interface{}, cfg interface{}) *Repository_UpdateReportSchedule_Call {
|
|
return &Repository_UpdateReportSchedule_Call{Call: _e.mock.On("UpdateReportSchedule", ctx, cfg)}
|
|
}
|
|
|
|
func (_c *Repository_UpdateReportSchedule_Call) Run(run func(ctx context.Context, cfg reports.ReportConfig)) *Repository_UpdateReportSchedule_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 reports.ReportConfig
|
|
if args[1] != nil {
|
|
arg1 = args[1].(reports.ReportConfig)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_UpdateReportSchedule_Call) Return(reportConfig reports.ReportConfig, err error) *Repository_UpdateReportSchedule_Call {
|
|
_c.Call.Return(reportConfig, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_UpdateReportSchedule_Call) RunAndReturn(run func(ctx context.Context, cfg reports.ReportConfig) (reports.ReportConfig, error)) *Repository_UpdateReportSchedule_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateReportTemplate provides a mock function for the type Repository
|
|
func (_mock *Repository) UpdateReportTemplate(ctx context.Context, domainID string, reportID string, template reports.ReportTemplate) error {
|
|
ret := _mock.Called(ctx, domainID, reportID, template)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateReportTemplate")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, reports.ReportTemplate) error); ok {
|
|
r0 = returnFunc(ctx, domainID, reportID, template)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Repository_UpdateReportTemplate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateReportTemplate'
|
|
type Repository_UpdateReportTemplate_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateReportTemplate is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - domainID string
|
|
// - reportID string
|
|
// - template reports.ReportTemplate
|
|
func (_e *Repository_Expecter) UpdateReportTemplate(ctx interface{}, domainID interface{}, reportID interface{}, template interface{}) *Repository_UpdateReportTemplate_Call {
|
|
return &Repository_UpdateReportTemplate_Call{Call: _e.mock.On("UpdateReportTemplate", ctx, domainID, reportID, template)}
|
|
}
|
|
|
|
func (_c *Repository_UpdateReportTemplate_Call) Run(run func(ctx context.Context, domainID string, reportID string, template reports.ReportTemplate)) *Repository_UpdateReportTemplate_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
var arg3 reports.ReportTemplate
|
|
if args[3] != nil {
|
|
arg3 = args[3].(reports.ReportTemplate)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
arg3,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_UpdateReportTemplate_Call) Return(err error) *Repository_UpdateReportTemplate_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_UpdateReportTemplate_Call) RunAndReturn(run func(ctx context.Context, domainID string, reportID string, template reports.ReportTemplate) error) *Repository_UpdateReportTemplate_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ViewReportConfig provides a mock function for the type Repository
|
|
func (_mock *Repository) ViewReportConfig(ctx context.Context, id string) (reports.ReportConfig, error) {
|
|
ret := _mock.Called(ctx, id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ViewReportConfig")
|
|
}
|
|
|
|
var r0 reports.ReportConfig
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) (reports.ReportConfig, error)); ok {
|
|
return returnFunc(ctx, id)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) reports.ReportConfig); ok {
|
|
r0 = returnFunc(ctx, id)
|
|
} else {
|
|
r0 = ret.Get(0).(reports.ReportConfig)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = returnFunc(ctx, id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Repository_ViewReportConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ViewReportConfig'
|
|
type Repository_ViewReportConfig_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ViewReportConfig is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id string
|
|
func (_e *Repository_Expecter) ViewReportConfig(ctx interface{}, id interface{}) *Repository_ViewReportConfig_Call {
|
|
return &Repository_ViewReportConfig_Call{Call: _e.mock.On("ViewReportConfig", ctx, id)}
|
|
}
|
|
|
|
func (_c *Repository_ViewReportConfig_Call) Run(run func(ctx context.Context, id string)) *Repository_ViewReportConfig_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_ViewReportConfig_Call) Return(reportConfig reports.ReportConfig, err error) *Repository_ViewReportConfig_Call {
|
|
_c.Call.Return(reportConfig, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_ViewReportConfig_Call) RunAndReturn(run func(ctx context.Context, id string) (reports.ReportConfig, error)) *Repository_ViewReportConfig_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ViewReportTemplate provides a mock function for the type Repository
|
|
func (_mock *Repository) ViewReportTemplate(ctx context.Context, domainID string, reportID string) (reports.ReportTemplate, error) {
|
|
ret := _mock.Called(ctx, domainID, reportID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ViewReportTemplate")
|
|
}
|
|
|
|
var r0 reports.ReportTemplate
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (reports.ReportTemplate, error)); ok {
|
|
return returnFunc(ctx, domainID, reportID)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) reports.ReportTemplate); ok {
|
|
r0 = returnFunc(ctx, domainID, reportID)
|
|
} else {
|
|
r0 = ret.Get(0).(reports.ReportTemplate)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
|
r1 = returnFunc(ctx, domainID, reportID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Repository_ViewReportTemplate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ViewReportTemplate'
|
|
type Repository_ViewReportTemplate_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ViewReportTemplate is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - domainID string
|
|
// - reportID string
|
|
func (_e *Repository_Expecter) ViewReportTemplate(ctx interface{}, domainID interface{}, reportID interface{}) *Repository_ViewReportTemplate_Call {
|
|
return &Repository_ViewReportTemplate_Call{Call: _e.mock.On("ViewReportTemplate", ctx, domainID, reportID)}
|
|
}
|
|
|
|
func (_c *Repository_ViewReportTemplate_Call) Run(run func(ctx context.Context, domainID string, reportID string)) *Repository_ViewReportTemplate_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 context.Context
|
|
if args[0] != nil {
|
|
arg0 = args[0].(context.Context)
|
|
}
|
|
var arg1 string
|
|
if args[1] != nil {
|
|
arg1 = args[1].(string)
|
|
}
|
|
var arg2 string
|
|
if args[2] != nil {
|
|
arg2 = args[2].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
arg1,
|
|
arg2,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_ViewReportTemplate_Call) Return(reportTemplate reports.ReportTemplate, err error) *Repository_ViewReportTemplate_Call {
|
|
_c.Call.Return(reportTemplate, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Repository_ViewReportTemplate_Call) RunAndReturn(run func(ctx context.Context, domainID string, reportID string) (reports.ReportTemplate, error)) *Repository_ViewReportTemplate_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|