database

package
v0.0.0-kmdagger1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogPrefix = "publicdashboards.store"

Functions

This section is empty.

Types

type PublicDashboardStoreImpl

type PublicDashboardStoreImpl struct {
	// contains filtered or unexported fields
}

Define the storage implementation. We're generating the mock implementation automatically

func ProvideStore

func ProvideStore(sqlStore db.DB) *PublicDashboardStoreImpl

Factory used by wire to dependency injection

func (*PublicDashboardStoreImpl) Create

func (d *PublicDashboardStoreImpl) Create(ctx context.Context, cmd SavePublicDashboardCommand) (int64, error)

Creates a public dashboard

func (*PublicDashboardStoreImpl) Delete

func (d *PublicDashboardStoreImpl) Delete(ctx context.Context, uid string) (int64, error)

Deletes a public dashboard

func (*PublicDashboardStoreImpl) ExistsEnabledByAccessToken

func (d *PublicDashboardStoreImpl) ExistsEnabledByAccessToken(ctx context.Context, accessToken string) (bool, error)

ExistsEnabledByAccessToken Responds true if the accessToken exists and the public dashboard is enabled

func (*PublicDashboardStoreImpl) ExistsEnabledByDashboardUid

func (d *PublicDashboardStoreImpl) ExistsEnabledByDashboardUid(ctx context.Context, dashboardUid string) (bool, error)

ExistsEnabledByDashboardUid Responds true if there is an enabled public dashboard for a dashboard uid

func (*PublicDashboardStoreImpl) Find

func (d *PublicDashboardStoreImpl) Find(ctx context.Context, uid string) (*PublicDashboard, error)

Find Returns public dashboard by Uid or nil if not found

func (*PublicDashboardStoreImpl) FindAll

func (d *PublicDashboardStoreImpl) FindAll(ctx context.Context, orgId int64) ([]PublicDashboardListResponse, error)

FindAll Returns a list of public dashboards by orgId

func (*PublicDashboardStoreImpl) FindByAccessToken

func (d *PublicDashboardStoreImpl) FindByAccessToken(ctx context.Context, accessToken string) (*PublicDashboard, error)

FindByAccessToken Returns public dashboard by access token or nil if not found

func (*PublicDashboardStoreImpl) FindByDashboardFolder

func (d *PublicDashboardStoreImpl) FindByDashboardFolder(ctx context.Context, dashboard *dashboards.Dashboard) ([]*PublicDashboard, error)

func (*PublicDashboardStoreImpl) FindByDashboardUid

func (d *PublicDashboardStoreImpl) FindByDashboardUid(ctx context.Context, orgId int64, dashboardUid string) (*PublicDashboard, error)

FindByDashboardUid Retrieves public dashboard by dashboard uid or nil if not found

func (*PublicDashboardStoreImpl) FindDashboard

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

FindDashboard returns a dashboard by orgId and dashboardUid

func (*PublicDashboardStoreImpl) GetMetrics

func (d *PublicDashboardStoreImpl) GetMetrics(ctx context.Context) (*Metrics, error)

func (*PublicDashboardStoreImpl) GetOrgIdByAccessToken

func (d *PublicDashboardStoreImpl) GetOrgIdByAccessToken(ctx context.Context, accessToken string) (int64, error)

GetOrgIdByAccessToken Returns the public dashboard OrgId if exists.

func (*PublicDashboardStoreImpl) Update

func (d *PublicDashboardStoreImpl) Update(ctx context.Context, cmd SavePublicDashboardCommand) (int64, error)

Updates existing public dashboard

Jump to

Keyboard shortcuts

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