2024-01-18 12:12:29 -06:00
// Code generated by mockery v2.36.1. DO NOT EDIT.
2022-07-06 18:51:44 -05:00
package publicdashboards
import (
context "context"
2023-05-29 10:59:29 -05:00
models "github.com/grafana/grafana/pkg/services/publicdashboards/models"
2024-01-18 07:27:09 -06:00
mock "github.com/stretchr/testify/mock"
2022-07-06 18:51:44 -05:00
)
// FakePublicDashboardStore is an autogenerated mock type for the Store type
type FakePublicDashboardStore struct {
mock . Mock
}
2022-11-03 14:30:12 -05:00
// Create provides a mock function with given fields: ctx, cmd
func ( _m * FakePublicDashboardStore ) Create ( ctx context . Context , cmd models . SavePublicDashboardCommand ) ( int64 , error ) {
ret := _m . Called ( ctx , cmd )
var r0 int64
2023-08-25 15:35:22 -05:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , models . SavePublicDashboardCommand ) ( int64 , error ) ) ; ok {
return rf ( ctx , cmd )
}
2022-11-03 14:30:12 -05:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , models . SavePublicDashboardCommand ) int64 ) ; ok {
r0 = rf ( ctx , cmd )
} else {
r0 = ret . Get ( 0 ) . ( int64 )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , models . SavePublicDashboardCommand ) error ) ; ok {
r1 = rf ( ctx , cmd )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2023-03-08 14:54:35 -06:00
// Delete provides a mock function with given fields: ctx, uid
func ( _m * FakePublicDashboardStore ) Delete ( ctx context . Context , uid string ) ( int64 , error ) {
ret := _m . Called ( ctx , uid )
2022-10-31 16:16:07 -05:00
var r0 int64
2023-08-25 15:35:22 -05:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( int64 , error ) ) ; ok {
return rf ( ctx , uid )
}
2023-03-08 14:54:35 -06:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) int64 ) ; ok {
r0 = rf ( ctx , uid )
2022-10-31 16:16:07 -05:00
} else {
r0 = ret . Get ( 0 ) . ( int64 )
}
2023-03-08 14:54:35 -06:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , uid )
2022-10-31 16:16:07 -05:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-10-26 12:49:43 -05:00
// ExistsEnabledByAccessToken provides a mock function with given fields: ctx, accessToken
func ( _m * FakePublicDashboardStore ) ExistsEnabledByAccessToken ( ctx context . Context , accessToken string ) ( bool , error ) {
ret := _m . Called ( ctx , accessToken )
2022-08-10 12:14:48 -05:00
2022-10-26 12:49:43 -05:00
var r0 bool
2023-08-25 15:35:22 -05:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( bool , error ) ) ; ok {
return rf ( ctx , accessToken )
}
2022-10-26 12:49:43 -05:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) bool ) ; ok {
r0 = rf ( ctx , accessToken )
2022-08-10 12:14:48 -05:00
} else {
2022-10-26 12:49:43 -05:00
r0 = ret . Get ( 0 ) . ( bool )
2022-08-10 12:14:48 -05:00
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
2022-10-26 12:49:43 -05:00
r1 = rf ( ctx , accessToken )
2022-07-06 18:51:44 -05:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-10-26 12:49:43 -05:00
// ExistsEnabledByDashboardUid provides a mock function with given fields: ctx, dashboardUid
func ( _m * FakePublicDashboardStore ) ExistsEnabledByDashboardUid ( ctx context . Context , dashboardUid string ) ( bool , error ) {
ret := _m . Called ( ctx , dashboardUid )
2022-07-21 14:56:20 -05:00
2022-10-26 12:49:43 -05:00
var r0 bool
2023-08-25 15:35:22 -05:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( bool , error ) ) ; ok {
return rf ( ctx , dashboardUid )
}
2022-10-26 12:49:43 -05:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) bool ) ; ok {
r0 = rf ( ctx , dashboardUid )
2022-07-21 14:56:20 -05:00
} else {
2022-10-26 12:49:43 -05:00
r0 = ret . Get ( 0 ) . ( bool )
2022-07-21 14:56:20 -05:00
}
2022-10-26 12:49:43 -05:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , dashboardUid )
2022-07-21 14:56:20 -05:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-10-26 12:49:43 -05:00
// Find provides a mock function with given fields: ctx, uid
func ( _m * FakePublicDashboardStore ) Find ( ctx context . Context , uid string ) ( * models . PublicDashboard , error ) {
ret := _m . Called ( ctx , uid )
2022-08-26 14:28:54 -05:00
2022-10-26 12:49:43 -05:00
var r0 * models . PublicDashboard
2023-08-25 15:35:22 -05:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( * models . PublicDashboard , error ) ) ; ok {
return rf ( ctx , uid )
}
2022-10-26 12:49:43 -05:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) * models . PublicDashboard ) ; ok {
r0 = rf ( ctx , uid )
2022-08-26 14:28:54 -05:00
} else {
if ret . Get ( 0 ) != nil {
2022-10-26 12:49:43 -05:00
r0 = ret . Get ( 0 ) . ( * models . PublicDashboard )
2022-08-26 14:28:54 -05:00
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
2022-10-26 12:49:43 -05:00
r1 = rf ( ctx , uid )
2022-08-26 14:28:54 -05:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2023-06-21 08:48:09 -05:00
// FindAllWithPagination provides a mock function with given fields: ctx, query
func ( _m * FakePublicDashboardStore ) FindAllWithPagination ( ctx context . Context , query * models . PublicDashboardListQuery ) ( * models . PublicDashboardListResponseWithPagination , error ) {
ret := _m . Called ( ctx , query )
2022-07-06 18:51:44 -05:00
2023-06-21 08:48:09 -05:00
var r0 * models . PublicDashboardListResponseWithPagination
2023-08-25 15:35:22 -05:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * models . PublicDashboardListQuery ) ( * models . PublicDashboardListResponseWithPagination , error ) ) ; ok {
return rf ( ctx , query )
}
2023-06-21 08:48:09 -05:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * models . PublicDashboardListQuery ) * models . PublicDashboardListResponseWithPagination ) ; ok {
r0 = rf ( ctx , query )
2022-07-06 18:51:44 -05:00
} else {
if ret . Get ( 0 ) != nil {
2023-06-21 08:48:09 -05:00
r0 = ret . Get ( 0 ) . ( * models . PublicDashboardListResponseWithPagination )
2022-07-06 18:51:44 -05:00
}
}
2023-06-21 08:48:09 -05:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * models . PublicDashboardListQuery ) error ) ; ok {
r1 = rf ( ctx , query )
2022-07-06 18:51:44 -05:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-10-26 12:49:43 -05:00
// FindByAccessToken provides a mock function with given fields: ctx, accessToken
func ( _m * FakePublicDashboardStore ) FindByAccessToken ( ctx context . Context , accessToken string ) ( * models . PublicDashboard , error ) {
2022-10-06 15:35:19 -05:00
ret := _m . Called ( ctx , accessToken )
2022-10-26 12:49:43 -05:00
var r0 * models . PublicDashboard
2023-08-25 15:35:22 -05:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( * models . PublicDashboard , error ) ) ; ok {
return rf ( ctx , accessToken )
}
2022-10-26 12:49:43 -05:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) * models . PublicDashboard ) ; ok {
2022-10-06 15:35:19 -05:00
r0 = rf ( ctx , accessToken )
} else {
2022-10-26 12:49:43 -05:00
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * models . PublicDashboard )
}
2022-10-06 15:35:19 -05:00
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , accessToken )
} else {
r1 = ret . Error ( 1 )
2023-03-08 14:54:35 -06:00
}
return r0 , r1
}
2024-01-18 07:27:09 -06:00
// FindByDashboardUid provides a mock function with given fields: ctx, orgId, dashboardUid
func ( _m * FakePublicDashboardStore ) FindByDashboardUid ( ctx context . Context , orgId int64 , dashboardUid string ) ( * models . PublicDashboard , error ) {
ret := _m . Called ( ctx , orgId , dashboardUid )
2023-03-08 14:54:35 -06:00
2024-01-18 07:27:09 -06:00
var r0 * models . PublicDashboard
2023-08-25 15:35:22 -05:00
var r1 error
2024-01-18 07:27:09 -06:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , int64 , string ) ( * models . PublicDashboard , error ) ) ; ok {
return rf ( ctx , orgId , dashboardUid )
2023-08-25 15:35:22 -05:00
}
2024-01-18 07:27:09 -06:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , int64 , string ) * models . PublicDashboard ) ; ok {
r0 = rf ( ctx , orgId , dashboardUid )
2023-03-08 14:54:35 -06:00
} else {
if ret . Get ( 0 ) != nil {
2024-01-18 07:27:09 -06:00
r0 = ret . Get ( 0 ) . ( * models . PublicDashboard )
2023-03-08 14:54:35 -06:00
}
}
2024-01-18 07:27:09 -06:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , int64 , string ) error ) ; ok {
r1 = rf ( ctx , orgId , dashboardUid )
2023-03-08 14:54:35 -06:00
} else {
r1 = ret . Error ( 1 )
2022-10-06 15:35:19 -05:00
}
return r0 , r1
}
2024-01-18 07:27:09 -06:00
// FindByFolder provides a mock function with given fields: ctx, orgId, folderUid
func ( _m * FakePublicDashboardStore ) FindByFolder ( ctx context . Context , orgId int64 , folderUid string ) ( [ ] * models . PublicDashboard , error ) {
ret := _m . Called ( ctx , orgId , folderUid )
2022-10-13 00:36:05 -05:00
2024-01-18 07:27:09 -06:00
var r0 [ ] * models . PublicDashboard
2023-08-25 15:35:22 -05:00
var r1 error
2024-01-18 07:27:09 -06:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , int64 , string ) ( [ ] * models . PublicDashboard , error ) ) ; ok {
return rf ( ctx , orgId , folderUid )
2023-08-25 15:35:22 -05:00
}
2024-01-18 07:27:09 -06:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , int64 , string ) [ ] * models . PublicDashboard ) ; ok {
r0 = rf ( ctx , orgId , folderUid )
2022-10-13 00:36:05 -05:00
} else {
if ret . Get ( 0 ) != nil {
2024-01-18 07:27:09 -06:00
r0 = ret . Get ( 0 ) . ( [ ] * models . PublicDashboard )
2022-10-13 00:36:05 -05:00
}
}
2022-10-26 12:49:43 -05:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , int64 , string ) error ) ; ok {
2024-01-18 07:27:09 -06:00
r1 = rf ( ctx , orgId , folderUid )
2022-10-13 00:36:05 -05:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2023-04-11 12:36:50 -05:00
// GetMetrics provides a mock function with given fields: ctx
func ( _m * FakePublicDashboardStore ) GetMetrics ( ctx context . Context ) ( * models . Metrics , error ) {
ret := _m . Called ( ctx )
var r0 * models . Metrics
2023-08-25 15:35:22 -05:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( * models . Metrics , error ) ) ; ok {
return rf ( ctx )
}
2023-04-11 12:36:50 -05:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) * models . Metrics ) ; ok {
r0 = rf ( ctx )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * models . Metrics )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( ctx )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-10-26 12:49:43 -05:00
// GetOrgIdByAccessToken provides a mock function with given fields: ctx, accessToken
func ( _m * FakePublicDashboardStore ) GetOrgIdByAccessToken ( ctx context . Context , accessToken string ) ( int64 , error ) {
ret := _m . Called ( ctx , accessToken )
2022-07-19 18:44:41 -05:00
2022-10-26 12:49:43 -05:00
var r0 int64
2023-08-25 15:35:22 -05:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( int64 , error ) ) ; ok {
return rf ( ctx , accessToken )
}
2022-10-26 12:49:43 -05:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) int64 ) ; ok {
r0 = rf ( ctx , accessToken )
2022-07-19 18:44:41 -05:00
} else {
2022-10-26 12:49:43 -05:00
r0 = ret . Get ( 0 ) . ( int64 )
2022-07-19 18:44:41 -05:00
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
2022-10-26 12:49:43 -05:00
r1 = rf ( ctx , accessToken )
2022-07-19 18:44:41 -05:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-11-03 14:30:12 -05:00
// Update provides a mock function with given fields: ctx, cmd
func ( _m * FakePublicDashboardStore ) Update ( ctx context . Context , cmd models . SavePublicDashboardCommand ) ( int64 , error ) {
2022-07-06 18:51:44 -05:00
ret := _m . Called ( ctx , cmd )
2022-11-03 14:30:12 -05:00
var r0 int64
2023-08-25 15:35:22 -05:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , models . SavePublicDashboardCommand ) ( int64 , error ) ) ; ok {
return rf ( ctx , cmd )
}
2022-11-03 14:30:12 -05:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , models . SavePublicDashboardCommand ) int64 ) ; ok {
2022-07-06 18:51:44 -05:00
r0 = rf ( ctx , cmd )
} else {
2022-11-03 14:30:12 -05:00
r0 = ret . Get ( 0 ) . ( int64 )
2022-07-06 18:51:44 -05:00
}
2022-11-03 14:30:12 -05:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , models . SavePublicDashboardCommand ) error ) ; ok {
r1 = rf ( ctx , cmd )
2022-07-06 18:51:44 -05:00
} else {
2022-11-03 14:30:12 -05:00
r1 = ret . Error ( 1 )
2022-07-06 18:51:44 -05:00
}
2022-11-03 14:30:12 -05:00
return r0 , r1
2022-07-06 18:51:44 -05:00
}
2023-08-25 15:35:22 -05:00
// NewFakePublicDashboardStore creates a new instance of FakePublicDashboardStore. 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 NewFakePublicDashboardStore ( t interface {
2023-01-16 09:33:55 -06:00
mock . TestingT
Cleanup ( func ( ) )
2023-08-25 15:35:22 -05:00
} ) * FakePublicDashboardStore {
2022-07-06 18:51:44 -05:00
mock := & FakePublicDashboardStore { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}