grafana

package
v0.0.0-...-2c9d471 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	UID       string `json:"uid"`
	Title     string `json:"title"`
	RuleGroup string `json:"ruleGroup"`
}

type Dashboard

type Dashboard struct {
	UID         string `json:"uid"`
	Title       string `json:"title"`
	FolderTitle string `json:"folderTitle"`
	Type        string `json:"type"`
}

type GrafanaClient

type GrafanaClient struct {
	// contains filtered or unexported fields
}

func NewGrafanaClient

func NewGrafanaClient(
	apiURL string,
	apiToken string,
) *GrafanaClient

func (*GrafanaClient) GetAlertAsPrettyJSON

func (c *GrafanaClient) GetAlertAsPrettyJSON(uid string) ([]byte, error)

func (*GrafanaClient) GetAlertContactPointsAsPrettyJSON

func (c *GrafanaClient) GetAlertContactPointsAsPrettyJSON() ([]byte, error)

func (*GrafanaClient) GetAlertContactPointsAsYAML

func (c *GrafanaClient) GetAlertContactPointsAsYAML() ([]byte, error)

func (*GrafanaClient) GetAlertList

func (c *GrafanaClient) GetAlertList() (alerts []Alert, err error)

func (*GrafanaClient) GetAlertMuteTimingsAsPrettyJSON

func (c *GrafanaClient) GetAlertMuteTimingsAsPrettyJSON() ([]byte, error)

func (*GrafanaClient) GetAlertNotificationPoliciesAsPrettyJSON

func (c *GrafanaClient) GetAlertNotificationPoliciesAsPrettyJSON() ([]byte, error)

func (*GrafanaClient) GetAlertNotificationPoliciesAsYAML

func (c *GrafanaClient) GetAlertNotificationPoliciesAsYAML() ([]byte, error)

func (*GrafanaClient) GetAlertRulesAsYAML

func (c *GrafanaClient) GetAlertRulesAsYAML() ([]byte, error)

func (*GrafanaClient) GetAlertTemplatesAsPrettyJSON

func (c *GrafanaClient) GetAlertTemplatesAsPrettyJSON() ([]byte, error)

func (*GrafanaClient) GetAllAlertRulesAsPrettyJSON

func (c *GrafanaClient) GetAllAlertRulesAsPrettyJSON() ([]byte, error)

func (*GrafanaClient) GetAny

func (c *GrafanaClient) GetAny(requestPath string) ([]byte, error)

func (*GrafanaClient) GetDashboardAsPrettyJSON

func (c *GrafanaClient) GetDashboardAsPrettyJSON(uid string) ([]byte, error)

func (*GrafanaClient) GetDashboardList

func (c *GrafanaClient) GetDashboardList() ([]Dashboard, error)

func (*GrafanaClient) GetDataSourcesAsPrettyJSON

func (c *GrafanaClient) GetDataSourcesAsPrettyJSON() ([]byte, error)

func (*GrafanaClient) GetJSON

func (c *GrafanaClient) GetJSON(requestPath string, responseStruct interface{}) error

func (*GrafanaClient) GetPrettyJSON

func (c *GrafanaClient) GetPrettyJSON(requestPath string) ([]byte, error)

func (*GrafanaClient) RequestAny

func (c *GrafanaClient) RequestAny(method, requestPath string, query url.Values, requestBody []byte) ([]byte, error)

func (*GrafanaClient) RequestJSON

func (c *GrafanaClient) RequestJSON(method, requestPath string, query url.Values, requestBody []byte, responseStruct interface{}) error

Jump to

Keyboard shortcuts

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