Documentation ¶
Index ¶
Constants ¶
View Source
const ( From boundary = iota To )
Variables ¶
View Source
var ( ErrNoPanels = errors.New("no panels found in browser data") ErrNoDashboardData = errors.New("no dashboard data found") ErrJavaScriptReturnedNoData = errors.New("javascript did not return any dashboard data") ErrDashboardHTTPError = errors.New("dashboard request does not return 200 OK") ErrEmptyBlobURL = errors.New("empty blob URL") ErrEmptyCSVData = errors.New("empty csv data") )
Functions ¶
This section is empty.
Types ¶
type Dashboard ¶
type Dashboard struct {
// contains filtered or unexported fields
}
Dashboard represents a Grafana dashboard resource.
func New ¶
func New(logger log.Logger, conf *config.Config, httpClient *http.Client, chromeInstance chrome.Instance, pools worker.Pools, appURL, appVersion string, model *Model, authHeader http.Header, ) *Dashboard
New creates a new instance of the Dashboard struct.
type GridPos ¶
type GridPos struct { H float64 `json:"h"` W float64 `json:"w"` X float64 `json:"x"` Y float64 `json:"y"` }
GridPos represents a Grafana dashboard panel position.
type Model ¶ added in v1.7.1
type Model struct { Meta struct { FolderUID string `json:"folderUid"` FolderTitle string `json:"folderTitle"` FolderURL string `json:"folderUrl"` } `json:"meta"` Dashboard struct { ID int `json:"id"` UID string `json:"uid"` Title string `json:"title"` Description string `json:"description"` RowOrPanels []RowOrPanel `json:"panels"` Panels []Panel Variables url.Values } `json:"dashboard"` }
Model represents a Grafana JSON dashboard.
type Panel ¶
type Panel struct { ID string `json:"-"` Type string `json:"type"` Title string `json:"title"` GridPos GridPos `json:"gridPos"` EncodedImage PanelImage CSVData CSVData }
Panel represents a Grafana dashboard panel.
func (Panel) IsPartialWidth ¶
IsPartialWidth If panel has width less than total allowable width.
func (Panel) IsSingleStat ¶
IsSingleStat returns true if panel is of type SingleStat.
func (*Panel) UnmarshalJSON ¶ added in v1.7.0
type PanelImage ¶
func (PanelImage) String ¶
func (p PanelImage) String() string
type PanelTable ¶ added in v1.7.1
type PanelTable struct { Title string Data PanelTableData }
type PanelTableData ¶ added in v1.7.1
type PanelTableData [][]string
type RowOrPanel ¶
RowOrPanel represents a container for Panels.
type TimeRange ¶
func NewTimeRange ¶
NewTimeRange creates a new TimeRange struct.
func (TimeRange) FromFormatted ¶
Formats Grafana 'From' time spec into absolute printable time.
Click to show internal directories.
Click to hide internal directories.