forked from grafana-tools/sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
annotation.go
37 lines (34 loc) · 1.58 KB
/
annotation.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
package sdk
// AnnotationResponse is representation of an existing annotation
type AnnotationResponse struct {
ID uint `json:"id"`
AlertID uint `json:"alertId"`
DashboardID uint `json:"dashboardId,omitempty"`
PanelID uint `json:"panelId,omitempty"`
UserID uint `json:"userId,omitempty"`
UserName string `json:"userName,omitempty"`
NewState string `json:"newState,omitempty"`
PrevState string `json:"prevState,omitempty"`
Time int64 `json:"time,omitempty"`
TimeEnd int64 `json:"timeEnd,omitempty"`
Tags []string `json:"tags,omitempty"`
Text string `json:"text,omitempty"`
Type string `json:"type"`
Data map[string]interface{} `json:"data"`
}
// CreateAnnotationRequest is a request to create a new annotation
type CreateAnnotationRequest struct {
DashboardID uint `json:"dashboardId,omitempty"`
PanelID uint `json:"panelId,omitempty"`
Time int64 `json:"time,omitempty"`
TimeEnd int64 `json:"timeEnd,omitempty"`
Tags []string `json:"tags,omitempty"`
Text string `json:"text,omitempty"`
}
// PatchAnnotationRequest is a request to patch an existing annotation
type PatchAnnotationRequest struct {
Time int64 `json:"time,omitempty"`
TimeEnd int64 `json:"timeEnd,omitempty"`
Tags []string `json:"tags,omitempty"`
Text string `json:"text,omitempty"`
}