grafana/pkg/cmd/grafana-cli/models/model.go
ying-jeanne db67e70ba4
use sha256 checksum instead of md5 (#30018)
* use sha256 checksum instead of md5

* Chore: Rewrite ldap login test to standard library (#29998)

* Chore: Rewrite ldap login test to standard library

* Preserve original ldap enabled setting after test

* Chore: Rewrite models alert test to standard library (#30021)

* Chore: Rewrite models dashboard acl test to standard library (#30022)

* Chore: Rewrite models dashboards test to standard library (#30023)

* Chore: Rewrite login auth test to standard library (#29985)

* Chore: Rewrite login auth test to standard library

* Use assert.Empty when empty string expected

* Chore: Rewrite brute force login protection test to standard library (#29986)

* Update pkg/cmd/grafana-cli/services/api_client.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/cmd/grafana-cli/services/api_client.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* use sha256 checksum instead of md5

* Update pkg/cmd/grafana-cli/services/api_client.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/cmd/grafana-cli/services/api_client.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* grafana-cli: Remove MD5

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

Co-authored-by: Emil Hessman <emil@hessman.se>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-01-04 13:27:47 +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"`
// Arch contains architecture metadata.
Arch map[string]ArchMeta `json:"arch"`
}
type ArchMeta struct {
SHA256 string `json:"sha256"`
}
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)
}