publicdashboards

package
v11.1.4-modfix Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakePublicDashboardMiddleware

type FakePublicDashboardMiddleware struct {
	mock.Mock
}

FakePublicDashboardMiddleware is an autogenerated mock type for the Middleware type

func NewFakePublicDashboardMiddleware

func NewFakePublicDashboardMiddleware(t interface {
	mock.TestingT
	Cleanup(func())
}) *FakePublicDashboardMiddleware

NewFakePublicDashboardMiddleware creates a new instance of FakePublicDashboardMiddleware. 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 (*FakePublicDashboardMiddleware) HandleAccessView

func (_m *FakePublicDashboardMiddleware) HandleAccessView(c *contextmodel.ReqContext)

HandleAccessView provides a mock function with given fields: c

func (*FakePublicDashboardMiddleware) HandleApi

HandleApi provides a mock function with given fields: c

func (*FakePublicDashboardMiddleware) HandleConfirmAccessView

func (_m *FakePublicDashboardMiddleware) HandleConfirmAccessView(c *contextmodel.ReqContext)

HandleConfirmAccessView provides a mock function with given fields: c

func (*FakePublicDashboardMiddleware) HandleView

HandleView provides a mock function with given fields: c

type FakePublicDashboardService

type FakePublicDashboardService struct {
	mock.Mock
}

FakePublicDashboardService is an autogenerated mock type for the Service type

func NewFakePublicDashboardService

func NewFakePublicDashboardService(t interface {
	mock.TestingT
	Cleanup(func())
}) *FakePublicDashboardService

NewFakePublicDashboardService creates a new instance of FakePublicDashboardService. 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 (*FakePublicDashboardService) Create

Create provides a mock function with given fields: ctx, u, dto

func (*FakePublicDashboardService) Delete

func (_m *FakePublicDashboardService) Delete(ctx context.Context, uid string, dashboardUid string) error

Delete provides a mock function with given fields: ctx, uid, dashboardUid

func (*FakePublicDashboardService) DeleteByDashboard

func (_m *FakePublicDashboardService) DeleteByDashboard(ctx context.Context, dashboard *dashboards.Dashboard) error

DeleteByDashboard provides a mock function with given fields: ctx, dashboard

func (*FakePublicDashboardService) ExistsEnabledByAccessToken

func (_m *FakePublicDashboardService) ExistsEnabledByAccessToken(ctx context.Context, accessToken string) (bool, error)

ExistsEnabledByAccessToken provides a mock function with given fields: ctx, accessToken

func (*FakePublicDashboardService) ExistsEnabledByDashboardUid

func (_m *FakePublicDashboardService) ExistsEnabledByDashboardUid(ctx context.Context, dashboardUid string) (bool, error)

ExistsEnabledByDashboardUid provides a mock function with given fields: ctx, dashboardUid

func (*FakePublicDashboardService) Find

Find provides a mock function with given fields: ctx, uid

func (*FakePublicDashboardService) FindAllWithPagination

FindAllWithPagination provides a mock function with given fields: ctx, query

func (*FakePublicDashboardService) FindAnnotations

func (_m *FakePublicDashboardService) FindAnnotations(ctx context.Context, reqDTO models.AnnotationsQueryDTO, accessToken string) ([]models.AnnotationEvent, error)

FindAnnotations provides a mock function with given fields: ctx, reqDTO, accessToken

func (*FakePublicDashboardService) FindByAccessToken

func (_m *FakePublicDashboardService) FindByAccessToken(ctx context.Context, accessToken string) (*models.PublicDashboard, error)

FindByAccessToken provides a mock function with given fields: ctx, accessToken

func (*FakePublicDashboardService) FindByDashboardUid

func (_m *FakePublicDashboardService) FindByDashboardUid(ctx context.Context, orgId int64, dashboardUid string) (*models.PublicDashboard, error)

FindByDashboardUid provides a mock function with given fields: ctx, orgId, dashboardUid

func (*FakePublicDashboardService) FindDashboard

func (_m *FakePublicDashboardService) FindDashboard(ctx context.Context, orgId int64, dashboardUid string) (*dashboards.Dashboard, error)

FindDashboard provides a mock function with given fields: ctx, orgId, dashboardUid

func (*FakePublicDashboardService) FindEnabledPublicDashboardAndDashboardByAccessToken

func (_m *FakePublicDashboardService) FindEnabledPublicDashboardAndDashboardByAccessToken(ctx context.Context, accessToken string) (*models.PublicDashboard, *dashboards.Dashboard, error)

FindEnabledPublicDashboardAndDashboardByAccessToken provides a mock function with given fields: ctx, accessToken

func (*FakePublicDashboardService) FindPublicDashboardAndDashboardByAccessToken

func (_m *FakePublicDashboardService) FindPublicDashboardAndDashboardByAccessToken(ctx context.Context, accessToken string) (*models.PublicDashboard, *dashboards.Dashboard, error)

FindPublicDashboardAndDashboardByAccessToken provides a mock function with given fields: ctx, accessToken

func (*FakePublicDashboardService) GetMetricRequest

func (_m *FakePublicDashboardService) GetMetricRequest(ctx context.Context, dashboard *dashboards.Dashboard, publicDashboard *models.PublicDashboard, panelId int64, reqDTO models.PublicDashboardQueryDTO) (dtos.MetricRequest, error)

GetMetricRequest provides a mock function with given fields: ctx, dashboard, publicDashboard, panelId, reqDTO

func (*FakePublicDashboardService) GetOrgIdByAccessToken

func (_m *FakePublicDashboardService) GetOrgIdByAccessToken(ctx context.Context, accessToken string) (int64, error)

GetOrgIdByAccessToken provides a mock function with given fields: ctx, accessToken

func (*FakePublicDashboardService) GetPublicDashboardForView

func (_m *FakePublicDashboardService) GetPublicDashboardForView(ctx context.Context, accessToken string) (*dtos.DashboardFullWithMeta, error)

GetPublicDashboardForView provides a mock function with given fields: ctx, accessToken

func (*FakePublicDashboardService) GetQueryDataResponse

func (_m *FakePublicDashboardService) GetQueryDataResponse(ctx context.Context, skipDSCache bool, reqDTO models.PublicDashboardQueryDTO, panelId int64, accessToken string) (*backend.QueryDataResponse, error)

GetQueryDataResponse provides a mock function with given fields: ctx, skipDSCache, reqDTO, panelId, accessToken

func (*FakePublicDashboardService) NewPublicDashboardAccessToken

func (_m *FakePublicDashboardService) NewPublicDashboardAccessToken(ctx context.Context) (string, error)

NewPublicDashboardAccessToken provides a mock function with given fields: ctx

func (*FakePublicDashboardService) NewPublicDashboardUid

func (_m *FakePublicDashboardService) NewPublicDashboardUid(ctx context.Context) (string, error)

NewPublicDashboardUid provides a mock function with given fields: ctx

func (*FakePublicDashboardService) Update

Update provides a mock function with given fields: ctx, u, dto

type FakePublicDashboardServiceWrapper

type FakePublicDashboardServiceWrapper struct {
	mock.Mock
}

FakePublicDashboardServiceWrapper is an autogenerated mock type for the ServiceWrapper type

func NewFakePublicDashboardServiceWrapper

func NewFakePublicDashboardServiceWrapper(t interface {
	mock.TestingT
	Cleanup(func())
}) *FakePublicDashboardServiceWrapper

NewFakePublicDashboardServiceWrapper creates a new instance of FakePublicDashboardServiceWrapper. 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 (*FakePublicDashboardServiceWrapper) Delete

Delete provides a mock function with given fields: ctx, uid

func (*FakePublicDashboardServiceWrapper) FindByDashboardUid

func (_m *FakePublicDashboardServiceWrapper) FindByDashboardUid(ctx context.Context, orgId int64, dashboardUid string) (*models.PublicDashboard, error)

FindByDashboardUid provides a mock function with given fields: ctx, orgId, dashboardUid

type FakePublicDashboardStore

type FakePublicDashboardStore struct {
	mock.Mock
}

FakePublicDashboardStore is an autogenerated mock type for the Store type

func NewFakePublicDashboardStore

func NewFakePublicDashboardStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *FakePublicDashboardStore

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 (*FakePublicDashboardStore) Create

Create provides a mock function with given fields: ctx, cmd

func (*FakePublicDashboardStore) Delete

func (_m *FakePublicDashboardStore) Delete(ctx context.Context, uid string) (int64, error)

Delete provides a mock function with given fields: ctx, uid

func (*FakePublicDashboardStore) ExistsEnabledByAccessToken

func (_m *FakePublicDashboardStore) ExistsEnabledByAccessToken(ctx context.Context, accessToken string) (bool, error)

ExistsEnabledByAccessToken provides a mock function with given fields: ctx, accessToken

func (*FakePublicDashboardStore) ExistsEnabledByDashboardUid

func (_m *FakePublicDashboardStore) ExistsEnabledByDashboardUid(ctx context.Context, dashboardUid string) (bool, error)

ExistsEnabledByDashboardUid provides a mock function with given fields: ctx, dashboardUid

func (*FakePublicDashboardStore) Find

Find provides a mock function with given fields: ctx, uid

func (*FakePublicDashboardStore) FindAllWithPagination

FindAllWithPagination provides a mock function with given fields: ctx, query

func (*FakePublicDashboardStore) FindByAccessToken

func (_m *FakePublicDashboardStore) FindByAccessToken(ctx context.Context, accessToken string) (*models.PublicDashboard, error)

FindByAccessToken provides a mock function with given fields: ctx, accessToken

func (*FakePublicDashboardStore) FindByDashboardUid

func (_m *FakePublicDashboardStore) FindByDashboardUid(ctx context.Context, orgId int64, dashboardUid string) (*models.PublicDashboard, error)

FindByDashboardUid provides a mock function with given fields: ctx, orgId, dashboardUid

func (*FakePublicDashboardStore) FindByFolder

func (_m *FakePublicDashboardStore) FindByFolder(ctx context.Context, orgId int64, folderUid string) ([]*models.PublicDashboard, error)

FindByFolder provides a mock function with given fields: ctx, orgId, folderUid

func (*FakePublicDashboardStore) GetMetrics

func (_m *FakePublicDashboardStore) GetMetrics(ctx context.Context) (*models.Metrics, error)

GetMetrics provides a mock function with given fields: ctx

func (*FakePublicDashboardStore) GetOrgIdByAccessToken

func (_m *FakePublicDashboardStore) GetOrgIdByAccessToken(ctx context.Context, accessToken string) (int64, error)

GetOrgIdByAccessToken provides a mock function with given fields: ctx, accessToken

func (*FakePublicDashboardStore) Update

Update provides a mock function with given fields: ctx, cmd

type Middleware

type Middleware interface {
	HandleApi(c *contextmodel.ReqContext)
	HandleView(c *contextmodel.ReqContext)
	HandleAccessView(c *contextmodel.ReqContext)
	HandleConfirmAccessView(c *contextmodel.ReqContext)
}

type Service

type Service interface {
	GetPublicDashboardForView(ctx context.Context, accessToken string) (*dtos.DashboardFullWithMeta, error)
	FindPublicDashboardAndDashboardByAccessToken(ctx context.Context, accessToken string) (*PublicDashboard, *dashboards.Dashboard, error)
	FindEnabledPublicDashboardAndDashboardByAccessToken(ctx context.Context, accessToken string) (*PublicDashboard, *dashboards.Dashboard, error)
	FindByAccessToken(ctx context.Context, accessToken string) (*PublicDashboard, error)
	FindByDashboardUid(ctx context.Context, orgId int64, dashboardUid string) (*PublicDashboard, error)
	FindAnnotations(ctx context.Context, reqDTO AnnotationsQueryDTO, accessToken string) ([]AnnotationEvent, error)
	FindDashboard(ctx context.Context, orgId int64, dashboardUid string) (*dashboards.Dashboard, error)
	FindAllWithPagination(ctx context.Context, query *PublicDashboardListQuery) (*PublicDashboardListResponseWithPagination, error)
	Find(ctx context.Context, uid string) (*PublicDashboard, error)
	Create(ctx context.Context, u *user.SignedInUser, dto *SavePublicDashboardDTO) (*PublicDashboard, error)
	Update(ctx context.Context, u *user.SignedInUser, dto *SavePublicDashboardDTO) (*PublicDashboard, error)
	Delete(ctx context.Context, uid string, dashboardUid string) error
	DeleteByDashboard(ctx context.Context, dashboard *dashboards.Dashboard) error

	GetMetricRequest(ctx context.Context, dashboard *dashboards.Dashboard, publicDashboard *PublicDashboard, panelId int64, reqDTO PublicDashboardQueryDTO) (dtos.MetricRequest, error)
	GetQueryDataResponse(ctx context.Context, skipDSCache bool, reqDTO PublicDashboardQueryDTO, panelId int64, accessToken string) (*backend.QueryDataResponse, error)
	GetOrgIdByAccessToken(ctx context.Context, accessToken string) (int64, error)
	NewPublicDashboardAccessToken(ctx context.Context) (string, error)
	NewPublicDashboardUid(ctx context.Context) (string, error)

	ExistsEnabledByAccessToken(ctx context.Context, accessToken string) (bool, error)
	ExistsEnabledByDashboardUid(ctx context.Context, dashboardUid string) (bool, error)
}

type ServiceWrapper

type ServiceWrapper interface {
	FindByDashboardUid(ctx context.Context, orgId int64, dashboardUid string) (*PublicDashboard, error)
	Delete(ctx context.Context, uid string) error
}

ServiceWrapper these methods have different behavior between OSS and Enterprise. The latter would call the OSS service first

type Store

type Store interface {
	Find(ctx context.Context, uid string) (*PublicDashboard, error)
	FindByAccessToken(ctx context.Context, accessToken string) (*PublicDashboard, error)
	FindByDashboardUid(ctx context.Context, orgId int64, dashboardUid string) (*PublicDashboard, error)
	FindAllWithPagination(ctx context.Context, query *PublicDashboardListQuery) (*PublicDashboardListResponseWithPagination, error)
	Create(ctx context.Context, cmd SavePublicDashboardCommand) (int64, error)
	Update(ctx context.Context, cmd SavePublicDashboardCommand) (int64, error)
	Delete(ctx context.Context, uid string) (int64, error)

	GetOrgIdByAccessToken(ctx context.Context, accessToken string) (int64, error)
	FindByFolder(ctx context.Context, orgId int64, folderUid string) ([]*PublicDashboard, error)
	ExistsEnabledByAccessToken(ctx context.Context, accessToken string) (bool, error)
	ExistsEnabledByDashboardUid(ctx context.Context, dashboardUid string) (bool, error)
	GetMetrics(ctx context.Context) (*Metrics, error)
}

Directories

Path Synopsis
commands

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL