Documentation ¶
Index ¶
- func GetDashboardsVersions(clonePath string, versionsFile string) (versions grafana.VersionFile, err error)
- func GetGrafanaFileVersion(client *grafana.Client, cfg *config.Config) (dashURIs []string, grafanaVersionFile grafana.VersionFile, err error)
- func PullGrafanaAndCommit(client *grafana.Client, cfg *config.Config) (err error)
- func SyncPath(cfg *config.Config) (syncPath string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDashboardsVersions ¶
func GetDashboardsVersions(clonePath string, versionsFile string) (versions grafana.VersionFile, err error)
getDashboardsVersions reads the "versions.json" file at the root of the git repository and returns its content as a map. If the file doesn't exist, returns an empty map. Return an error if there was an issue looking for the file (except when the file doesn't exist), reading it or formatting its content into a map.
func GetGrafanaFileVersion ¶
func PullGrafanaAndCommit ¶
PullGrafanaAndCommit pulls all the dashboards from Grafana except the ones which name starts with "test", then commits each of them to Git except for those that have a newer or equal version number already versioned in the repo.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.