grafana

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

func NewBackend

func NewBackend(grafanaURL string, authToken string) (*Backend, error)

func (*Backend) GetDatasources

func (b *Backend) GetDatasources() (dsSettings []DatasourceSettings, err error)

func (*Backend) Handle

func (b *Backend) Handle(routePrefix string) http.HandlerFunc

type DatasourceSettings

type DatasourceSettings struct {
	ID                int64                  `json:"id"`
	OrgID             int64                  `json:"orgID"`
	Name              string                 `json:"name"`
	Type              string                 `json:"type"`
	Access            string                 `json:"access"`
	URL               string                 `json:"url"`
	Password          string                 `json:"password"`
	User              string                 `json:"user"`
	BasicAuth         bool                   `json:"basicAuth"`
	BasicAuthUser     string                 `json:"basicAuthUser,omitempty"`
	BasicAuthPassword string                 `json:"basicAuthPassword,omitempty"`
	WithCredentials   bool                   `json:"withCredentials,omitempty"`
	IsDefault         bool                   `json:"isDefault"`
	JSONData          map[string]interface{} `json:"jsonData"`
}

Jump to

Keyboard shortcuts

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