The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/pkg/plugins/repo/models.go

41 lines
1.1 KiB

package repo
import "archive/zip"
type PluginArchive struct {
File *zip.ReadCloser
}
type PluginArchiveInfo struct {
URL string
Version string
Checksum string
}
// PluginVersions is the JSON response from /api/plugins/$pluginID/versions
type PluginVersions struct {
Versions []Version `json:"items"`
}
type Version struct {
Version string `json:"version"`
Arch map[string]ArchMeta `json:"packages"`
URL string `json:"url"`
CreatedAt string `json:"createdAt"`
IsCompatible *bool `json:"isCompatible,omitempty"`
GrafanaDependency string `json:"grafanaDependency"`
}
type ArchMeta struct {
SHA256 string `json:"sha256"`
MD5 string `json:"md5"`
PackageName string `json:"packageName"`
DownloadURL string `json:"downloadUrl"`
}
// PluginInfo is (a subset of) the JSON response from grafana.com/api/plugins/$pluginID
type PluginInfo struct {
ID int `json:"id"`
Status string `json:"status"`
Slug string `json:"slug"`
}