-
Notifications
You must be signed in to change notification settings - Fork 90
/
report_query.go
58 lines (44 loc) · 1.46 KB
/
report_query.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
package v1
import (
"encoding/json"
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
)
var ReportQueryGVK = SchemeGroupVersion.WithKind("ReportQuery")
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ReportQueryList struct {
meta.TypeMeta `json:",inline"`
meta.ListMeta `json:"metadata,omitempty"`
Items []*ReportQuery `json:"items"`
}
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ReportQuery struct {
meta.TypeMeta `json:",inline"`
meta.ObjectMeta `json:"metadata,omitempty"`
Spec ReportQuerySpec `json:"spec"`
Status ReportQueryStatus `json:"status"`
}
type ReportQuerySpec struct {
Columns []ReportQueryColumn `json:"columns"`
Query string `json:"query"`
Inputs []ReportQueryInputDefinition `json:"inputs,omitempty"`
}
type ReportQueryColumn struct {
Name string `json:"name"`
Type string `json:"type"`
TableHidden bool `json:"tableHidden"`
Unit string `json:"unit,omitempty"`
}
type ReportQueryInputDefinition struct {
Name string `json:"name"`
Required bool `json:"required"`
Type string `json:"type,omitempty"`
Default *json.RawMessage `json:"default,omitempty"`
}
type ReportQueryInputValue struct {
Name string `json:"name"`
Value *json.RawMessage `json:"value,omitempty"`
}
type ReportQueryInputValues []ReportQueryInputValue
type ReportQueryStatus struct {
}