-
Notifications
You must be signed in to change notification settings - Fork 20
/
alerts.go
76 lines (66 loc) · 3.11 KB
/
alerts.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
67
68
69
70
71
72
73
74
75
76
package humiographql
import graphql "github.com/cli/shurcooL-graphql"
type Alert struct {
ID graphql.String `graphql:"id"`
Name graphql.String `graphql:"name"`
QueryString graphql.String `graphql:"queryString"`
QueryStart graphql.String `graphql:"queryStart"`
ThrottleField graphql.String `graphql:"throttleField"`
TimeOfLastTrigger Long `graphql:"timeOfLastTrigger"`
IsStarred graphql.Boolean `graphql:"isStarred"`
Description graphql.String `graphql:"description"`
ThrottleTimeMillis Long `graphql:"throttleTimeMillis"`
Enabled graphql.Boolean `graphql:"enabled"`
Actions []graphql.String `graphql:"actions"`
Labels []graphql.String `graphql:"labels"`
LastError graphql.String `graphql:"lastError"`
QueryOwnership struct {
ID graphql.String `graphql:"id"`
QueryOwnershipTypeName QueryOwnershipTypeName `graphql:"__typename"`
} `graphql:"queryOwnership"`
RunAsUser struct {
ID graphql.String `graphql:"id"`
} `graphql:"runAsUser"`
}
type QueryOwnership struct {
}
type CreateAlert struct {
ViewName graphql.String `json:"viewName"`
Name graphql.String `json:"name"`
Description graphql.String `json:"description,omitempty"`
QueryString graphql.String `json:"queryString"`
QueryStart graphql.String `json:"queryStart"`
ThrottleTimeMillis Long `json:"throttleTimeMillis"`
ThrottleField graphql.String `json:"throttleField,omitempty"`
RunAsUserID graphql.String `json:"runAsUserId,omitempty"`
Enabled graphql.Boolean `json:"enabled"`
Actions []graphql.String `json:"actions"`
Labels []graphql.String `json:"labels"`
QueryOwnershipType QueryOwnershipType `json:"queryOwnershipType,omitempty"`
}
type UpdateAlert struct {
ViewName graphql.String `json:"viewName"`
ID graphql.String `json:"id"`
Name graphql.String `json:"name"`
Description graphql.String `json:"description,omitempty"`
QueryString graphql.String `json:"queryString"`
QueryStart graphql.String `json:"queryStart"`
ThrottleTimeMillis Long `json:"throttleTimeMillis"`
ThrottleField graphql.String `json:"throttleField,omitempty"`
RunAsUserID graphql.String `json:"runAsUserId,omitempty"`
Enabled graphql.Boolean `json:"enabled"`
Actions []graphql.String `json:"actions"`
Labels []graphql.String `json:"labels"`
QueryOwnershipType QueryOwnershipType `json:"queryOwnershipType,omitempty"`
}
type Long int64
type QueryOwnershipTypeName string
const (
QueryOwnershipTypeNameOrganization QueryOwnershipTypeName = "OrganizationOwnership"
QueryOwnershipTypeNameUser QueryOwnershipTypeName = "UserOwnership"
)
type QueryOwnershipType string
const (
QueryOwnershipTypeUser QueryOwnershipType = "User"
QueryOwnershipTypeOrganization QueryOwnershipType = "Organization"
)