publicdashboards

package
v0.0.1-test Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 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 FakePublicDashboardService

type FakePublicDashboardService struct {
	mock.Mock
}

FakePublicDashboardService is an autogenerated mock type for the Service type

func NewFakePublicDashboardService

func NewFakePublicDashboardService(t testing.TB) *FakePublicDashboardService

NewFakePublicDashboardService creates a new instance of FakePublicDashboardService. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.

func (*FakePublicDashboardService) AccessTokenExists

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

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

func (*FakePublicDashboardService) BuildAnonymousUser

func (_m *FakePublicDashboardService) BuildAnonymousUser(ctx context.Context, dashboard *models.Dashboard) (*user.SignedInUser, error)

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

func (*FakePublicDashboardService) GetDashboard

func (_m *FakePublicDashboardService) GetDashboard(ctx context.Context, dashboardUid string) (*models.Dashboard, error)

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

func (*FakePublicDashboardService) GetMetricRequest

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

func (*FakePublicDashboardService) GetPublicDashboard

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

func (*FakePublicDashboardService) GetPublicDashboardConfig

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

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

func (*FakePublicDashboardService) GetQueryDataResponse

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

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

func (*FakePublicDashboardService) PublicDashboardEnabled

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

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

func (*FakePublicDashboardService) SavePublicDashboardConfig

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

type FakePublicDashboardStore

type FakePublicDashboardStore struct {
	mock.Mock
}

FakePublicDashboardStore is an autogenerated mock type for the Store type

func NewFakePublicDashboardStore

func NewFakePublicDashboardStore(t testing.TB) *FakePublicDashboardStore

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

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

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

func (*FakePublicDashboardStore) GenerateNewPublicDashboardUid

func (_m *FakePublicDashboardStore) GenerateNewPublicDashboardUid(ctx context.Context) (string, error)

GenerateNewPublicDashboardUid provides a mock function with given fields: ctx

func (*FakePublicDashboardStore) GetDashboard

func (_m *FakePublicDashboardStore) GetDashboard(ctx context.Context, dashboardUid string) (*models.Dashboard, error)

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

func (*FakePublicDashboardStore) GetPublicDashboard

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

func (*FakePublicDashboardStore) GetPublicDashboardByUid

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

func (*FakePublicDashboardStore) GetPublicDashboardConfig

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

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

func (*FakePublicDashboardStore) PublicDashboardEnabled

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

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

func (*FakePublicDashboardStore) SavePublicDashboardConfig

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

func (*FakePublicDashboardStore) UpdatePublicDashboardConfig

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

type Service

type Service interface {
	AccessTokenExists(ctx context.Context, accessToken string) (bool, error)
	BuildAnonymousUser(ctx context.Context, dashboard *models.Dashboard) (*user.SignedInUser, error)
	GetPublicDashboard(ctx context.Context, accessToken string) (*PublicDashboard, *models.Dashboard, error)
	GetDashboard(ctx context.Context, dashboardUid string) (*models.Dashboard, error)
	GetMetricRequest(ctx context.Context, dashboard *models.Dashboard, publicDashboard *PublicDashboard, panelId int64, reqDTO PublicDashboardQueryDTO) (dtos.MetricRequest, error)
	GetPublicDashboardConfig(ctx context.Context, orgId int64, dashboardUid string) (*PublicDashboard, error)
	GetQueryDataResponse(ctx context.Context, skipCache bool, reqDTO PublicDashboardQueryDTO, panelId int64, accessToken string) (*backend.QueryDataResponse, error)
	PublicDashboardEnabled(ctx context.Context, dashboardUid string) (bool, error)
	SavePublicDashboardConfig(ctx context.Context, u *user.SignedInUser, dto *SavePublicDashboardConfigDTO) (*PublicDashboard, error)
}

type Store

type Store interface {
	AccessTokenExists(ctx context.Context, accessToken string) (bool, error)
	GetDashboard(ctx context.Context, dashboardUid string) (*models.Dashboard, error)
	GenerateNewPublicDashboardUid(ctx context.Context) (string, error)
	GetPublicDashboard(ctx context.Context, accessToken string) (*PublicDashboard, *models.Dashboard, error)
	GetPublicDashboardByUid(ctx context.Context, uid string) (*PublicDashboard, error)
	GetPublicDashboardConfig(ctx context.Context, orgId int64, dashboardUid string) (*PublicDashboard, error)
	PublicDashboardEnabled(ctx context.Context, dashboardUid string) (bool, error)
	SavePublicDashboardConfig(ctx context.Context, cmd SavePublicDashboardConfigCommand) error
	UpdatePublicDashboardConfig(ctx context.Context, cmd SavePublicDashboardConfigCommand) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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