Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderDashboard ¶
func RenderDashboard(body []byte, vars RenderVars) ([]byte, error)
RenderDashboard will render the Grafana dashboard with variables.
func RenderDashboardWithTemplate ¶
func RenderDashboardWithTemplate(config UpdateConfig, vars RenderVars) error
RenderDashboardWithTemplate renders the grafana dashboard with predefined variables statically. It's similar to the normal grafana dashboard rendering but it will support alerts with template variables.
Types ¶
type RenderVars ¶
type RenderVars []Var
RenderVars is the variables used to render the Grafana dashboard
func (RenderVars) GetGlobalContext ¶
func (vars RenderVars) GetGlobalContext() map[string]string
GetGlobalContext returns the global context made by the name-value pairs, if the var has multiple values, pick the first one.
type UpdateConfig ¶
Click to show internal directories.
Click to hide internal directories.