publicdashboards

package
v0.0.0-...-fb7f86c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakePublicDashboardService

type FakePublicDashboardService struct {
	mock.Mock
}

FakePublicDashboardService is an autogenerated mock type for the Service type

func NewFakePublicDashboardService

func NewFakePublicDashboardService(t mockConstructorTestingTNewFakePublicDashboardService) *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.

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) error

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

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) 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 mockConstructorTestingTNewFakePublicDashboardServiceWrapper) *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.

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 mockConstructorTestingTNewFakePublicDashboardStore) *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.

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) FindByDashboardFolder

func (_m *FakePublicDashboardStore) FindByDashboardFolder(ctx context.Context, dashboard *dashboards.Dashboard) ([]*models.PublicDashboard, error)

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

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) FindDashboard

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

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

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 Service

type Service interface {
	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) 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)
	FindDashboard(ctx context.Context, orgId int64, dashboardUid string) (*dashboards.Dashboard, 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)
	FindByDashboardFolder(ctx context.Context, dashboard *dashboards.Dashboard) ([]*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