-
Notifications
You must be signed in to change notification settings - Fork 13
/
check_has_owner.go
30 lines (27 loc) · 1.33 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
package opslevel
type ServiceOwnershipCheckFragment struct {
ContactMethod *ContactType `graphql:"contactMethod"` // The type of contact method that an owner should provide.
RequireContactMethod *bool `graphql:"requireContactMethod"` // Whether to require a contact method for a service owner or not.
TeamTagKey string `graphql:"tagKey"` // The tag key that should exist for a service owner.
TeamTagPredicate *Predicate `graphql:"tagPredicate"` // The condition that should be satisfied by the tag value.
}
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)
}