-
Notifications
You must be signed in to change notification settings - Fork 13
/
check_has_owner.go
48 lines (41 loc) · 1.98 KB
/
check_has_owner.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 opslevel
type ServiceOwnershipCheckFragment struct {
RequireContactMethod *bool `graphql:"requireContactMethod"`
ContactMethod *ServiceOwnershipCheckContactType `graphql:"contactMethod"`
TeamTagKey string `graphql:"tagKey"`
TeamTagPredicate *Predicate `graphql:"tagPredicate"`
}
type CheckServiceOwnershipCreateInput struct {
CheckCreateInput
RequireContactMethod *bool `json:"requireContactMethod,omitempty"`
ContactMethod *ServiceOwnershipCheckContactType `json:"contactMethod,omitempty"`
TeamTagKey string `json:"tagKey,omitempty"`
TeamTagPredicate *PredicateInput `json:"tagPredicate,omitempty"`
}
type CheckServiceOwnershipUpdateInput struct {
CheckUpdateInput
RequireContactMethod *bool `json:"requireContactMethod,omitempty"`
ContactMethod *ServiceOwnershipCheckContactType `json:"contactMethod,omitempty"`
TeamTagKey string `json:"tagKey,omitempty"`
TeamTagPredicate *PredicateUpdateInput `json:"tagPredicate,omitempty"`
}
func (client *Client) CreateCheckServiceOwnership(input CheckServiceOwnershipCreateInput) (*Check, error) {
var m struct {
Payload CheckResponsePayload `graphql:"checkServiceOwnershipCreate(input: $input)"`
}
v := PayloadVariables{
"input": input,
}
err := client.Mutate(&m, v, WithName("CheckServiceOwnershipCreate"))
return &m.Payload.Check, HandleErrors(err, m.Payload.Errors)
}
func (client *Client) UpdateCheckServiceOwnership(input CheckServiceOwnershipUpdateInput) (*Check, error) {
var m struct {
Payload CheckResponsePayload `graphql:"checkServiceOwnershipUpdate(input: $input)"`
}
v := PayloadVariables{
"input": input,
}
err := client.Mutate(&m, v, WithName("CheckServiceOwnershipUpdate"))
return &m.Payload.Check, HandleErrors(err, m.Payload.Errors)
}