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") )
Functions ¶
This section is empty.
Types ¶
type Dashboard ¶
type Dashboard struct { Title string `json:"title"` Description string `json:"description"` VariableValues string // Not present in the Grafana JSON structure. Enriched data passed used by the Tex templating RowOrPanels []RowOrPanel `json:"panels"` Panels []Panel }
Dashboard represents a Grafana dashboard This is both used to unmarshal the dashboard JSON into and then enriched (sanitize fields for TeX consumption and add VarialbeValues).
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 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 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.