Documentation ¶
Index ¶
Constants ¶
const ( From boundary = iota To )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { GetDashboard(dashName string) (Dashboard, error) GetPanelPng(p Panel, dashName string, t TimeRange) (io.ReadCloser, error) }
Client is a Grafana API client
func NewV4Client ¶
NewV4Client creates a new Grafana 4 Client. If apiToken is the empty string, authorization headers will be omitted from requests. variables are Grafana template variable url values of the form var-{name}={value}, e.g. var-host=dev
func NewV5Client ¶
NewV5Client creates a new Grafana 5 Client. If apiToken is the empty string, authorization headers will be omitted from requests. variables are Grafana template variable url values of the form var-{name}={value}, e.g. var-host=dev
type Dashboard ¶
type Dashboard struct { Title string Description string VariableValues string //Not present in the Grafana JSON structure Rows []Row Panels []Panel }
Dashboard represents a Grafana dashboard
type TimeRange ¶
func NewTimeRange ¶
func (TimeRange) FromFormatted ¶
Formats Grafana 'From' time spec into absolute printable time
func (TimeRange) ToFormatted ¶
Formats Grafana 'To' time spec into absolute printable time