grafana

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SharedOrg = Organization{
	ID:        1,
	Name:      "Shared Org",
	TenantIDs: []string{"giantswarm"},
}

Functions

func ConfigureSSOSettings added in v0.10.2

func ConfigureSSOSettings(ctx context.Context, grafanaAPI *client.GrafanaHTTPAPI, organizations []Organization) error

func DeleteOrganization added in v0.10.0

func DeleteOrganization(ctx context.Context, grafanaAPI *client.GrafanaHTTPAPI, organization Organization) error

func PublishDashboard added in v0.11.0

func PublishDashboard(grafanaAPI *client.GrafanaHTTPAPI, dashboard map[string]any) error

PublishDashboard creates or updates a dashboard in Grafana

func UpsertOrganization added in v0.13.1

func UpsertOrganization(ctx context.Context, grafanaAPI *client.GrafanaHTTPAPI, organization *Organization) error

Types

type Datasource

type Datasource struct {
	ID        int64
	Name      string
	IsDefault bool
	Type      string
	URL       string
	Access    string
	JSONData  map[string]interface{}
}

func ConfigureDefaultDatasources

func ConfigureDefaultDatasources(ctx context.Context, grafanaAPI *client.GrafanaHTTPAPI, organization Organization) ([]Datasource, error)

type Organization

type Organization struct {
	ID        int64
	Name      string
	TenantIDs []string
	Admins    []string
	Editors   []string
	Viewers   []string
}

func FindOrgByName added in v0.11.0

func FindOrgByName(grafanaAPI *client.GrafanaHTTPAPI, name string) (*Organization, error)

FindOrgByName is a wrapper function used to find a Grafana organization by its name

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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