mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Delete folders, dashboards with registry service Co-authored-by: Serge Zaitsev <hello@zserge.com> * Update signature of ProvideDashboardServiceImpl * Regenerate mockery file * Add test for DeleteInFolder * Add test for DeleteDashboardsInFolder * Delete child dashboard associations via registry * Add validation of folder uid and org id --------- Co-authored-by: Serge Zaitsev <hello@zserge.com>
1276 lines
48 KiB
Go
1276 lines
48 KiB
Go
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
|
|
|
package dashboards
|
|
|
|
import (
|
|
context "context"
|
|
|
|
folder "github.com/grafana/grafana/pkg/services/folder"
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
models "github.com/grafana/grafana/pkg/services/alerting/models"
|
|
|
|
quota "github.com/grafana/grafana/pkg/services/quota"
|
|
)
|
|
|
|
// FakeDashboardStore is an autogenerated mock type for the Store type
|
|
type FakeDashboardStore struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type FakeDashboardStore_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *FakeDashboardStore) EXPECT() *FakeDashboardStore_Expecter {
|
|
return &FakeDashboardStore_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// Count provides a mock function with given fields: _a0, _a1
|
|
func (_m *FakeDashboardStore) Count(_a0 context.Context, _a1 *quota.ScopeParameters) (*quota.Map, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 *quota.Map
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *quota.ScopeParameters) (*quota.Map, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *quota.ScopeParameters) *quota.Map); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*quota.Map)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *quota.ScopeParameters) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FakeDashboardStore_Count_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Count'
|
|
type FakeDashboardStore_Count_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Count is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 *quota.ScopeParameters
|
|
func (_e *FakeDashboardStore_Expecter) Count(_a0 interface{}, _a1 interface{}) *FakeDashboardStore_Count_Call {
|
|
return &FakeDashboardStore_Count_Call{Call: _e.mock.On("Count", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_Count_Call) Run(run func(_a0 context.Context, _a1 *quota.ScopeParameters)) *FakeDashboardStore_Count_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*quota.ScopeParameters))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_Count_Call) Return(_a0 *quota.Map, _a1 error) *FakeDashboardStore_Count_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_Count_Call) RunAndReturn(run func(context.Context, *quota.ScopeParameters) (*quota.Map, error)) *FakeDashboardStore_Count_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// CountDashboardsInFolder provides a mock function with given fields: ctx, request
|
|
func (_m *FakeDashboardStore) CountDashboardsInFolder(ctx context.Context, request *CountDashboardsInFolderRequest) (int64, error) {
|
|
ret := _m.Called(ctx, request)
|
|
|
|
var r0 int64
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *CountDashboardsInFolderRequest) (int64, error)); ok {
|
|
return rf(ctx, request)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *CountDashboardsInFolderRequest) int64); ok {
|
|
r0 = rf(ctx, request)
|
|
} else {
|
|
r0 = ret.Get(0).(int64)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *CountDashboardsInFolderRequest) error); ok {
|
|
r1 = rf(ctx, request)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FakeDashboardStore_CountDashboardsInFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountDashboardsInFolder'
|
|
type FakeDashboardStore_CountDashboardsInFolder_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CountDashboardsInFolder is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - request *CountDashboardsInFolderRequest
|
|
func (_e *FakeDashboardStore_Expecter) CountDashboardsInFolder(ctx interface{}, request interface{}) *FakeDashboardStore_CountDashboardsInFolder_Call {
|
|
return &FakeDashboardStore_CountDashboardsInFolder_Call{Call: _e.mock.On("CountDashboardsInFolder", ctx, request)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_CountDashboardsInFolder_Call) Run(run func(ctx context.Context, request *CountDashboardsInFolderRequest)) *FakeDashboardStore_CountDashboardsInFolder_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*CountDashboardsInFolderRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_CountDashboardsInFolder_Call) Return(_a0 int64, _a1 error) *FakeDashboardStore_CountDashboardsInFolder_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_CountDashboardsInFolder_Call) RunAndReturn(run func(context.Context, *CountDashboardsInFolderRequest) (int64, error)) *FakeDashboardStore_CountDashboardsInFolder_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeleteACLByUser provides a mock function with given fields: _a0, _a1
|
|
func (_m *FakeDashboardStore) DeleteACLByUser(_a0 context.Context, _a1 int64) error {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// FakeDashboardStore_DeleteACLByUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteACLByUser'
|
|
type FakeDashboardStore_DeleteACLByUser_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeleteACLByUser is a helper method to define mock.On call
|
|
// - _a0 context.Context
|
|
// - _a1 int64
|
|
func (_e *FakeDashboardStore_Expecter) DeleteACLByUser(_a0 interface{}, _a1 interface{}) *FakeDashboardStore_DeleteACLByUser_Call {
|
|
return &FakeDashboardStore_DeleteACLByUser_Call{Call: _e.mock.On("DeleteACLByUser", _a0, _a1)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_DeleteACLByUser_Call) Run(run func(_a0 context.Context, _a1 int64)) *FakeDashboardStore_DeleteACLByUser_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_DeleteACLByUser_Call) Return(_a0 error) *FakeDashboardStore_DeleteACLByUser_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_DeleteACLByUser_Call) RunAndReturn(run func(context.Context, int64) error) *FakeDashboardStore_DeleteACLByUser_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeleteDashboard provides a mock function with given fields: ctx, cmd
|
|
func (_m *FakeDashboardStore) DeleteDashboard(ctx context.Context, cmd *DeleteDashboardCommand) error {
|
|
ret := _m.Called(ctx, cmd)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *DeleteDashboardCommand) error); ok {
|
|
r0 = rf(ctx, cmd)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// FakeDashboardStore_DeleteDashboard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteDashboard'
|
|
type FakeDashboardStore_DeleteDashboard_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeleteDashboard is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - cmd *DeleteDashboardCommand
|
|
func (_e *FakeDashboardStore_Expecter) DeleteDashboard(ctx interface{}, cmd interface{}) *FakeDashboardStore_DeleteDashboard_Call {
|
|
return &FakeDashboardStore_DeleteDashboard_Call{Call: _e.mock.On("DeleteDashboard", ctx, cmd)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_DeleteDashboard_Call) Run(run func(ctx context.Context, cmd *DeleteDashboardCommand)) *FakeDashboardStore_DeleteDashboard_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*DeleteDashboardCommand))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_DeleteDashboard_Call) Return(_a0 error) *FakeDashboardStore_DeleteDashboard_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_DeleteDashboard_Call) RunAndReturn(run func(context.Context, *DeleteDashboardCommand) error) *FakeDashboardStore_DeleteDashboard_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeleteDashboardsInFolder provides a mock function with given fields: ctx, request
|
|
func (_m *FakeDashboardStore) DeleteDashboardsInFolder(ctx context.Context, request *DeleteDashboardsInFolderRequest) error {
|
|
ret := _m.Called(ctx, request)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *DeleteDashboardsInFolderRequest) error); ok {
|
|
r0 = rf(ctx, request)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// FakeDashboardStore_DeleteDashboardsInFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteDashboardsInFolder'
|
|
type FakeDashboardStore_DeleteDashboardsInFolder_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeleteDashboardsInFolder is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - request *DeleteDashboardsInFolderRequest
|
|
func (_e *FakeDashboardStore_Expecter) DeleteDashboardsInFolder(ctx interface{}, request interface{}) *FakeDashboardStore_DeleteDashboardsInFolder_Call {
|
|
return &FakeDashboardStore_DeleteDashboardsInFolder_Call{Call: _e.mock.On("DeleteDashboardsInFolder", ctx, request)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_DeleteDashboardsInFolder_Call) Run(run func(ctx context.Context, request *DeleteDashboardsInFolderRequest)) *FakeDashboardStore_DeleteDashboardsInFolder_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*DeleteDashboardsInFolderRequest))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_DeleteDashboardsInFolder_Call) Return(_a0 error) *FakeDashboardStore_DeleteDashboardsInFolder_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_DeleteDashboardsInFolder_Call) RunAndReturn(run func(context.Context, *DeleteDashboardsInFolderRequest) error) *FakeDashboardStore_DeleteDashboardsInFolder_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DeleteOrphanedProvisionedDashboards provides a mock function with given fields: ctx, cmd
|
|
func (_m *FakeDashboardStore) DeleteOrphanedProvisionedDashboards(ctx context.Context, cmd *DeleteOrphanedProvisionedDashboardsCommand) error {
|
|
ret := _m.Called(ctx, cmd)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *DeleteOrphanedProvisionedDashboardsCommand) error); ok {
|
|
r0 = rf(ctx, cmd)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// FakeDashboardStore_DeleteOrphanedProvisionedDashboards_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteOrphanedProvisionedDashboards'
|
|
type FakeDashboardStore_DeleteOrphanedProvisionedDashboards_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DeleteOrphanedProvisionedDashboards is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - cmd *DeleteOrphanedProvisionedDashboardsCommand
|
|
func (_e *FakeDashboardStore_Expecter) DeleteOrphanedProvisionedDashboards(ctx interface{}, cmd interface{}) *FakeDashboardStore_DeleteOrphanedProvisionedDashboards_Call {
|
|
return &FakeDashboardStore_DeleteOrphanedProvisionedDashboards_Call{Call: _e.mock.On("DeleteOrphanedProvisionedDashboards", ctx, cmd)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_DeleteOrphanedProvisionedDashboards_Call) Run(run func(ctx context.Context, cmd *DeleteOrphanedProvisionedDashboardsCommand)) *FakeDashboardStore_DeleteOrphanedProvisionedDashboards_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*DeleteOrphanedProvisionedDashboardsCommand))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_DeleteOrphanedProvisionedDashboards_Call) Return(_a0 error) *FakeDashboardStore_DeleteOrphanedProvisionedDashboards_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_DeleteOrphanedProvisionedDashboards_Call) RunAndReturn(run func(context.Context, *DeleteOrphanedProvisionedDashboardsCommand) error) *FakeDashboardStore_DeleteOrphanedProvisionedDashboards_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// FindDashboards provides a mock function with given fields: ctx, query
|
|
func (_m *FakeDashboardStore) FindDashboards(ctx context.Context, query *FindPersistedDashboardsQuery) ([]DashboardSearchProjection, error) {
|
|
ret := _m.Called(ctx, query)
|
|
|
|
var r0 []DashboardSearchProjection
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *FindPersistedDashboardsQuery) ([]DashboardSearchProjection, error)); ok {
|
|
return rf(ctx, query)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *FindPersistedDashboardsQuery) []DashboardSearchProjection); ok {
|
|
r0 = rf(ctx, query)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]DashboardSearchProjection)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *FindPersistedDashboardsQuery) error); ok {
|
|
r1 = rf(ctx, query)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FakeDashboardStore_FindDashboards_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindDashboards'
|
|
type FakeDashboardStore_FindDashboards_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// FindDashboards is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - query *FindPersistedDashboardsQuery
|
|
func (_e *FakeDashboardStore_Expecter) FindDashboards(ctx interface{}, query interface{}) *FakeDashboardStore_FindDashboards_Call {
|
|
return &FakeDashboardStore_FindDashboards_Call{Call: _e.mock.On("FindDashboards", ctx, query)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_FindDashboards_Call) Run(run func(ctx context.Context, query *FindPersistedDashboardsQuery)) *FakeDashboardStore_FindDashboards_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*FindPersistedDashboardsQuery))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_FindDashboards_Call) Return(_a0 []DashboardSearchProjection, _a1 error) *FakeDashboardStore_FindDashboards_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_FindDashboards_Call) RunAndReturn(run func(context.Context, *FindPersistedDashboardsQuery) ([]DashboardSearchProjection, error)) *FakeDashboardStore_FindDashboards_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetDashboard provides a mock function with given fields: ctx, query
|
|
func (_m *FakeDashboardStore) GetDashboard(ctx context.Context, query *GetDashboardQuery) (*Dashboard, error) {
|
|
ret := _m.Called(ctx, query)
|
|
|
|
var r0 *Dashboard
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *GetDashboardQuery) (*Dashboard, error)); ok {
|
|
return rf(ctx, query)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *GetDashboardQuery) *Dashboard); ok {
|
|
r0 = rf(ctx, query)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*Dashboard)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *GetDashboardQuery) error); ok {
|
|
r1 = rf(ctx, query)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FakeDashboardStore_GetDashboard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDashboard'
|
|
type FakeDashboardStore_GetDashboard_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetDashboard is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - query *GetDashboardQuery
|
|
func (_e *FakeDashboardStore_Expecter) GetDashboard(ctx interface{}, query interface{}) *FakeDashboardStore_GetDashboard_Call {
|
|
return &FakeDashboardStore_GetDashboard_Call{Call: _e.mock.On("GetDashboard", ctx, query)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetDashboard_Call) Run(run func(ctx context.Context, query *GetDashboardQuery)) *FakeDashboardStore_GetDashboard_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*GetDashboardQuery))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetDashboard_Call) Return(_a0 *Dashboard, _a1 error) *FakeDashboardStore_GetDashboard_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetDashboard_Call) RunAndReturn(run func(context.Context, *GetDashboardQuery) (*Dashboard, error)) *FakeDashboardStore_GetDashboard_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetDashboardACLInfoList provides a mock function with given fields: ctx, query
|
|
func (_m *FakeDashboardStore) GetDashboardACLInfoList(ctx context.Context, query *GetDashboardACLInfoListQuery) ([]*DashboardACLInfoDTO, error) {
|
|
ret := _m.Called(ctx, query)
|
|
|
|
var r0 []*DashboardACLInfoDTO
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *GetDashboardACLInfoListQuery) ([]*DashboardACLInfoDTO, error)); ok {
|
|
return rf(ctx, query)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *GetDashboardACLInfoListQuery) []*DashboardACLInfoDTO); ok {
|
|
r0 = rf(ctx, query)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*DashboardACLInfoDTO)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *GetDashboardACLInfoListQuery) error); ok {
|
|
r1 = rf(ctx, query)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FakeDashboardStore_GetDashboardACLInfoList_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDashboardACLInfoList'
|
|
type FakeDashboardStore_GetDashboardACLInfoList_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetDashboardACLInfoList is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - query *GetDashboardACLInfoListQuery
|
|
func (_e *FakeDashboardStore_Expecter) GetDashboardACLInfoList(ctx interface{}, query interface{}) *FakeDashboardStore_GetDashboardACLInfoList_Call {
|
|
return &FakeDashboardStore_GetDashboardACLInfoList_Call{Call: _e.mock.On("GetDashboardACLInfoList", ctx, query)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetDashboardACLInfoList_Call) Run(run func(ctx context.Context, query *GetDashboardACLInfoListQuery)) *FakeDashboardStore_GetDashboardACLInfoList_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*GetDashboardACLInfoListQuery))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetDashboardACLInfoList_Call) Return(_a0 []*DashboardACLInfoDTO, _a1 error) *FakeDashboardStore_GetDashboardACLInfoList_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetDashboardACLInfoList_Call) RunAndReturn(run func(context.Context, *GetDashboardACLInfoListQuery) ([]*DashboardACLInfoDTO, error)) *FakeDashboardStore_GetDashboardACLInfoList_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetDashboardTags provides a mock function with given fields: ctx, query
|
|
func (_m *FakeDashboardStore) GetDashboardTags(ctx context.Context, query *GetDashboardTagsQuery) ([]*DashboardTagCloudItem, error) {
|
|
ret := _m.Called(ctx, query)
|
|
|
|
var r0 []*DashboardTagCloudItem
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *GetDashboardTagsQuery) ([]*DashboardTagCloudItem, error)); ok {
|
|
return rf(ctx, query)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *GetDashboardTagsQuery) []*DashboardTagCloudItem); ok {
|
|
r0 = rf(ctx, query)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*DashboardTagCloudItem)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *GetDashboardTagsQuery) error); ok {
|
|
r1 = rf(ctx, query)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FakeDashboardStore_GetDashboardTags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDashboardTags'
|
|
type FakeDashboardStore_GetDashboardTags_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetDashboardTags is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - query *GetDashboardTagsQuery
|
|
func (_e *FakeDashboardStore_Expecter) GetDashboardTags(ctx interface{}, query interface{}) *FakeDashboardStore_GetDashboardTags_Call {
|
|
return &FakeDashboardStore_GetDashboardTags_Call{Call: _e.mock.On("GetDashboardTags", ctx, query)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetDashboardTags_Call) Run(run func(ctx context.Context, query *GetDashboardTagsQuery)) *FakeDashboardStore_GetDashboardTags_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*GetDashboardTagsQuery))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetDashboardTags_Call) Return(_a0 []*DashboardTagCloudItem, _a1 error) *FakeDashboardStore_GetDashboardTags_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetDashboardTags_Call) RunAndReturn(run func(context.Context, *GetDashboardTagsQuery) ([]*DashboardTagCloudItem, error)) *FakeDashboardStore_GetDashboardTags_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetDashboardUIDByID provides a mock function with given fields: ctx, query
|
|
func (_m *FakeDashboardStore) GetDashboardUIDByID(ctx context.Context, query *GetDashboardRefByIDQuery) (*DashboardRef, error) {
|
|
ret := _m.Called(ctx, query)
|
|
|
|
var r0 *DashboardRef
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *GetDashboardRefByIDQuery) (*DashboardRef, error)); ok {
|
|
return rf(ctx, query)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *GetDashboardRefByIDQuery) *DashboardRef); ok {
|
|
r0 = rf(ctx, query)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*DashboardRef)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *GetDashboardRefByIDQuery) error); ok {
|
|
r1 = rf(ctx, query)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FakeDashboardStore_GetDashboardUIDByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDashboardUIDByID'
|
|
type FakeDashboardStore_GetDashboardUIDByID_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetDashboardUIDByID is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - query *GetDashboardRefByIDQuery
|
|
func (_e *FakeDashboardStore_Expecter) GetDashboardUIDByID(ctx interface{}, query interface{}) *FakeDashboardStore_GetDashboardUIDByID_Call {
|
|
return &FakeDashboardStore_GetDashboardUIDByID_Call{Call: _e.mock.On("GetDashboardUIDByID", ctx, query)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetDashboardUIDByID_Call) Run(run func(ctx context.Context, query *GetDashboardRefByIDQuery)) *FakeDashboardStore_GetDashboardUIDByID_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*GetDashboardRefByIDQuery))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetDashboardUIDByID_Call) Return(_a0 *DashboardRef, _a1 error) *FakeDashboardStore_GetDashboardUIDByID_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetDashboardUIDByID_Call) RunAndReturn(run func(context.Context, *GetDashboardRefByIDQuery) (*DashboardRef, error)) *FakeDashboardStore_GetDashboardUIDByID_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetDashboards provides a mock function with given fields: ctx, query
|
|
func (_m *FakeDashboardStore) GetDashboards(ctx context.Context, query *GetDashboardsQuery) ([]*Dashboard, error) {
|
|
ret := _m.Called(ctx, query)
|
|
|
|
var r0 []*Dashboard
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *GetDashboardsQuery) ([]*Dashboard, error)); ok {
|
|
return rf(ctx, query)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *GetDashboardsQuery) []*Dashboard); ok {
|
|
r0 = rf(ctx, query)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*Dashboard)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *GetDashboardsQuery) error); ok {
|
|
r1 = rf(ctx, query)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FakeDashboardStore_GetDashboards_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDashboards'
|
|
type FakeDashboardStore_GetDashboards_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetDashboards is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - query *GetDashboardsQuery
|
|
func (_e *FakeDashboardStore_Expecter) GetDashboards(ctx interface{}, query interface{}) *FakeDashboardStore_GetDashboards_Call {
|
|
return &FakeDashboardStore_GetDashboards_Call{Call: _e.mock.On("GetDashboards", ctx, query)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetDashboards_Call) Run(run func(ctx context.Context, query *GetDashboardsQuery)) *FakeDashboardStore_GetDashboards_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*GetDashboardsQuery))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetDashboards_Call) Return(_a0 []*Dashboard, _a1 error) *FakeDashboardStore_GetDashboards_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetDashboards_Call) RunAndReturn(run func(context.Context, *GetDashboardsQuery) ([]*Dashboard, error)) *FakeDashboardStore_GetDashboards_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetDashboardsByPluginID provides a mock function with given fields: ctx, query
|
|
func (_m *FakeDashboardStore) GetDashboardsByPluginID(ctx context.Context, query *GetDashboardsByPluginIDQuery) ([]*Dashboard, error) {
|
|
ret := _m.Called(ctx, query)
|
|
|
|
var r0 []*Dashboard
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *GetDashboardsByPluginIDQuery) ([]*Dashboard, error)); ok {
|
|
return rf(ctx, query)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *GetDashboardsByPluginIDQuery) []*Dashboard); ok {
|
|
r0 = rf(ctx, query)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*Dashboard)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *GetDashboardsByPluginIDQuery) error); ok {
|
|
r1 = rf(ctx, query)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FakeDashboardStore_GetDashboardsByPluginID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDashboardsByPluginID'
|
|
type FakeDashboardStore_GetDashboardsByPluginID_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetDashboardsByPluginID is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - query *GetDashboardsByPluginIDQuery
|
|
func (_e *FakeDashboardStore_Expecter) GetDashboardsByPluginID(ctx interface{}, query interface{}) *FakeDashboardStore_GetDashboardsByPluginID_Call {
|
|
return &FakeDashboardStore_GetDashboardsByPluginID_Call{Call: _e.mock.On("GetDashboardsByPluginID", ctx, query)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetDashboardsByPluginID_Call) Run(run func(ctx context.Context, query *GetDashboardsByPluginIDQuery)) *FakeDashboardStore_GetDashboardsByPluginID_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*GetDashboardsByPluginIDQuery))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetDashboardsByPluginID_Call) Return(_a0 []*Dashboard, _a1 error) *FakeDashboardStore_GetDashboardsByPluginID_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetDashboardsByPluginID_Call) RunAndReturn(run func(context.Context, *GetDashboardsByPluginIDQuery) ([]*Dashboard, error)) *FakeDashboardStore_GetDashboardsByPluginID_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetProvisionedDashboardData provides a mock function with given fields: ctx, name
|
|
func (_m *FakeDashboardStore) GetProvisionedDashboardData(ctx context.Context, name string) ([]*DashboardProvisioning, error) {
|
|
ret := _m.Called(ctx, name)
|
|
|
|
var r0 []*DashboardProvisioning
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*DashboardProvisioning, error)); ok {
|
|
return rf(ctx, name)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string) []*DashboardProvisioning); ok {
|
|
r0 = rf(ctx, name)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*DashboardProvisioning)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
|
|
r1 = rf(ctx, name)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FakeDashboardStore_GetProvisionedDashboardData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProvisionedDashboardData'
|
|
type FakeDashboardStore_GetProvisionedDashboardData_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetProvisionedDashboardData is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - name string
|
|
func (_e *FakeDashboardStore_Expecter) GetProvisionedDashboardData(ctx interface{}, name interface{}) *FakeDashboardStore_GetProvisionedDashboardData_Call {
|
|
return &FakeDashboardStore_GetProvisionedDashboardData_Call{Call: _e.mock.On("GetProvisionedDashboardData", ctx, name)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetProvisionedDashboardData_Call) Run(run func(ctx context.Context, name string)) *FakeDashboardStore_GetProvisionedDashboardData_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetProvisionedDashboardData_Call) Return(_a0 []*DashboardProvisioning, _a1 error) *FakeDashboardStore_GetProvisionedDashboardData_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetProvisionedDashboardData_Call) RunAndReturn(run func(context.Context, string) ([]*DashboardProvisioning, error)) *FakeDashboardStore_GetProvisionedDashboardData_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetProvisionedDataByDashboardID provides a mock function with given fields: ctx, dashboardID
|
|
func (_m *FakeDashboardStore) GetProvisionedDataByDashboardID(ctx context.Context, dashboardID int64) (*DashboardProvisioning, error) {
|
|
ret := _m.Called(ctx, dashboardID)
|
|
|
|
var r0 *DashboardProvisioning
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64) (*DashboardProvisioning, error)); ok {
|
|
return rf(ctx, dashboardID)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64) *DashboardProvisioning); ok {
|
|
r0 = rf(ctx, dashboardID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*DashboardProvisioning)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
|
|
r1 = rf(ctx, dashboardID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FakeDashboardStore_GetProvisionedDataByDashboardID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProvisionedDataByDashboardID'
|
|
type FakeDashboardStore_GetProvisionedDataByDashboardID_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetProvisionedDataByDashboardID is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - dashboardID int64
|
|
func (_e *FakeDashboardStore_Expecter) GetProvisionedDataByDashboardID(ctx interface{}, dashboardID interface{}) *FakeDashboardStore_GetProvisionedDataByDashboardID_Call {
|
|
return &FakeDashboardStore_GetProvisionedDataByDashboardID_Call{Call: _e.mock.On("GetProvisionedDataByDashboardID", ctx, dashboardID)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetProvisionedDataByDashboardID_Call) Run(run func(ctx context.Context, dashboardID int64)) *FakeDashboardStore_GetProvisionedDataByDashboardID_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetProvisionedDataByDashboardID_Call) Return(_a0 *DashboardProvisioning, _a1 error) *FakeDashboardStore_GetProvisionedDataByDashboardID_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetProvisionedDataByDashboardID_Call) RunAndReturn(run func(context.Context, int64) (*DashboardProvisioning, error)) *FakeDashboardStore_GetProvisionedDataByDashboardID_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetProvisionedDataByDashboardUID provides a mock function with given fields: ctx, orgID, dashboardUID
|
|
func (_m *FakeDashboardStore) GetProvisionedDataByDashboardUID(ctx context.Context, orgID int64, dashboardUID string) (*DashboardProvisioning, error) {
|
|
ret := _m.Called(ctx, orgID, dashboardUID)
|
|
|
|
var r0 *DashboardProvisioning
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, string) (*DashboardProvisioning, error)); ok {
|
|
return rf(ctx, orgID, dashboardUID)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, string) *DashboardProvisioning); ok {
|
|
r0 = rf(ctx, orgID, dashboardUID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*DashboardProvisioning)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok {
|
|
r1 = rf(ctx, orgID, dashboardUID)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FakeDashboardStore_GetProvisionedDataByDashboardUID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProvisionedDataByDashboardUID'
|
|
type FakeDashboardStore_GetProvisionedDataByDashboardUID_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetProvisionedDataByDashboardUID is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - orgID int64
|
|
// - dashboardUID string
|
|
func (_e *FakeDashboardStore_Expecter) GetProvisionedDataByDashboardUID(ctx interface{}, orgID interface{}, dashboardUID interface{}) *FakeDashboardStore_GetProvisionedDataByDashboardUID_Call {
|
|
return &FakeDashboardStore_GetProvisionedDataByDashboardUID_Call{Call: _e.mock.On("GetProvisionedDataByDashboardUID", ctx, orgID, dashboardUID)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetProvisionedDataByDashboardUID_Call) Run(run func(ctx context.Context, orgID int64, dashboardUID string)) *FakeDashboardStore_GetProvisionedDataByDashboardUID_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetProvisionedDataByDashboardUID_Call) Return(_a0 *DashboardProvisioning, _a1 error) *FakeDashboardStore_GetProvisionedDataByDashboardUID_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_GetProvisionedDataByDashboardUID_Call) RunAndReturn(run func(context.Context, int64, string) (*DashboardProvisioning, error)) *FakeDashboardStore_GetProvisionedDataByDashboardUID_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// HasAdminPermissionInDashboardsOrFolders provides a mock function with given fields: ctx, query
|
|
func (_m *FakeDashboardStore) HasAdminPermissionInDashboardsOrFolders(ctx context.Context, query *folder.HasAdminPermissionInDashboardsOrFoldersQuery) (bool, error) {
|
|
ret := _m.Called(ctx, query)
|
|
|
|
var r0 bool
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *folder.HasAdminPermissionInDashboardsOrFoldersQuery) (bool, error)); ok {
|
|
return rf(ctx, query)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *folder.HasAdminPermissionInDashboardsOrFoldersQuery) bool); ok {
|
|
r0 = rf(ctx, query)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *folder.HasAdminPermissionInDashboardsOrFoldersQuery) error); ok {
|
|
r1 = rf(ctx, query)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FakeDashboardStore_HasAdminPermissionInDashboardsOrFolders_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasAdminPermissionInDashboardsOrFolders'
|
|
type FakeDashboardStore_HasAdminPermissionInDashboardsOrFolders_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// HasAdminPermissionInDashboardsOrFolders is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - query *folder.HasAdminPermissionInDashboardsOrFoldersQuery
|
|
func (_e *FakeDashboardStore_Expecter) HasAdminPermissionInDashboardsOrFolders(ctx interface{}, query interface{}) *FakeDashboardStore_HasAdminPermissionInDashboardsOrFolders_Call {
|
|
return &FakeDashboardStore_HasAdminPermissionInDashboardsOrFolders_Call{Call: _e.mock.On("HasAdminPermissionInDashboardsOrFolders", ctx, query)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_HasAdminPermissionInDashboardsOrFolders_Call) Run(run func(ctx context.Context, query *folder.HasAdminPermissionInDashboardsOrFoldersQuery)) *FakeDashboardStore_HasAdminPermissionInDashboardsOrFolders_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*folder.HasAdminPermissionInDashboardsOrFoldersQuery))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_HasAdminPermissionInDashboardsOrFolders_Call) Return(_a0 bool, _a1 error) *FakeDashboardStore_HasAdminPermissionInDashboardsOrFolders_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_HasAdminPermissionInDashboardsOrFolders_Call) RunAndReturn(run func(context.Context, *folder.HasAdminPermissionInDashboardsOrFoldersQuery) (bool, error)) *FakeDashboardStore_HasAdminPermissionInDashboardsOrFolders_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// HasEditPermissionInFolders provides a mock function with given fields: ctx, query
|
|
func (_m *FakeDashboardStore) HasEditPermissionInFolders(ctx context.Context, query *folder.HasEditPermissionInFoldersQuery) (bool, error) {
|
|
ret := _m.Called(ctx, query)
|
|
|
|
var r0 bool
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *folder.HasEditPermissionInFoldersQuery) (bool, error)); ok {
|
|
return rf(ctx, query)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *folder.HasEditPermissionInFoldersQuery) bool); ok {
|
|
r0 = rf(ctx, query)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *folder.HasEditPermissionInFoldersQuery) error); ok {
|
|
r1 = rf(ctx, query)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FakeDashboardStore_HasEditPermissionInFolders_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasEditPermissionInFolders'
|
|
type FakeDashboardStore_HasEditPermissionInFolders_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// HasEditPermissionInFolders is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - query *folder.HasEditPermissionInFoldersQuery
|
|
func (_e *FakeDashboardStore_Expecter) HasEditPermissionInFolders(ctx interface{}, query interface{}) *FakeDashboardStore_HasEditPermissionInFolders_Call {
|
|
return &FakeDashboardStore_HasEditPermissionInFolders_Call{Call: _e.mock.On("HasEditPermissionInFolders", ctx, query)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_HasEditPermissionInFolders_Call) Run(run func(ctx context.Context, query *folder.HasEditPermissionInFoldersQuery)) *FakeDashboardStore_HasEditPermissionInFolders_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*folder.HasEditPermissionInFoldersQuery))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_HasEditPermissionInFolders_Call) Return(_a0 bool, _a1 error) *FakeDashboardStore_HasEditPermissionInFolders_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_HasEditPermissionInFolders_Call) RunAndReturn(run func(context.Context, *folder.HasEditPermissionInFoldersQuery) (bool, error)) *FakeDashboardStore_HasEditPermissionInFolders_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SaveAlerts provides a mock function with given fields: ctx, dashID, alerts
|
|
func (_m *FakeDashboardStore) SaveAlerts(ctx context.Context, dashID int64, alerts []*models.Alert) error {
|
|
ret := _m.Called(ctx, dashID, alerts)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, []*models.Alert) error); ok {
|
|
r0 = rf(ctx, dashID, alerts)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// FakeDashboardStore_SaveAlerts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveAlerts'
|
|
type FakeDashboardStore_SaveAlerts_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SaveAlerts is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - dashID int64
|
|
// - alerts []*models.Alert
|
|
func (_e *FakeDashboardStore_Expecter) SaveAlerts(ctx interface{}, dashID interface{}, alerts interface{}) *FakeDashboardStore_SaveAlerts_Call {
|
|
return &FakeDashboardStore_SaveAlerts_Call{Call: _e.mock.On("SaveAlerts", ctx, dashID, alerts)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_SaveAlerts_Call) Run(run func(ctx context.Context, dashID int64, alerts []*models.Alert)) *FakeDashboardStore_SaveAlerts_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].([]*models.Alert))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_SaveAlerts_Call) Return(_a0 error) *FakeDashboardStore_SaveAlerts_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_SaveAlerts_Call) RunAndReturn(run func(context.Context, int64, []*models.Alert) error) *FakeDashboardStore_SaveAlerts_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SaveDashboard provides a mock function with given fields: ctx, cmd
|
|
func (_m *FakeDashboardStore) SaveDashboard(ctx context.Context, cmd SaveDashboardCommand) (*Dashboard, error) {
|
|
ret := _m.Called(ctx, cmd)
|
|
|
|
var r0 *Dashboard
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, SaveDashboardCommand) (*Dashboard, error)); ok {
|
|
return rf(ctx, cmd)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, SaveDashboardCommand) *Dashboard); ok {
|
|
r0 = rf(ctx, cmd)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*Dashboard)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, SaveDashboardCommand) error); ok {
|
|
r1 = rf(ctx, cmd)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FakeDashboardStore_SaveDashboard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveDashboard'
|
|
type FakeDashboardStore_SaveDashboard_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SaveDashboard is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - cmd SaveDashboardCommand
|
|
func (_e *FakeDashboardStore_Expecter) SaveDashboard(ctx interface{}, cmd interface{}) *FakeDashboardStore_SaveDashboard_Call {
|
|
return &FakeDashboardStore_SaveDashboard_Call{Call: _e.mock.On("SaveDashboard", ctx, cmd)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_SaveDashboard_Call) Run(run func(ctx context.Context, cmd SaveDashboardCommand)) *FakeDashboardStore_SaveDashboard_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(SaveDashboardCommand))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_SaveDashboard_Call) Return(_a0 *Dashboard, _a1 error) *FakeDashboardStore_SaveDashboard_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_SaveDashboard_Call) RunAndReturn(run func(context.Context, SaveDashboardCommand) (*Dashboard, error)) *FakeDashboardStore_SaveDashboard_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SaveProvisionedDashboard provides a mock function with given fields: ctx, cmd, provisioning
|
|
func (_m *FakeDashboardStore) SaveProvisionedDashboard(ctx context.Context, cmd SaveDashboardCommand, provisioning *DashboardProvisioning) (*Dashboard, error) {
|
|
ret := _m.Called(ctx, cmd, provisioning)
|
|
|
|
var r0 *Dashboard
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, SaveDashboardCommand, *DashboardProvisioning) (*Dashboard, error)); ok {
|
|
return rf(ctx, cmd, provisioning)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, SaveDashboardCommand, *DashboardProvisioning) *Dashboard); ok {
|
|
r0 = rf(ctx, cmd, provisioning)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*Dashboard)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, SaveDashboardCommand, *DashboardProvisioning) error); ok {
|
|
r1 = rf(ctx, cmd, provisioning)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FakeDashboardStore_SaveProvisionedDashboard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveProvisionedDashboard'
|
|
type FakeDashboardStore_SaveProvisionedDashboard_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SaveProvisionedDashboard is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - cmd SaveDashboardCommand
|
|
// - provisioning *DashboardProvisioning
|
|
func (_e *FakeDashboardStore_Expecter) SaveProvisionedDashboard(ctx interface{}, cmd interface{}, provisioning interface{}) *FakeDashboardStore_SaveProvisionedDashboard_Call {
|
|
return &FakeDashboardStore_SaveProvisionedDashboard_Call{Call: _e.mock.On("SaveProvisionedDashboard", ctx, cmd, provisioning)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_SaveProvisionedDashboard_Call) Run(run func(ctx context.Context, cmd SaveDashboardCommand, provisioning *DashboardProvisioning)) *FakeDashboardStore_SaveProvisionedDashboard_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(SaveDashboardCommand), args[2].(*DashboardProvisioning))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_SaveProvisionedDashboard_Call) Return(_a0 *Dashboard, _a1 error) *FakeDashboardStore_SaveProvisionedDashboard_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_SaveProvisionedDashboard_Call) RunAndReturn(run func(context.Context, SaveDashboardCommand, *DashboardProvisioning) (*Dashboard, error)) *FakeDashboardStore_SaveProvisionedDashboard_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UnprovisionDashboard provides a mock function with given fields: ctx, id
|
|
func (_m *FakeDashboardStore) UnprovisionDashboard(ctx context.Context, id int64) error {
|
|
ret := _m.Called(ctx, id)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
|
r0 = rf(ctx, id)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// FakeDashboardStore_UnprovisionDashboard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnprovisionDashboard'
|
|
type FakeDashboardStore_UnprovisionDashboard_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UnprovisionDashboard is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - id int64
|
|
func (_e *FakeDashboardStore_Expecter) UnprovisionDashboard(ctx interface{}, id interface{}) *FakeDashboardStore_UnprovisionDashboard_Call {
|
|
return &FakeDashboardStore_UnprovisionDashboard_Call{Call: _e.mock.On("UnprovisionDashboard", ctx, id)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_UnprovisionDashboard_Call) Run(run func(ctx context.Context, id int64)) *FakeDashboardStore_UnprovisionDashboard_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_UnprovisionDashboard_Call) Return(_a0 error) *FakeDashboardStore_UnprovisionDashboard_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_UnprovisionDashboard_Call) RunAndReturn(run func(context.Context, int64) error) *FakeDashboardStore_UnprovisionDashboard_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateDashboardACL provides a mock function with given fields: ctx, uid, items
|
|
func (_m *FakeDashboardStore) UpdateDashboardACL(ctx context.Context, uid int64, items []*DashboardACL) error {
|
|
ret := _m.Called(ctx, uid, items)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, int64, []*DashboardACL) error); ok {
|
|
r0 = rf(ctx, uid, items)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// FakeDashboardStore_UpdateDashboardACL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateDashboardACL'
|
|
type FakeDashboardStore_UpdateDashboardACL_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateDashboardACL is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - uid int64
|
|
// - items []*DashboardACL
|
|
func (_e *FakeDashboardStore_Expecter) UpdateDashboardACL(ctx interface{}, uid interface{}, items interface{}) *FakeDashboardStore_UpdateDashboardACL_Call {
|
|
return &FakeDashboardStore_UpdateDashboardACL_Call{Call: _e.mock.On("UpdateDashboardACL", ctx, uid, items)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_UpdateDashboardACL_Call) Run(run func(ctx context.Context, uid int64, items []*DashboardACL)) *FakeDashboardStore_UpdateDashboardACL_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(int64), args[2].([]*DashboardACL))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_UpdateDashboardACL_Call) Return(_a0 error) *FakeDashboardStore_UpdateDashboardACL_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_UpdateDashboardACL_Call) RunAndReturn(run func(context.Context, int64, []*DashboardACL) error) *FakeDashboardStore_UpdateDashboardACL_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ValidateDashboardBeforeSave provides a mock function with given fields: ctx, dashboard, overwrite
|
|
func (_m *FakeDashboardStore) ValidateDashboardBeforeSave(ctx context.Context, dashboard *Dashboard, overwrite bool) (bool, error) {
|
|
ret := _m.Called(ctx, dashboard, overwrite)
|
|
|
|
var r0 bool
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *Dashboard, bool) (bool, error)); ok {
|
|
return rf(ctx, dashboard, overwrite)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *Dashboard, bool) bool); ok {
|
|
r0 = rf(ctx, dashboard, overwrite)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *Dashboard, bool) error); ok {
|
|
r1 = rf(ctx, dashboard, overwrite)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// FakeDashboardStore_ValidateDashboardBeforeSave_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateDashboardBeforeSave'
|
|
type FakeDashboardStore_ValidateDashboardBeforeSave_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ValidateDashboardBeforeSave is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - dashboard *Dashboard
|
|
// - overwrite bool
|
|
func (_e *FakeDashboardStore_Expecter) ValidateDashboardBeforeSave(ctx interface{}, dashboard interface{}, overwrite interface{}) *FakeDashboardStore_ValidateDashboardBeforeSave_Call {
|
|
return &FakeDashboardStore_ValidateDashboardBeforeSave_Call{Call: _e.mock.On("ValidateDashboardBeforeSave", ctx, dashboard, overwrite)}
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_ValidateDashboardBeforeSave_Call) Run(run func(ctx context.Context, dashboard *Dashboard, overwrite bool)) *FakeDashboardStore_ValidateDashboardBeforeSave_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*Dashboard), args[2].(bool))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_ValidateDashboardBeforeSave_Call) Return(_a0 bool, _a1 error) *FakeDashboardStore_ValidateDashboardBeforeSave_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *FakeDashboardStore_ValidateDashboardBeforeSave_Call) RunAndReturn(run func(context.Context, *Dashboard, bool) (bool, error)) *FakeDashboardStore_ValidateDashboardBeforeSave_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
type mockConstructorTestingTNewFakeDashboardStore interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}
|
|
|
|
// NewFakeDashboardStore creates a new instance of FakeDashboardStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
func NewFakeDashboardStore(t mockConstructorTestingTNewFakeDashboardStore) *FakeDashboardStore {
|
|
mock := &FakeDashboardStore{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|