forked from OpsLevel/opslevel-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck_service_config.go
31 lines (27 loc) · 979 Bytes
/
check_service_config.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
package opslevel
type CheckServiceConfigurationCreateInput struct {
CheckCreateInput
}
type CheckServiceConfigurationUpdateInput struct {
CheckUpdateInput
}
func (client *Client) CreateCheckServiceConfiguration(input CheckServiceConfigurationCreateInput) (*Check, error) {
var m struct {
Payload CheckResponsePayload `graphql:"checkServiceConfigurationCreate(input: $input)"`
}
v := PayloadVariables{
"input": input,
}
err := client.Mutate(&m, v, WithName("CheckServiceConfigurationCreate"))
return &m.Payload.Check, HandleErrors(err, m.Payload.Errors)
}
func (client *Client) UpdateCheckServiceConfiguration(input CheckServiceConfigurationUpdateInput) (*Check, error) {
var m struct {
Payload CheckResponsePayload `graphql:"checkServiceConfigurationUpdate(input: $input)"`
}
v := PayloadVariables{
"input": input,
}
err := client.Mutate(&m, v, WithName("CheckServiceConfigurationUpdate"))
return &m.Payload.Check, HandleErrors(err, m.Payload.Errors)
}