Files
Arve Knudsen 52c154a221 Backend: Rename variables for style conformance (#29097)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-17 17:09:14 +01:00

55 lines
1.1 KiB
Go

package models
import (
"os"
)
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 []Plugin `json:"plugins"`
}
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"`
// os-arch to md5 checksum to check when downloading the file
Arch map[string]ArchMeta `json:"arch"`
}
type ArchMeta struct {
Md5 string `json:"md5"`
}
type PluginRepo struct {
Plugins []Plugin `json:"plugins"`
Version string `json:"version"`
}
type IoUtil interface {
Stat(path string) (os.FileInfo, error)
RemoveAll(path string) error
ReadDir(path string) ([]os.FileInfo, error)
ReadFile(filename string) ([]byte, error)
}