-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathcheck_tag_defined.go
28 lines (25 loc) · 1014 Bytes
/
check_tag_defined.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
package opslevel
type TagDefinedCheckFragment struct {
TagKey string `graphql:"tagKey"` // The tag key where the tag predicate should be applied.
TagPredicate *Predicate `graphql:"tagPredicate"` // The condition that should be satisfied by the tag value.
}
func (client *Client) CreateCheckTagDefined(input CheckTagDefinedCreateInput) (*Check, error) {
var m struct {
Payload CheckResponsePayload `graphql:"checkTagDefinedCreate(input: $input)"`
}
v := PayloadVariables{
"input": input,
}
err := client.Mutate(&m, v, WithName("CheckTagDefinedCreate"))
return &m.Payload.Check, HandleErrors(err, m.Payload.Errors)
}
func (client *Client) UpdateCheckTagDefined(input CheckTagDefinedUpdateInput) (*Check, error) {
var m struct {
Payload CheckResponsePayload `graphql:"checkTagDefinedUpdate(input: $input)"`
}
v := PayloadVariables{
"input": input,
}
err := client.Mutate(&m, v, WithName("CheckTagDefinedUpdate"))
return &m.Payload.Check, HandleErrors(err, m.Payload.Errors)
}