dashboard

package
v0.0.0-...-6e2cd59 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: Apache-2.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 DashConf

type DashConf struct {
	Uid    string `json:"uid"`
	Panels []struct {
		Id    int    `json:"id"`
		Title string `json:"title"`
	} `json:"panels"`
	Templating struct {
		List []struct {
			Name string `json:"name"`
		}
	}
}

Represents the configuration of a Grafana dashboard

type DashCreate

type DashCreate struct {
	Dashboard interface{} `json:"dashboard"`
	FolderId  int         `json:"folderId"`
	Message   string      `json:"message"`
	Overwrite bool        `json:"overwrite"`
}

Represents fields for the json payload to create the dashboard

type Dashboard

type Dashboard struct {
	BaseUrl string `json:"url"`
	Panels  []struct {
		Id    int    `json:"id"`
		Title string `json:"title"`
	} `json:"panels"`
	VarNames []string `json:"fields"`
}

Represents fields to form ipanels for embedding the grafana dashboard

func NewDashboard

func NewDashboard() (*Dashboard, error)

Creates a new Grafana dashboard config If the diago grafana dashboard doesnt exist, then a new one is created using the Grafana API, esle the existing onces configurations are fetched

func (*Dashboard) ToJSON

func (d *Dashboard) ToJSON() ([]byte, error)

returns the json version of Dashboard struct

Jump to

Keyboard shortcuts

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