puller

package
v0.0.0-...-cc69b76 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

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 GetGrafanaFileVersion(client *grafana.Client, cfg *config.Config) (dashURIs []string, grafanaVersionFile grafana.VersionFile, err error)

func PullGrafanaAndCommit

func PullGrafanaAndCommit(client *grafana.Client, cfg *config.Config) (err error)

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.

func SyncPath

func SyncPath(cfg *config.Config) (syncPath string)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL