dashboard

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0, BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildEmbeddingLink(scheme, host, dashboardUrl string, useRange bool, from, to int64, panelId uint) string

func NewService

func NewService(config *GrafanaConfig) (*dashboardService, error)

Types

type Address

type Address struct {
	Scheme string
	Host   string
}

type Auth

type Auth struct {
	APIKey   string
	Username string
	Password string
}

type DashboardPanel

type DashboardPanel struct {
	EmbeddingLink string `json:"embeddingLink,omitempty"`
	Title         string `json:"title,omitempty"`
}

type GrafanaConfig

type GrafanaConfig struct {
	Address
	Auth
}

type PanelList

type PanelList struct {
	TotalCount int32             `json:"totalCount"`
	Items      []*DashboardPanel `json:"items"`
}

type Service

type Service interface {
	Dashboards(ctx context.Context) ([]grafanasdk.FoundBoard, error)
	PanelEmbeddings(ctx context.Context, useRange bool, from time.Time, to time.Time) (*PanelList, error)
}

DashboardSrv is not used now. front end can get the grafana embedding directly

Jump to

Keyboard shortcuts

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