api

package
v0.0.0-test.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountPublicDashboardRequest

func CountPublicDashboardRequest() func(c *contextmodel.ReqContext)

func RequiresExistingAccessToken

func RequiresExistingAccessToken(publicDashboardService publicdashboards.Service) func(c *contextmodel.ReqContext)

RequiresExistingAccessToken Middleware to enforce that a public dashboards exists before continuing to handler. This method will query the database to ensure that it exists. Use when we want to enforce a public dashboard is valid on an endpoint we do not maintain

func SetPublicDashboardFlag

func SetPublicDashboardFlag(c *contextmodel.ReqContext)

SetPublicDashboardFlag Adds public dashboard flag on context

func SetPublicDashboardOrgIdOnContext

func SetPublicDashboardOrgIdOnContext(publicDashboardService publicdashboards.Service) func(c *contextmodel.ReqContext)

SetPublicDashboardOrgIdOnContext Adds orgId to context based on org of public dashboard

Types

type Api

type Api struct {
	PublicDashboardService publicdashboards.Service
	RouteRegister          routing.RouteRegister
	AccessControl          accesscontrol.AccessControl
	Features               *featuremgmt.FeatureManager
	Log                    log.Logger
}

func (*Api) CreatePublicDashboard

func (api *Api) CreatePublicDashboard(c *contextmodel.ReqContext) response.Response

CreatePublicDashboard Sets public dashboard for dashboard POST /api/dashboards/uid/:dashboardUid/public-dashboards

func (*Api) DeletePublicDashboard

func (api *Api) DeletePublicDashboard(c *contextmodel.ReqContext) response.Response

Delete a public dashboard DELETE /api/dashboards/uid/:dashboardUid/public-dashboards/:uid

func (*Api) GetAnnotations

func (api *Api) GetAnnotations(c *contextmodel.ReqContext) response.Response

GetAnnotations returns annotations for a public dashboard GET /api/public/dashboards/:accessToken/annotations

func (*Api) GetPublicDashboard

func (api *Api) GetPublicDashboard(c *contextmodel.ReqContext) response.Response

GetPublicDashboard Gets public dashboard for dashboard GET /api/dashboards/uid/:dashboardUid/public-dashboards

func (*Api) ListPublicDashboards

func (api *Api) ListPublicDashboards(c *contextmodel.ReqContext) response.Response

ListPublicDashboards Gets list of public dashboards by orgId GET /api/dashboards/public-dashboards

func (*Api) QueryPublicDashboard

func (api *Api) QueryPublicDashboard(c *contextmodel.ReqContext) response.Response

QueryPublicDashboard returns all results for a given panel on a public dashboard POST /api/public/dashboard/:accessToken/panels/:panelId/query

func (*Api) RegisterAPIEndpoints

func (api *Api) RegisterAPIEndpoints()

RegisterAPIEndpoints Registers Endpoints on Grafana Router

func (*Api) UpdatePublicDashboard

func (api *Api) UpdatePublicDashboard(c *contextmodel.ReqContext) response.Response

UpdatePublicDashboard Sets public dashboard for dashboard PATCH /api/dashboards/uid/:dashboardUid/public-dashboards/:uid

func (*Api) ViewPublicDashboard

func (api *Api) ViewPublicDashboard(c *contextmodel.ReqContext) response.Response

ViewPublicDashboard Gets public dashboard GET /api/public/dashboards/:accessToken

Jump to

Keyboard shortcuts

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