grafana

package
v0.0.0-...-c300999 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient struct {
	BaseUrl    *url.URL
	HTTPClient *http.Client
	Id         int
	// contains filtered or unexported fields
}

func New

func New(baseUrl *url.URL, id int, logger log.Logger) *APIClient

return a new APIClient

func (*APIClient) CreateDashboard

func (c *APIClient) CreateDashboard(dashboardJSON io.Reader) error

func (*APIClient) CreateDatasource

func (c *APIClient) CreateDatasource(datasourceJSON io.Reader) error

func (*APIClient) CreateFolder

func (c *APIClient) CreateFolder(folderJSON io.Reader) error

func (*APIClient) CreateNotificationChannel

func (c *APIClient) CreateNotificationChannel(notificationChannelJSON io.Reader) error

func (*APIClient) CreateUser

func (c *APIClient) CreateUser(userJSON io.Reader) error

func (*APIClient) DeleteDashboard

func (c *APIClient) DeleteDashboard(uid string) error

func (*APIClient) DeleteDatasource

func (c *APIClient) DeleteDatasource(datasourceJSON io.Reader) error

func (*APIClient) DeleteNotificationChannel

func (c *APIClient) DeleteNotificationChannel(id int) error

func (*APIClient) SearchDashboard

func (c *APIClient) SearchDashboard() ([]GrafanaDashboard, error)

return a list of grafana dashboards

func (*APIClient) SearchDatasource

func (c *APIClient) SearchDatasource() ([]map[string]interface{}, error)

return a list of grafana datasources

func (*APIClient) SearchFolder

func (c *APIClient) SearchFolder() ([]map[string]interface{}, error)

return a list of folders

func (*APIClient) SearchNotificationChannel

func (c *APIClient) SearchNotificationChannel() ([]map[string]interface{}, error)

return a list of notification channels

func (*APIClient) UpdateDatasource

func (c *APIClient) UpdateDatasource(id int, datasourceJson io.Reader) error

func (*APIClient) UpdateNotificationChannel

func (c *APIClient) UpdateNotificationChannel(id int, notificationChannelJSON io.Reader) error

type GrafanaDashboard

type GrafanaDashboard struct {
	Id       int    `json:"id"`
	Title    string `json:"title"`
	Uri      string `json:"uri"`
	Uid      string `json:"uid"`
	Type     string `json:"type"`
	FolderId int    `json:"folderId"`
}

type GrafanaDashboardConfigmap

type GrafanaDashboardConfigmap struct {
	Dashboard struct{ Title string } `json:"dashboard"`
	FolderId  int                    `json:"folderId"`
}

Jump to

Keyboard shortcuts

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