forked from OpsLevel/opslevel-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck_has_repository.go
31 lines (27 loc) · 979 Bytes
/
check_has_repository.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 CheckRepositoryIntegratedCreateInput struct {
CheckCreateInput
}
type CheckRepositoryIntegratedUpdateInput struct {
CheckUpdateInput
}
func (client *Client) CreateCheckRepositoryIntegrated(input CheckRepositoryIntegratedCreateInput) (*Check, error) {
var m struct {
Payload CheckResponsePayload `graphql:"checkRepositoryIntegratedCreate(input: $input)"`
}
v := PayloadVariables{
"input": input,
}
err := client.Mutate(&m, v, WithName("CheckRepositoryIntegratedCreate"))
return &m.Payload.Check, HandleErrors(err, m.Payload.Errors)
}
func (client *Client) UpdateCheckRepositoryIntegrated(input CheckRepositoryIntegratedUpdateInput) (*Check, error) {
var m struct {
Payload CheckResponsePayload `graphql:"checkRepositoryIntegratedUpdate(input: $input)"`
}
v := PayloadVariables{
"input": input,
}
err := client.Mutate(&m, v, WithName("CheckRepositoryIntegratedUpdate"))
return &m.Payload.Check, HandleErrors(err, m.Payload.Errors)
}