-
Notifications
You must be signed in to change notification settings - Fork 519
/
status.go
66 lines (59 loc) · 2.55 KB
/
status.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package opencost
import "time"
// ETLStatus describes ETL metadata
type ETLStatus struct {
Coverage Window `json:"coverage"`
LastRun time.Time `json:"lastRun"`
Progress float64 `json:"progress"`
RefreshRate string `json:"refreshRate"`
Resolution string `json:"resolution"`
MaxPrometheusQueryDuration string `json:"maxPrometheusQueryDuration"`
StartTime time.Time `json:"startTime"`
UTCOffset string `json:"utcOffset"`
Backup *DirectoryStatus `json:"backup,omitempty"`
}
// DirectoryStatus describes metadata of a directory of files
type DirectoryStatus struct {
Path string `json:"path"`
Size string `json:"size"`
LastModified time.Time `json:"lastModified"`
FileCount int `json:"fileCount"`
Files []FileStatus `json:"files"`
}
// FileStatus describes the metadata of a single file
type FileStatus struct {
Name string `json:"name"`
Size string `json:"size"`
LastModified time.Time `json:"lastModified"`
IsRepairing bool `json:"isRepairing"`
Details map[string]string `json:"details,omitempty"`
Errors []string `json:"errors,omitempty"`
Warnings []string `json:"warnings,omitempty"`
}
// CloudStatus describes CloudStore metadata
type CloudStatus struct {
ConnectionStatus string `json:"cloudConnectionStatus"`
ProviderType string `json:"providerType"`
CloudUsage *CloudAssetStatus `json:"cloudUsage,omitempty"`
Reconciliation *ReconciliationStatus `json:"reconciliation,omitempty"`
}
// CloudAssetStatus describes CloudAsset metadata of a CloudStore
type CloudAssetStatus struct {
Coverage Window `json:"coverage"`
LastRun time.Time `json:"lastRun"`
NextRun time.Time `json:"nextRun"`
Progress float64 `json:"progress"`
RefreshRate string `json:"refreshRate"`
Resolution string `json:"resolution"`
StartTime time.Time `json:"startTime"`
}
// ReconciliationStatus describes Reconciliation metadata of a CloudStore
type ReconciliationStatus struct {
Coverage Window `json:"coverage"`
LastRun time.Time `json:"lastRun"`
NextRun time.Time `json:"nextRun"`
Progress float64 `json:"progress"`
RefreshRate string `json:"refreshRate"`
Resolution string `json:"resolution"`
StartTime time.Time `json:"startTime"`
}