2022-07-19 18:44:41 -05:00
// Code generated by mockery v2.12.1. DO NOT EDIT.
2022-07-06 18:51:44 -05:00
package publicdashboards
import (
context "context"
2022-07-21 14:56:20 -05:00
models "github.com/grafana/grafana/pkg/models"
2022-07-06 18:51:44 -05:00
mock "github.com/stretchr/testify/mock"
2022-07-21 14:56:20 -05:00
publicdashboardsmodels "github.com/grafana/grafana/pkg/services/publicdashboards/models"
2022-07-06 18:51:44 -05:00
testing "testing"
)
// FakePublicDashboardStore is an autogenerated mock type for the Store type
type FakePublicDashboardStore struct {
mock . Mock
}
2022-08-10 12:14:48 -05:00
// AccessTokenExists provides a mock function with given fields: ctx, accessToken
func ( _m * FakePublicDashboardStore ) AccessTokenExists ( ctx context . Context , accessToken string ) ( bool , error ) {
ret := _m . Called ( ctx , accessToken )
var r0 bool
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) bool ) ; ok {
r0 = rf ( ctx , accessToken )
} else {
r0 = ret . Get ( 0 ) . ( bool )
}
var r1 error
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , accessToken )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-07-06 18:51:44 -05:00
// GenerateNewPublicDashboardUid provides a mock function with given fields: ctx
func ( _m * FakePublicDashboardStore ) GenerateNewPublicDashboardUid ( ctx context . Context ) ( string , error ) {
ret := _m . Called ( ctx )
var r0 string
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) string ) ; ok {
r0 = rf ( ctx )
} else {
r0 = ret . Get ( 0 ) . ( string )
}
var r1 error
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( ctx )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-07-21 14:56:20 -05:00
// GetDashboard provides a mock function with given fields: ctx, dashboardUid
func ( _m * FakePublicDashboardStore ) GetDashboard ( ctx context . Context , dashboardUid string ) ( * models . Dashboard , error ) {
ret := _m . Called ( ctx , dashboardUid )
var r0 * models . Dashboard
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) * models . Dashboard ) ; ok {
r0 = rf ( ctx , dashboardUid )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * models . Dashboard )
}
}
var r1 error
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , dashboardUid )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-07-06 18:51:44 -05:00
// GetPublicDashboard provides a mock function with given fields: ctx, accessToken
2022-07-21 14:56:20 -05:00
func ( _m * FakePublicDashboardStore ) GetPublicDashboard ( ctx context . Context , accessToken string ) ( * publicdashboardsmodels . PublicDashboard , * models . Dashboard , error ) {
2022-07-06 18:51:44 -05:00
ret := _m . Called ( ctx , accessToken )
2022-07-21 14:56:20 -05:00
var r0 * publicdashboardsmodels . PublicDashboard
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) * publicdashboardsmodels . PublicDashboard ) ; ok {
2022-07-06 18:51:44 -05:00
r0 = rf ( ctx , accessToken )
} else {
if ret . Get ( 0 ) != nil {
2022-07-21 14:56:20 -05:00
r0 = ret . Get ( 0 ) . ( * publicdashboardsmodels . PublicDashboard )
2022-07-06 18:51:44 -05:00
}
}
2022-07-21 14:56:20 -05:00
var r1 * models . Dashboard
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) * models . Dashboard ) ; ok {
2022-07-06 18:51:44 -05:00
r1 = rf ( ctx , accessToken )
} else {
if ret . Get ( 1 ) != nil {
2022-07-21 14:56:20 -05:00
r1 = ret . Get ( 1 ) . ( * models . Dashboard )
2022-07-06 18:51:44 -05:00
}
}
var r2 error
if rf , ok := ret . Get ( 2 ) . ( func ( context . Context , string ) error ) ; ok {
r2 = rf ( ctx , accessToken )
} else {
r2 = ret . Error ( 2 )
}
return r0 , r1 , r2
}
2022-08-26 14:28:54 -05:00
// GetPublicDashboardByUid provides a mock function with given fields: ctx, uid
func ( _m * FakePublicDashboardStore ) GetPublicDashboardByUid ( ctx context . Context , uid string ) ( * publicdashboardsmodels . PublicDashboard , error ) {
ret := _m . Called ( ctx , uid )
var r0 * publicdashboardsmodels . PublicDashboard
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) * publicdashboardsmodels . PublicDashboard ) ; ok {
r0 = rf ( ctx , uid )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * publicdashboardsmodels . PublicDashboard )
}
}
var r1 error
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , uid )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-07-06 18:51:44 -05:00
// GetPublicDashboardConfig provides a mock function with given fields: ctx, orgId, dashboardUid
2022-07-21 14:56:20 -05:00
func ( _m * FakePublicDashboardStore ) GetPublicDashboardConfig ( ctx context . Context , orgId int64 , dashboardUid string ) ( * publicdashboardsmodels . PublicDashboard , error ) {
2022-07-06 18:51:44 -05:00
ret := _m . Called ( ctx , orgId , dashboardUid )
2022-07-21 14:56:20 -05:00
var r0 * publicdashboardsmodels . PublicDashboard
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , int64 , string ) * publicdashboardsmodels . PublicDashboard ) ; ok {
2022-07-06 18:51:44 -05:00
r0 = rf ( ctx , orgId , dashboardUid )
} else {
if ret . Get ( 0 ) != nil {
2022-07-21 14:56:20 -05:00
r0 = ret . Get ( 0 ) . ( * publicdashboardsmodels . PublicDashboard )
2022-07-06 18:51:44 -05:00
}
}
var r1 error
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
}
2022-10-06 15:35:19 -05:00
// GetPublicDashboardOrgId provides a mock function with given fields: ctx, accessToken
func ( _m * FakePublicDashboardStore ) GetPublicDashboardOrgId ( ctx context . Context , accessToken string ) ( int64 , error ) {
ret := _m . Called ( ctx , accessToken )
var r0 int64
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) int64 ) ; ok {
r0 = rf ( ctx , accessToken )
} else {
r0 = ret . Get ( 0 ) . ( int64 )
}
var r1 error
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , accessToken )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-07-19 18:44:41 -05:00
// PublicDashboardEnabled provides a mock function with given fields: ctx, dashboardUid
func ( _m * FakePublicDashboardStore ) PublicDashboardEnabled ( ctx context . Context , dashboardUid string ) ( bool , error ) {
ret := _m . Called ( ctx , dashboardUid )
var r0 bool
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) bool ) ; ok {
r0 = rf ( ctx , dashboardUid )
} else {
r0 = ret . Get ( 0 ) . ( bool )
}
var r1 error
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , dashboardUid )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-07-06 18:51:44 -05:00
// SavePublicDashboardConfig provides a mock function with given fields: ctx, cmd
2022-08-26 14:28:54 -05:00
func ( _m * FakePublicDashboardStore ) SavePublicDashboardConfig ( ctx context . Context , cmd publicdashboardsmodels . SavePublicDashboardConfigCommand ) error {
2022-07-06 18:51:44 -05:00
ret := _m . Called ( ctx , cmd )
2022-08-26 14:28:54 -05:00
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , publicdashboardsmodels . SavePublicDashboardConfigCommand ) error ) ; ok {
2022-07-06 18:51:44 -05:00
r0 = rf ( ctx , cmd )
} else {
2022-08-26 14:28:54 -05:00
r0 = ret . Error ( 0 )
2022-07-06 18:51:44 -05:00
}
2022-08-26 14:28:54 -05:00
return r0
2022-07-06 18:51:44 -05:00
}
// UpdatePublicDashboardConfig provides a mock function with given fields: ctx, cmd
2022-07-21 14:56:20 -05:00
func ( _m * FakePublicDashboardStore ) UpdatePublicDashboardConfig ( ctx context . Context , cmd publicdashboardsmodels . SavePublicDashboardConfigCommand ) error {
2022-07-06 18:51:44 -05:00
ret := _m . Called ( ctx , cmd )
var r0 error
2022-07-21 14:56:20 -05:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , publicdashboardsmodels . SavePublicDashboardConfigCommand ) error ) ; ok {
2022-07-06 18:51:44 -05:00
r0 = rf ( ctx , cmd )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// NewFakePublicDashboardStore creates a new instance of FakePublicDashboardStore. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
func NewFakePublicDashboardStore ( t testing . TB ) * FakePublicDashboardStore {
mock := & FakePublicDashboardStore { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}