mirror of
https://github.com/absmach/supermq.git
synced 2026-06-23 07:30:25 +00:00
dcd5ff914d
* initial implementation Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * initial implementation Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * add remove report from nats handler Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * add license header Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * fix failing linter Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * remove unused code Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * update docker compose Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * address comments Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * fix failing linter Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * move runinfo to pkg Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * update report handler Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * update reports handler Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * update handler in reports Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * update repo method from time to due Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * fix validation methods Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * address comments Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * update reports port to 9017 Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * update nginx to support reports Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * fix reports location in nginx Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * update env variable Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> --------- Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
585 lines
21 KiB
Go
585 lines
21 KiB
Go
// Code generated by mockery; DO NOT EDIT.
|
|
// github.com/vektra/mockery
|
|
// template: testify
|
|
// Copyright (c) Abstract Machines
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package mocks
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/absmach/magistrala/reports"
|
|
"github.com/absmach/supermq/pkg/authn"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// NewService creates a new instance of Service. 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 NewService(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *Service {
|
|
mock := &Service{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// Service is an autogenerated mock type for the Service type
|
|
type Service struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type Service_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *Service) EXPECT() *Service_Expecter {
|
|
return &Service_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// AddReportConfig provides a mock function for the type Service
|
|
func (_mock *Service) AddReportConfig(ctx context.Context, session authn.Session, cfg reports.ReportConfig) (reports.ReportConfig, error) {
|
|
ret := _mock.Called(ctx, session, 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, authn.Session, reports.ReportConfig) (reports.ReportConfig, error)); ok {
|
|
return returnFunc(ctx, session, cfg)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, reports.ReportConfig) reports.ReportConfig); ok {
|
|
r0 = returnFunc(ctx, session, cfg)
|
|
} else {
|
|
r0 = ret.Get(0).(reports.ReportConfig)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, reports.ReportConfig) error); ok {
|
|
r1 = returnFunc(ctx, session, cfg)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Service_AddReportConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddReportConfig'
|
|
type Service_AddReportConfig_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// AddReportConfig is a helper method to define mock.On call
|
|
// - ctx
|
|
// - session
|
|
// - cfg
|
|
func (_e *Service_Expecter) AddReportConfig(ctx interface{}, session interface{}, cfg interface{}) *Service_AddReportConfig_Call {
|
|
return &Service_AddReportConfig_Call{Call: _e.mock.On("AddReportConfig", ctx, session, cfg)}
|
|
}
|
|
|
|
func (_c *Service_AddReportConfig_Call) Run(run func(ctx context.Context, session authn.Session, cfg reports.ReportConfig)) *Service_AddReportConfig_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(authn.Session), args[2].(reports.ReportConfig))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_AddReportConfig_Call) Return(reportConfig reports.ReportConfig, err error) *Service_AddReportConfig_Call {
|
|
_c.Call.Return(reportConfig, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_AddReportConfig_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, cfg reports.ReportConfig) (reports.ReportConfig, error)) *Service_AddReportConfig_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DisableReportConfig provides a mock function for the type Service
|
|
func (_mock *Service) DisableReportConfig(ctx context.Context, session authn.Session, id string) (reports.ReportConfig, error) {
|
|
ret := _mock.Called(ctx, session, id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DisableReportConfig")
|
|
}
|
|
|
|
var r0 reports.ReportConfig
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) (reports.ReportConfig, error)); ok {
|
|
return returnFunc(ctx, session, id)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) reports.ReportConfig); ok {
|
|
r0 = returnFunc(ctx, session, id)
|
|
} else {
|
|
r0 = ret.Get(0).(reports.ReportConfig)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, string) error); ok {
|
|
r1 = returnFunc(ctx, session, id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Service_DisableReportConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisableReportConfig'
|
|
type Service_DisableReportConfig_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DisableReportConfig is a helper method to define mock.On call
|
|
// - ctx
|
|
// - session
|
|
// - id
|
|
func (_e *Service_Expecter) DisableReportConfig(ctx interface{}, session interface{}, id interface{}) *Service_DisableReportConfig_Call {
|
|
return &Service_DisableReportConfig_Call{Call: _e.mock.On("DisableReportConfig", ctx, session, id)}
|
|
}
|
|
|
|
func (_c *Service_DisableReportConfig_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_DisableReportConfig_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(authn.Session), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_DisableReportConfig_Call) Return(reportConfig reports.ReportConfig, err error) *Service_DisableReportConfig_Call {
|
|
_c.Call.Return(reportConfig, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_DisableReportConfig_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, id string) (reports.ReportConfig, error)) *Service_DisableReportConfig_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// EnableReportConfig provides a mock function for the type Service
|
|
func (_mock *Service) EnableReportConfig(ctx context.Context, session authn.Session, id string) (reports.ReportConfig, error) {
|
|
ret := _mock.Called(ctx, session, id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for EnableReportConfig")
|
|
}
|
|
|
|
var r0 reports.ReportConfig
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) (reports.ReportConfig, error)); ok {
|
|
return returnFunc(ctx, session, id)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) reports.ReportConfig); ok {
|
|
r0 = returnFunc(ctx, session, id)
|
|
} else {
|
|
r0 = ret.Get(0).(reports.ReportConfig)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, string) error); ok {
|
|
r1 = returnFunc(ctx, session, id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Service_EnableReportConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnableReportConfig'
|
|
type Service_EnableReportConfig_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// EnableReportConfig is a helper method to define mock.On call
|
|
// - ctx
|
|
// - session
|
|
// - id
|
|
func (_e *Service_Expecter) EnableReportConfig(ctx interface{}, session interface{}, id interface{}) *Service_EnableReportConfig_Call {
|
|
return &Service_EnableReportConfig_Call{Call: _e.mock.On("EnableReportConfig", ctx, session, id)}
|
|
}
|
|
|
|
func (_c *Service_EnableReportConfig_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_EnableReportConfig_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(authn.Session), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_EnableReportConfig_Call) Return(reportConfig reports.ReportConfig, err error) *Service_EnableReportConfig_Call {
|
|
_c.Call.Return(reportConfig, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_EnableReportConfig_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, id string) (reports.ReportConfig, error)) *Service_EnableReportConfig_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GenerateReport provides a mock function for the type Service
|
|
func (_mock *Service) GenerateReport(ctx context.Context, session authn.Session, config reports.ReportConfig, action reports.ReportAction) (reports.ReportPage, error) {
|
|
ret := _mock.Called(ctx, session, config, action)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GenerateReport")
|
|
}
|
|
|
|
var r0 reports.ReportPage
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, reports.ReportConfig, reports.ReportAction) (reports.ReportPage, error)); ok {
|
|
return returnFunc(ctx, session, config, action)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, reports.ReportConfig, reports.ReportAction) reports.ReportPage); ok {
|
|
r0 = returnFunc(ctx, session, config, action)
|
|
} else {
|
|
r0 = ret.Get(0).(reports.ReportPage)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, reports.ReportConfig, reports.ReportAction) error); ok {
|
|
r1 = returnFunc(ctx, session, config, action)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Service_GenerateReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateReport'
|
|
type Service_GenerateReport_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GenerateReport is a helper method to define mock.On call
|
|
// - ctx
|
|
// - session
|
|
// - config
|
|
// - action
|
|
func (_e *Service_Expecter) GenerateReport(ctx interface{}, session interface{}, config interface{}, action interface{}) *Service_GenerateReport_Call {
|
|
return &Service_GenerateReport_Call{Call: _e.mock.On("GenerateReport", ctx, session, config, action)}
|
|
}
|
|
|
|
func (_c *Service_GenerateReport_Call) Run(run func(ctx context.Context, session authn.Session, config reports.ReportConfig, action reports.ReportAction)) *Service_GenerateReport_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(authn.Session), args[2].(reports.ReportConfig), args[3].(reports.ReportAction))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_GenerateReport_Call) Return(reportPage reports.ReportPage, err error) *Service_GenerateReport_Call {
|
|
_c.Call.Return(reportPage, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_GenerateReport_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, config reports.ReportConfig, action reports.ReportAction) (reports.ReportPage, error)) *Service_GenerateReport_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListReportsConfig provides a mock function for the type Service
|
|
func (_mock *Service) ListReportsConfig(ctx context.Context, session authn.Session, pm reports.PageMeta) (reports.ReportConfigPage, error) {
|
|
ret := _mock.Called(ctx, session, 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, authn.Session, reports.PageMeta) (reports.ReportConfigPage, error)); ok {
|
|
return returnFunc(ctx, session, pm)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, reports.PageMeta) reports.ReportConfigPage); ok {
|
|
r0 = returnFunc(ctx, session, pm)
|
|
} else {
|
|
r0 = ret.Get(0).(reports.ReportConfigPage)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, reports.PageMeta) error); ok {
|
|
r1 = returnFunc(ctx, session, pm)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Service_ListReportsConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListReportsConfig'
|
|
type Service_ListReportsConfig_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListReportsConfig is a helper method to define mock.On call
|
|
// - ctx
|
|
// - session
|
|
// - pm
|
|
func (_e *Service_Expecter) ListReportsConfig(ctx interface{}, session interface{}, pm interface{}) *Service_ListReportsConfig_Call {
|
|
return &Service_ListReportsConfig_Call{Call: _e.mock.On("ListReportsConfig", ctx, session, pm)}
|
|
}
|
|
|
|
func (_c *Service_ListReportsConfig_Call) Run(run func(ctx context.Context, session authn.Session, pm reports.PageMeta)) *Service_ListReportsConfig_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(authn.Session), args[2].(reports.PageMeta))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_ListReportsConfig_Call) Return(reportConfigPage reports.ReportConfigPage, err error) *Service_ListReportsConfig_Call {
|
|
_c.Call.Return(reportConfigPage, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_ListReportsConfig_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, pm reports.PageMeta) (reports.ReportConfigPage, error)) *Service_ListReportsConfig_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// RemoveReportConfig provides a mock function for the type Service
|
|
func (_mock *Service) RemoveReportConfig(ctx context.Context, session authn.Session, id string) error {
|
|
ret := _mock.Called(ctx, session, id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RemoveReportConfig")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) error); ok {
|
|
r0 = returnFunc(ctx, session, id)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Service_RemoveReportConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveReportConfig'
|
|
type Service_RemoveReportConfig_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// RemoveReportConfig is a helper method to define mock.On call
|
|
// - ctx
|
|
// - session
|
|
// - id
|
|
func (_e *Service_Expecter) RemoveReportConfig(ctx interface{}, session interface{}, id interface{}) *Service_RemoveReportConfig_Call {
|
|
return &Service_RemoveReportConfig_Call{Call: _e.mock.On("RemoveReportConfig", ctx, session, id)}
|
|
}
|
|
|
|
func (_c *Service_RemoveReportConfig_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_RemoveReportConfig_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(authn.Session), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_RemoveReportConfig_Call) Return(err error) *Service_RemoveReportConfig_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_RemoveReportConfig_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, id string) error) *Service_RemoveReportConfig_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// StartScheduler provides a mock function for the type Service
|
|
func (_mock *Service) StartScheduler(ctx context.Context) error {
|
|
ret := _mock.Called(ctx)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for StartScheduler")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
|
|
r0 = returnFunc(ctx)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// Service_StartScheduler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartScheduler'
|
|
type Service_StartScheduler_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// StartScheduler is a helper method to define mock.On call
|
|
// - ctx
|
|
func (_e *Service_Expecter) StartScheduler(ctx interface{}) *Service_StartScheduler_Call {
|
|
return &Service_StartScheduler_Call{Call: _e.mock.On("StartScheduler", ctx)}
|
|
}
|
|
|
|
func (_c *Service_StartScheduler_Call) Run(run func(ctx context.Context)) *Service_StartScheduler_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_StartScheduler_Call) Return(err error) *Service_StartScheduler_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_StartScheduler_Call) RunAndReturn(run func(ctx context.Context) error) *Service_StartScheduler_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateReportConfig provides a mock function for the type Service
|
|
func (_mock *Service) UpdateReportConfig(ctx context.Context, session authn.Session, cfg reports.ReportConfig) (reports.ReportConfig, error) {
|
|
ret := _mock.Called(ctx, session, 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, authn.Session, reports.ReportConfig) (reports.ReportConfig, error)); ok {
|
|
return returnFunc(ctx, session, cfg)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, reports.ReportConfig) reports.ReportConfig); ok {
|
|
r0 = returnFunc(ctx, session, cfg)
|
|
} else {
|
|
r0 = ret.Get(0).(reports.ReportConfig)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, reports.ReportConfig) error); ok {
|
|
r1 = returnFunc(ctx, session, cfg)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Service_UpdateReportConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateReportConfig'
|
|
type Service_UpdateReportConfig_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateReportConfig is a helper method to define mock.On call
|
|
// - ctx
|
|
// - session
|
|
// - cfg
|
|
func (_e *Service_Expecter) UpdateReportConfig(ctx interface{}, session interface{}, cfg interface{}) *Service_UpdateReportConfig_Call {
|
|
return &Service_UpdateReportConfig_Call{Call: _e.mock.On("UpdateReportConfig", ctx, session, cfg)}
|
|
}
|
|
|
|
func (_c *Service_UpdateReportConfig_Call) Run(run func(ctx context.Context, session authn.Session, cfg reports.ReportConfig)) *Service_UpdateReportConfig_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(authn.Session), args[2].(reports.ReportConfig))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_UpdateReportConfig_Call) Return(reportConfig reports.ReportConfig, err error) *Service_UpdateReportConfig_Call {
|
|
_c.Call.Return(reportConfig, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_UpdateReportConfig_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, cfg reports.ReportConfig) (reports.ReportConfig, error)) *Service_UpdateReportConfig_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateReportSchedule provides a mock function for the type Service
|
|
func (_mock *Service) UpdateReportSchedule(ctx context.Context, session authn.Session, cfg reports.ReportConfig) (reports.ReportConfig, error) {
|
|
ret := _mock.Called(ctx, session, 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, authn.Session, reports.ReportConfig) (reports.ReportConfig, error)); ok {
|
|
return returnFunc(ctx, session, cfg)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, reports.ReportConfig) reports.ReportConfig); ok {
|
|
r0 = returnFunc(ctx, session, cfg)
|
|
} else {
|
|
r0 = ret.Get(0).(reports.ReportConfig)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, reports.ReportConfig) error); ok {
|
|
r1 = returnFunc(ctx, session, cfg)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Service_UpdateReportSchedule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateReportSchedule'
|
|
type Service_UpdateReportSchedule_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateReportSchedule is a helper method to define mock.On call
|
|
// - ctx
|
|
// - session
|
|
// - cfg
|
|
func (_e *Service_Expecter) UpdateReportSchedule(ctx interface{}, session interface{}, cfg interface{}) *Service_UpdateReportSchedule_Call {
|
|
return &Service_UpdateReportSchedule_Call{Call: _e.mock.On("UpdateReportSchedule", ctx, session, cfg)}
|
|
}
|
|
|
|
func (_c *Service_UpdateReportSchedule_Call) Run(run func(ctx context.Context, session authn.Session, cfg reports.ReportConfig)) *Service_UpdateReportSchedule_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(authn.Session), args[2].(reports.ReportConfig))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_UpdateReportSchedule_Call) Return(reportConfig reports.ReportConfig, err error) *Service_UpdateReportSchedule_Call {
|
|
_c.Call.Return(reportConfig, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_UpdateReportSchedule_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, cfg reports.ReportConfig) (reports.ReportConfig, error)) *Service_UpdateReportSchedule_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ViewReportConfig provides a mock function for the type Service
|
|
func (_mock *Service) ViewReportConfig(ctx context.Context, session authn.Session, id string) (reports.ReportConfig, error) {
|
|
ret := _mock.Called(ctx, session, 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, authn.Session, string) (reports.ReportConfig, error)); ok {
|
|
return returnFunc(ctx, session, id)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) reports.ReportConfig); ok {
|
|
r0 = returnFunc(ctx, session, id)
|
|
} else {
|
|
r0 = ret.Get(0).(reports.ReportConfig)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, string) error); ok {
|
|
r1 = returnFunc(ctx, session, id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Service_ViewReportConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ViewReportConfig'
|
|
type Service_ViewReportConfig_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ViewReportConfig is a helper method to define mock.On call
|
|
// - ctx
|
|
// - session
|
|
// - id
|
|
func (_e *Service_Expecter) ViewReportConfig(ctx interface{}, session interface{}, id interface{}) *Service_ViewReportConfig_Call {
|
|
return &Service_ViewReportConfig_Call{Call: _e.mock.On("ViewReportConfig", ctx, session, id)}
|
|
}
|
|
|
|
func (_c *Service_ViewReportConfig_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *Service_ViewReportConfig_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(authn.Session), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_ViewReportConfig_Call) Return(reportConfig reports.ReportConfig, err error) *Service_ViewReportConfig_Call {
|
|
_c.Call.Return(reportConfig, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Service_ViewReportConfig_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, id string) (reports.ReportConfig, error)) *Service_ViewReportConfig_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|