mirror of
https://github.com/grafana/grafana.git
synced 2025-09-23 03:22:56 +08:00

* move guts from cli to server * renaming + refactoring * add pluginsDir arg * arg fixes * add support for repo URL override * add funcs to interface * use pluginID consistently * swap args * pass mandatory grafanaVersion field * introduce logger interface * create central logger for CLI * add infra log wrapper * re-add log initer step * remove unused logger * add checks for uninstalling * improve debug blue * make sure to close file * fix linter issues * remove space * improve newline usage * refactor packaging * improve logger API * fix interface func names * close file and reformat zipslip catch * handle G305 linter warning * add helpful debug log
49 lines
1.1 KiB
Go
49 lines
1.1 KiB
Go
package installer
|
|
|
|
type InstalledPlugin struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Type string `json:"type"`
|
|
Info PluginInfo `json:"info"`
|
|
Dependencies Dependencies `json:"dependencies"`
|
|
}
|
|
|
|
type Dependencies struct {
|
|
GrafanaVersion string `json:"grafanaVersion"`
|
|
Plugins []PluginDependency `json:"plugins"`
|
|
}
|
|
|
|
type PluginDependency struct {
|
|
ID string `json:"id"`
|
|
Type string `json:"type"`
|
|
Name string `json:"name"`
|
|
Version string `json:"version"`
|
|
}
|
|
|
|
type PluginInfo struct {
|
|
Version string `json:"version"`
|
|
Updated string `json:"updated"`
|
|
}
|
|
|
|
type Plugin struct {
|
|
ID string `json:"id"`
|
|
Category string `json:"category"`
|
|
Versions []Version `json:"versions"`
|
|
}
|
|
|
|
type Version struct {
|
|
Commit string `json:"commit"`
|
|
URL string `json:"url"`
|
|
Version string `json:"version"`
|
|
Arch map[string]ArchMeta `json:"arch"`
|
|
}
|
|
|
|
type ArchMeta struct {
|
|
SHA256 string `json:"sha256"`
|
|
}
|
|
|
|
type PluginRepo struct {
|
|
Plugins []Plugin `json:"plugins"`
|
|
Version string `json:"version"`
|
|
}
|