Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client queries Grafana datasources via the NamespacedRESTConfig transport, ensuring OAuth proxy mode and token refresh are respected. It mirrors the approach used by internal/query/prometheus and internal/query/loki.
func NewClient ¶
func NewClient(cfg config.NamespacedRESTConfig) (*Client, error)
NewClient creates a client backed by the given REST config's transport (including WrapTransport / RefreshTransport in OAuth proxy mode).
type Datasource ¶
type Datasource struct {
UID string `json:"uid"`
Name string `json:"name"`
Type string `json:"type"`
URL string `json:"url"`
IsDefault bool `json:"isDefault"`
ReadOnly bool `json:"readOnly"`
Database string `json:"database"`
BasicAuth bool `json:"basicAuth"`
WithCredentials bool `json:"withCredentials"`
JSONData any `json:"jsonData"`
}
Datasource holds the fields returned by the legacy Grafana datasource REST API.
Click to show internal directories.
Click to hide internal directories.