Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Replace ¶
func Replace(placeholders map[string]string, dash dashboard.DashboardSpec) (*dashboard.DashboardSpec, error)
Replace replaces the placeholders in a dashboard, with the provided values from the placeholders map. The placeholders must use the following format in the dashboard to be replaced: "{% .placeholder %}". To replace the placeholders we have to convert the dashboard to it's json string representation, which is then passed to the template together with the placeholders. The result is then unmarshaled back to the dashboard struct and returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.