2023-05-24 09:33:35 -05:00
// Code generated by mockery v2.28.0. DO NOT EDIT.
2022-02-16 07:15:44 -06:00
package dashboards
import (
context "context"
mock "github.com/stretchr/testify/mock"
)
// FakeDashboardProvisioning is an autogenerated mock type for the DashboardProvisioningService type
type FakeDashboardProvisioning struct {
mock . Mock
}
2022-02-23 04:12:37 -06:00
// DeleteOrphanedProvisionedDashboards provides a mock function with given fields: ctx, cmd
2023-01-18 06:52:41 -06:00
func ( _m * FakeDashboardProvisioning ) DeleteOrphanedProvisionedDashboards ( ctx context . Context , cmd * DeleteOrphanedProvisionedDashboardsCommand ) error {
2022-02-23 04:12:37 -06:00
ret := _m . Called ( ctx , cmd )
var r0 error
2023-01-18 06:52:41 -06:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * DeleteOrphanedProvisionedDashboardsCommand ) error ) ; ok {
2022-02-23 04:12:37 -06:00
r0 = rf ( ctx , cmd )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2022-02-16 07:15:44 -06:00
// DeleteProvisionedDashboard provides a mock function with given fields: ctx, dashboardID, orgID
func ( _m * FakeDashboardProvisioning ) DeleteProvisionedDashboard ( ctx context . Context , dashboardID int64 , orgID int64 ) error {
ret := _m . Called ( ctx , dashboardID , orgID )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , int64 , int64 ) error ) ; ok {
r0 = rf ( ctx , dashboardID , orgID )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2022-11-02 08:15:50 -05:00
// GetProvisionedDashboardData provides a mock function with given fields: ctx, name
2023-01-18 06:52:41 -06:00
func ( _m * FakeDashboardProvisioning ) GetProvisionedDashboardData ( ctx context . Context , name string ) ( [ ] * DashboardProvisioning , error ) {
2022-11-02 08:15:50 -05:00
ret := _m . Called ( ctx , name )
2022-02-16 07:15:44 -06:00
2023-01-18 06:52:41 -06:00
var r0 [ ] * DashboardProvisioning
2023-05-24 09:33:35 -05:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( [ ] * DashboardProvisioning , error ) ) ; ok {
return rf ( ctx , name )
}
2023-01-18 06:52:41 -06:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) [ ] * DashboardProvisioning ) ; ok {
2022-11-02 08:15:50 -05:00
r0 = rf ( ctx , name )
2022-02-16 07:15:44 -06:00
} else {
if ret . Get ( 0 ) != nil {
2023-01-18 06:52:41 -06:00
r0 = ret . Get ( 0 ) . ( [ ] * DashboardProvisioning )
2022-02-16 07:15:44 -06:00
}
}
2022-11-02 08:15:50 -05:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , name )
2022-02-16 07:15:44 -06:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-11-02 08:15:50 -05:00
// GetProvisionedDashboardDataByDashboardID provides a mock function with given fields: ctx, dashboardID
2023-01-18 06:52:41 -06:00
func ( _m * FakeDashboardProvisioning ) GetProvisionedDashboardDataByDashboardID ( ctx context . Context , dashboardID int64 ) ( * DashboardProvisioning , error ) {
2022-11-02 08:15:50 -05:00
ret := _m . Called ( ctx , dashboardID )
2022-02-16 07:15:44 -06:00
2023-01-18 06:52:41 -06:00
var r0 * DashboardProvisioning
2023-05-24 09:33:35 -05:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , int64 ) ( * DashboardProvisioning , error ) ) ; ok {
return rf ( ctx , dashboardID )
}
2023-01-18 06:52:41 -06:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , int64 ) * DashboardProvisioning ) ; ok {
2022-11-02 08:15:50 -05:00
r0 = rf ( ctx , dashboardID )
2022-02-16 07:15:44 -06:00
} else {
if ret . Get ( 0 ) != nil {
2023-01-18 06:52:41 -06:00
r0 = ret . Get ( 0 ) . ( * DashboardProvisioning )
2022-02-16 07:15:44 -06:00
}
}
2022-11-02 08:15:50 -05:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , int64 ) error ) ; ok {
r1 = rf ( ctx , dashboardID )
2022-02-16 07:15:44 -06:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-11-02 08:15:50 -05:00
// GetProvisionedDashboardDataByDashboardUID provides a mock function with given fields: ctx, orgID, dashboardUID
2023-01-18 06:52:41 -06:00
func ( _m * FakeDashboardProvisioning ) GetProvisionedDashboardDataByDashboardUID ( ctx context . Context , orgID int64 , dashboardUID string ) ( * DashboardProvisioning , error ) {
2022-11-02 08:15:50 -05:00
ret := _m . Called ( ctx , orgID , dashboardUID )
2022-02-16 07:15:44 -06:00
2023-01-18 06:52:41 -06:00
var r0 * DashboardProvisioning
2023-05-24 09:33:35 -05:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , int64 , string ) ( * DashboardProvisioning , error ) ) ; ok {
return rf ( ctx , orgID , dashboardUID )
}
2023-01-18 06:52:41 -06:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , int64 , string ) * DashboardProvisioning ) ; ok {
2022-11-02 08:15:50 -05:00
r0 = rf ( ctx , orgID , dashboardUID )
2022-02-16 07:15:44 -06:00
} else {
if ret . Get ( 0 ) != nil {
2023-01-18 06:52:41 -06:00
r0 = ret . Get ( 0 ) . ( * DashboardProvisioning )
2022-02-16 07:15:44 -06:00
}
}
2022-11-02 08:15:50 -05:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , int64 , string ) error ) ; ok {
r1 = rf ( ctx , orgID , dashboardUID )
2022-02-16 07:15:44 -06:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// SaveFolderForProvisionedDashboards provides a mock function with given fields: _a0, _a1
2023-01-16 09:33:55 -06:00
func ( _m * FakeDashboardProvisioning ) SaveFolderForProvisionedDashboards ( _a0 context . Context , _a1 * SaveDashboardDTO ) ( * Dashboard , error ) {
2022-02-16 07:15:44 -06:00
ret := _m . Called ( _a0 , _a1 )
2023-01-16 09:33:55 -06:00
var r0 * Dashboard
2023-05-24 09:33:35 -05:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * SaveDashboardDTO ) ( * Dashboard , error ) ) ; ok {
return rf ( _a0 , _a1 )
}
2023-01-16 09:33:55 -06:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * SaveDashboardDTO ) * Dashboard ) ; ok {
2022-02-16 07:15:44 -06:00
r0 = rf ( _a0 , _a1 )
} else {
if ret . Get ( 0 ) != nil {
2023-01-16 09:33:55 -06:00
r0 = ret . Get ( 0 ) . ( * Dashboard )
2022-02-16 07:15:44 -06:00
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * SaveDashboardDTO ) error ) ; ok {
r1 = rf ( _a0 , _a1 )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// SaveProvisionedDashboard provides a mock function with given fields: ctx, dto, provisioning
2023-01-16 09:33:55 -06:00
func ( _m * FakeDashboardProvisioning ) SaveProvisionedDashboard ( ctx context . Context , dto * SaveDashboardDTO , provisioning * DashboardProvisioning ) ( * Dashboard , error ) {
2022-02-16 07:15:44 -06:00
ret := _m . Called ( ctx , dto , provisioning )
2023-01-16 09:33:55 -06:00
var r0 * Dashboard
2023-05-24 09:33:35 -05:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * SaveDashboardDTO , * DashboardProvisioning ) ( * Dashboard , error ) ) ; ok {
return rf ( ctx , dto , provisioning )
}
2023-01-16 09:33:55 -06:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * SaveDashboardDTO , * DashboardProvisioning ) * Dashboard ) ; ok {
2022-02-16 07:15:44 -06:00
r0 = rf ( ctx , dto , provisioning )
} else {
if ret . Get ( 0 ) != nil {
2023-01-16 09:33:55 -06:00
r0 = ret . Get ( 0 ) . ( * Dashboard )
2022-02-16 07:15:44 -06:00
}
}
2023-01-16 09:33:55 -06:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * SaveDashboardDTO , * DashboardProvisioning ) error ) ; ok {
2022-02-16 07:15:44 -06:00
r1 = rf ( ctx , dto , provisioning )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// UnprovisionDashboard provides a mock function with given fields: ctx, dashboardID
func ( _m * FakeDashboardProvisioning ) UnprovisionDashboard ( ctx context . Context , dashboardID int64 ) error {
ret := _m . Called ( ctx , dashboardID )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , int64 ) error ) ; ok {
r0 = rf ( ctx , dashboardID )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2022-05-17 17:11:55 -05:00
2022-11-02 08:15:50 -05:00
type mockConstructorTestingTNewFakeDashboardProvisioning interface {
mock . TestingT
Cleanup ( func ( ) )
}
// NewFakeDashboardProvisioning creates a new instance of FakeDashboardProvisioning. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewFakeDashboardProvisioning ( t mockConstructorTestingTNewFakeDashboardProvisioning ) * FakeDashboardProvisioning {
2022-05-17 17:11:55 -05:00
mock := & FakeDashboardProvisioning { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}