-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathcheck_has_documentation.go
More file actions
28 lines (25 loc) · 1.03 KB
/
check_has_documentation.go
File metadata and controls
28 lines (25 loc) · 1.03 KB
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 HasDocumentationCheckFragment struct {
DocumentSubtype HasDocumentationSubtypeEnum `graphql:"documentSubtype"` // The subtype of the document.
DocumentType HasDocumentationTypeEnum `graphql:"documentType"` // The type of the document.
}
func (client *Client) CreateCheckHasDocumentation(input CheckHasDocumentationCreateInput) (*Check, error) {
var m struct {
Payload CheckResponsePayload `graphql:"checkHasDocumentationCreate(input: $input)"`
}
v := PayloadVariables{
"input": input,
}
err := client.Mutate(&m, v, WithName("CheckHasDocumentationCreate"))
return &m.Payload.Check, HandleErrors(err, m.Payload.Errors)
}
func (client *Client) UpdateCheckHasDocumentation(input CheckHasDocumentationUpdateInput) (*Check, error) {
var m struct {
Payload CheckResponsePayload `graphql:"checkHasDocumentationUpdate(input: $input)"`
}
v := PayloadVariables{
"input": input,
}
err := client.Mutate(&m, v, WithName("CheckHasDocumentationUpdate"))
return &m.Payload.Check, HandleErrors(err, m.Payload.Errors)
}