Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Name string `json:"name"`
DisplayName string `json:"displayName"`
Description string `json:"description"`
InternalAddress string `json:"internalAddress"`
PublicAddress string `json:"publicAddress"`
Username string `json:"username"`
Password string `json:"password"`
Token string `json:"token"`
}
Config is the structure of the configuration for a single Grafana instance.
type Dashboard ¶
type Dashboard struct {
DashboardData
DashboardMetadata
Type string `json:"type,omitempty"`
}
Dashboard is the structure of a single Grafana dashboard. It contains the dashboard data and metadata. If this is used via the search API it also contains a type field, because the API also returns folders.
type DashboardData ¶
type DashboardData struct {
ID int `json:"id"`
UID string `json:"uid"`
Title string `json:"title"`
Tags []string `json:"tags"`
}
DashboardData is the structure for the dashbord data returned by the Grafana API.
type DashboardMetadata ¶
type DashboardMetadata struct {
URL string `json:"url"`
FolderID int `json:"folderId"`
FolderUID string `json:"folderUid"`
FolderTitle string `json:"folderTitle,omitempty"`
FolderURL string `json:"folderUrl,omitempty"`
}
DashboardMetadata contains the metadata of a dashboard returned by the Grafana API.
type Instance ¶
type Instance struct {
Name string
// contains filtered or unexported fields
}
Instance represents a single Grafana instance, which can be added via the configuration file.
func (*Instance) GetDashboard ¶
GetDashboard returns a single dashboard by it's uid.
type ResponseError ¶
type ResponseError struct {
Message string `json:"message"`
}
ResponseError is the structure of failed Grafana API call.
type SingleDashboardResponse ¶
type SingleDashboardResponse struct {
Dashboard DashboardData `json:"dashboard"`
Metadata DashboardMetadata `json:"meta"`
}
SingleDashboardResponse is the structure of the data returned by the Grafana API to get a dashboard by its uid.