forked from grafana/grafana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.go
48 lines (39 loc) · 985 Bytes
/
model.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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"`
}
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)
}