Skip to content

Commit 4aaae3c

Browse files
committed
remove commented out structs and deprecated funcs
1 parent 33f9c6d commit 4aaae3c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+70
-808
lines changed

Diff for: actions.go

-54
Original file line numberDiff line numberDiff line change
@@ -86,60 +86,6 @@ type CustomActionsTriggerDefinitionsConnection struct {
8686
TotalCount int
8787
}
8888

89-
// type CustomActionsWebhookActionCreateInput struct {
90-
// Name string `json:"name" yaml:"name" default:"Page The On Call"`
91-
// Description *string `json:"description,omitempty" yaml:"description,omitempty" default:"Pages The On Call"`
92-
// LiquidTemplate string `json:"liquidTemplate" yaml:"liquidTemplate" default:"{\"token\": \"XXX\", \"ref\":\"main\", \"action\": \"rollback\"}"`
93-
// WebhookURL string `json:"webhookUrl" yaml:"webhookUrl" default:"https://api.pagerduty.com/incidents"`
94-
// HTTPMethod CustomActionsHttpMethodEnum `json:"httpMethod" yaml:"httpMethod" default:"POST"`
95-
// Headers JSON `json:"headers" yaml:"headers" default:"{\"accept\": \"application/vnd.pagerduty+json;version=2\",\"authorization\":\"Token token=XXXXXXXXXXXXX\",\"from\":\"[email protected]\"}"`
96-
// }
97-
98-
// type CustomActionsWebhookActionUpdateInput struct {
99-
// Id ID `json:"id"`
100-
// Name *string `json:"name,omitempty"`
101-
// Description *string `json:"description,omitempty"`
102-
// LiquidTemplate *string `json:"liquidTemplate,omitempty"`
103-
// WebhookURL *string `json:"webhookUrl,omitempty"`
104-
// HTTPMethod CustomActionsHttpMethodEnum `json:"httpMethod,omitempty"`
105-
// Headers *JSON `json:"headers,omitempty"`
106-
// }
107-
108-
// type CustomActionsTriggerDefinitionCreateInput struct {
109-
// Name string `json:"name" yaml:"name" default:"Page The On Call"`
110-
// Description *string `json:"description,omitempty" yaml:"description,omitempty" default:"Pages the On Call"`
111-
// Owner ID `json:"ownerId" yaml:"ownerId" default:"XXX_owner_id_XXX"`
112-
// // In the API actionID is `ID!` but that's because of the CustomActionsWebhookActionCreateInput
113-
// // But we are not implementing that because it is used for the UI, so we need to enforce an actionId is given
114-
// Action ID `json:"actionId" yaml:"actionId"`
115-
// Filter *ID `json:"filterId,omitempty" yaml:"filterId,omitempty"`
116-
// // This is being explicitly left out to reduce the complexity of the implementation
117-
// // action *CustomActionsWebhookActionCreateInput
118-
// ManualInputsDefinition string `json:"manualInputsDefinition" yaml:"manualInputsDefinition"`
119-
// Published *bool `json:"published,omitempty" yaml:"published,omitempty"`
120-
// AccessControl CustomActionsTriggerDefinitionAccessControlEnum `json:"accessControl" yaml:"accessControl"`
121-
// ResponseTemplate string `json:"responseTemplate" yaml:"responseTemplate"`
122-
// EntityType CustomActionsEntityTypeEnum `json:"entityType" yaml:"entityType"`
123-
// ExtendedTeamAccess *[]IdentifierInput `json:"extendedTeamAccess,omitempty" yaml:"extendedTeamAccess,omitempty"`
124-
// }
125-
126-
// type CustomActionsTriggerDefinitionUpdateInput struct {
127-
// Id ID `json:"id"`
128-
// Name *string `json:"name,omitempty"`
129-
// Description *string `json:"description,omitempty"`
130-
// Owner *ID `json:"ownerId,omitempty" yaml:"ownerId,omitempty"`
131-
// Action *ID `json:"actionId,omitempty" yaml:"actionId,omitempty"`
132-
// Filter *ID `json:"filterId,omitempty" yaml:"filterId,omitempty"`
133-
// // This is being explicitly left out to reduce the complexity of the implementation
134-
// // action *CustomActionsWebhookActionCreateInput
135-
// ManualInputsDefinition *string `json:"manualInputsDefinition,omitempty" yaml:"manualInputsDefinition,omitempty"`
136-
// Published *bool `json:"published,omitempty" yaml:"published,omitempty"`
137-
// AccessControl CustomActionsTriggerDefinitionAccessControlEnum `json:"accessControl,omitempty" yaml:"accessControl,omitempty" default:"service_owners"`
138-
// ResponseTemplate *string `json:"responseTemplate,omitempty" yaml:"responseTemplate,omitempty"`
139-
// EntityType CustomActionsEntityTypeEnum `json:"entityType,omitempty" yaml:"entityType,omitempty"`
140-
// ExtendedTeamAccess *[]IdentifierInput `json:"extendedTeamAccess,omitempty" yaml:"extendedTeamAccess,omitempty" default:"[\"alias\":\"team_alias_1\",\"id\":\"XXX_team_id_XXX\"]"`
141-
// }
142-
14389
func (client *Client) CreateWebhookAction(input CustomActionsWebhookActionCreateInput) (*CustomActionsExternalAction, error) {
14490
var m struct {
14591
Payload struct {

Diff for: alert_source.go

-11
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
package opslevel
22

3-
// type AlertSourceExternalIdentifier struct {
4-
// Type AlertSourceTypeEnum `json:"type" yaml:"type"`
5-
// ExternalId string `json:"externalId" yaml:"externalId"`
6-
// }
7-
83
type AlertSource struct {
94
Name string `graphql:"name"`
105
Description string `graphql:"description"`
@@ -22,12 +17,6 @@ type AlertSourceService struct {
2217
Status AlertSourceStatusTypeEnum `graphql:"status"`
2318
}
2419

25-
// type AlertSourceServiceCreateInput struct {
26-
// Service IdentifierInput `json:"service" yaml:"service" default:"{\"alias\":\"sound-the-alarm\"}"`
27-
// Id ID `json:"alertSourceId,omitempty" yaml:"alertSourceId,omitempty"`
28-
// ExternalID *AlertSourceExternalIdentifier `json:"alertSourceExternalIdentifier,omitempty" yaml:"alertSourceExternalIdentifier,omitempty"`
29-
// }
30-
3120
type AlertSourceDeleteInput struct {
3221
Id ID `json:"id"`
3322
}

Diff for: aliases.go

-10
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,6 @@ import (
55
"strings"
66
)
77

8-
// type AliasCreateInput struct {
9-
// Alias string `json:"alias"`
10-
// OwnerId ID `json:"ownerId"`
11-
// }
12-
13-
// type AliasDeleteInput struct {
14-
// Alias string `json:"alias"`
15-
// OwnerType AliasOwnerTypeEnum `json:"ownerType"`
16-
// }
17-
188
// #region Create
199
// TODO: make sure duplicate aliases throw an error that we can catch
2010
func (client *Client) CreateAliases(ownerId ID, aliases []string) ([]string, error) {

Diff for: category.go

-13
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,6 @@ type CategoryConnection struct {
1717
TotalCount int
1818
}
1919

20-
// type CategoryCreateInput struct {
21-
// Name string `json:"name" yaml:"name" default:"Example Category"`
22-
// }
23-
24-
// type CategoryUpdateInput struct {
25-
// Id ID `json:"id"`
26-
// Name string `json:"name"`
27-
// }
28-
29-
// type CategoryDeleteInput struct {
30-
// Id ID `json:"id"`
31-
// }
32-
3320
func (self *Category) Alias() string {
3421
return slug.Make(self.Name)
3522
}

Diff for: check.go

-4
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,6 @@ func (c *CheckUpdateInput) GetCheckUpdateInput() *CheckUpdateInput {
145145
return c
146146
}
147147

148-
// type CheckDeleteInput struct {
149-
// Id ID `json:"id"`
150-
// }
151-
152148
// Encompass CheckCreatePayload and CheckUpdatePayload into 1 struct
153149
type CheckResponsePayload struct {
154150
Check Check

Diff for: check_alert_source_usage.go

-14
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,6 @@ type AlertSourceUsageCheckFragment struct {
55
AlertSourceType AlertSourceTypeEnum `graphql:"alertSourceType"`
66
}
77

8-
// type CheckAlertSourceUsageCreateInput struct {
9-
// CheckCreateInput
10-
11-
// AlertSourceType AlertSourceTypeEnum `json:"alertSourceType,omitempty"`
12-
// AlertSourceNamePredicate *PredicateInput `json:"alertSourceNamePredicate,omitempty"`
13-
// }
14-
15-
// type CheckAlertSourceUsageUpdateInput struct {
16-
// CheckUpdateInput
17-
18-
// AlertSourceType AlertSourceTypeEnum `json:"alertSourceType,omitempty"`
19-
// AlertSourceNamePredicate *PredicateUpdateInput `json:"alertSourceNamePredicate,omitempty"`
20-
// }
21-
228
func (client *Client) CreateCheckAlertSourceUsage(input CheckAlertSourceUsageCreateInput) (*Check, error) {
239
var m struct {
2410
Payload CheckResponsePayload `graphql:"checkAlertSourceUsageCreate(input: $input)"`

Diff for: check_custom_event.go

-20
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,6 @@ type CustomEventCheckFragment struct {
88
SuccessCondition string `graphql:"successCondition"`
99
}
1010

11-
// type CheckCustomEventCreateInput struct {
12-
// CheckCreateInput
13-
14-
// Integration ID `json:"integrationId" yaml:"integrationId" default:"XXX_integration_id_XXX"`
15-
// ServiceSelector string `json:"serviceSelector" yaml:"serviceSelector" default:".metadata.name"`
16-
// SuccessCondition string `json:"successCondition" yaml:"successCondition" default:".metadata.name"`
17-
// Message string `json:"resultMessage,omitempty" yaml:"resultMessage,omitempty" default:"#Hello World"`
18-
// PassPending *bool `json:"passPending,omitempty" yaml:"passPending,omitempty" default:"false"`
19-
// }
20-
21-
// type CheckCustomEventUpdateInput struct {
22-
// CheckUpdateInput
23-
24-
// ServiceSelector string `json:"serviceSelector,omitempty"`
25-
// SuccessCondition string `json:"successCondition,omitempty"`
26-
// Message *string `json:"resultMessage,omitempty"`
27-
// PassPending *bool `json:"passPending,omitempty"`
28-
// Integration *ID `json:"integrationId,omitempty" yaml:"integrationId,omitempty"`
29-
// }
30-
3111
func (client *Client) CreateCheckCustomEvent(input CheckCustomEventCreateInput) (*Check, error) {
3212
var m struct {
3313
Payload CheckResponsePayload `graphql:"checkCustomEventCreate(input: $input)"`

Diff for: check_git_branch_protection.go

-8
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@ package opslevel
22

33
type GitBranchProtectionCheckFragment struct{}
44

5-
// type CheckGitBranchProtectionCreateInput struct {
6-
// CheckCreateInput
7-
// }
8-
9-
// type CheckGitBranchProtectionUpdateInput struct {
10-
// CheckUpdateInput
11-
// }
12-
135
func (client *Client) CreateCheckGitBranchProtection(input CheckGitBranchProtectionCreateInput) (*Check, error) {
146
var m struct {
157
Payload CheckResponsePayload `graphql:"checkGitBranchProtectionCreate(input: $input)"`

Diff for: check_has_documentation.go

-14
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,6 @@ type HasDocumentationCheckFragment struct {
55
DocumentSubtype HasDocumentationSubtypeEnum `graphql:"documentSubtype"`
66
}
77

8-
// type CheckHasDocumentationCreateInput struct {
9-
// CheckCreateInput
10-
11-
// DocumentType HasDocumentationTypeEnum `json:"documentType" yaml:"documentType" default:"api"`
12-
// DocumentSubtype HasDocumentationSubtypeEnum `json:"documentSubtype" yaml:"documentSubtype" default:"openapi"`
13-
// }
14-
15-
// type CheckHasDocumentationUpdateInput struct {
16-
// CheckUpdateInput
17-
18-
// DocumentType HasDocumentationTypeEnum `json:"documentType"`
19-
// DocumentSubtype HasDocumentationSubtypeEnum `json:"documentSubtype"`
20-
// }
21-
228
func (client *Client) CreateCheckHasDocumentation(input CheckHasDocumentationCreateInput) (*Check, error) {
239
var m struct {
2410
Payload CheckResponsePayload `graphql:"checkHasDocumentationCreate(input: $input)"`

Diff for: check_has_owner.go

-18
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,6 @@ type ServiceOwnershipCheckFragment struct {
77
TeamTagPredicate *Predicate `graphql:"tagPredicate"`
88
}
99

10-
// type CheckServiceOwnershipCreateInput struct {
11-
// CheckCreateInput
12-
13-
// RequireContactMethod *bool `json:"requireContactMethod,omitempty"`
14-
// ContactMethod *ContactType `json:"contactMethod,omitempty"`
15-
// TeamTagKey string `json:"tagKey,omitempty"`
16-
// TeamTagPredicate *PredicateInput `json:"tagPredicate,omitempty"`
17-
// }
18-
19-
// type CheckServiceOwnershipUpdateInput struct {
20-
// CheckUpdateInput
21-
22-
// RequireContactMethod *bool `json:"requireContactMethod,omitempty"`
23-
// ContactMethod *ContactType `json:"contactMethod,omitempty"`
24-
// TeamTagKey string `json:"tagKey,omitempty"`
25-
// TeamTagPredicate *PredicateUpdateInput `json:"tagPredicate,omitempty"`
26-
// }
27-
2810
func (client *Client) CreateCheckServiceOwnership(input CheckServiceOwnershipCreateInput) (*Check, error) {
2911
var m struct {
3012
Payload CheckResponsePayload `graphql:"checkServiceOwnershipCreate(input: $input)"`

Diff for: check_has_recent_deploy.go

-12
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,6 @@ type HasRecentDeployCheckFragment struct {
44
Days int `graphql:"days"`
55
}
66

7-
// type CheckHasRecentDeployCreateInput struct {
8-
// CheckCreateInput
9-
10-
// Days int `json:"days" yaml:"days" default:"12"`
11-
// }
12-
13-
// type CheckHasRecentDeployUpdateInput struct {
14-
// CheckUpdateInput
15-
16-
// Days *int `json:"days,omitempty"`
17-
// }
18-
197
func (client *Client) CreateCheckHasRecentDeploy(input CheckHasRecentDeployCreateInput) (*Check, error) {
208
var m struct {
219
Payload CheckResponsePayload `graphql:"checkHasRecentDeployCreate(input: $input)"`

Diff for: check_has_repository.go

-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
package opslevel
22

3-
// type CheckRepositoryIntegratedCreateInput struct {
4-
// CheckCreateInput
5-
// }
6-
7-
// type CheckRepositoryIntegratedUpdateInput struct {
8-
// CheckUpdateInput
9-
// }
10-
113
func (client *Client) CreateCheckRepositoryIntegrated(input CheckRepositoryIntegratedCreateInput) (*Check, error) {
124
var m struct {
135
Payload CheckResponsePayload `graphql:"checkRepositoryIntegratedCreate(input: $input)"`

Diff for: check_manual.go

-20
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ type ManualCheckFrequency struct {
1313
FrequencyValue int `graphql:"frequencyValue"`
1414
}
1515

16-
// type ManualCheckFrequencyInput struct {
17-
// StartingDate iso8601.Time `json:"startingDate" yaml:"startingDate" default:"2023-11-05T20:22:44.427Z"`
18-
// FrequencyTimeScale FrequencyTimeScale `json:"frequencyTimeScale" yaml:"frequencyTimeScale" default:"day"`
19-
// FrequencyValue int `json:"frequencyValue" yaml:"frequencyValue" default:"1"`
20-
// }
21-
2216
func NewManualCheckFrequencyInput(startingDate string, timeScale FrequencyTimeScale, value int) *ManualCheckFrequencyInput {
2317
return &ManualCheckFrequencyInput{
2418
StartingDate: NewISO8601Date(startingDate),
@@ -36,20 +30,6 @@ func NewManualCheckFrequencyUpdateInput(startingDate string, timeScale Frequency
3630
}
3731
}
3832

39-
// type CheckManualCreateInput struct {
40-
// CheckCreateInput
41-
42-
// UpdateFrequency *ManualCheckFrequencyInput `json:"updateFrequency,omitempty" yaml:"updateFrequency,omitempty"`
43-
// UpdateRequiresComment bool `json:"updateRequiresComment" yaml:"updateRequiresComment" default:"false"`
44-
// }
45-
46-
// type CheckManualUpdateInput struct {
47-
// CheckUpdateInput
48-
49-
// UpdateFrequency *ManualCheckFrequencyInput `json:"updateFrequency,omitempty"`
50-
// UpdateRequiresComment bool `json:"updateRequiresComment,omitempty"`
51-
// }
52-
5333
func (client *Client) CreateCheckManual(input CheckManualCreateInput) (*Check, error) {
5434
var m struct {
5535
Payload CheckResponsePayload `graphql:"checkManualCreate(input: $input)"`

Diff for: check_repo_file.go

-18
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,6 @@ type RepositoryFileCheckFragment struct {
77
UseAbsoluteRoot bool `graphql:"useAbsoluteRoot"`
88
}
99

10-
// type CheckRepositoryFileCreateInput struct {
11-
// CheckCreateInput
12-
13-
// DirectorySearch bool `json:"directorySearch" yaml:"directorySearch" default:"false"`
14-
// Filepaths []string `json:"filePaths" yaml:"filePaths" default:"[\"**/hello.go\", \"src/**\"]"`
15-
// FileContentsPredicate *PredicateInput `json:"fileContentsPredicate,omitempty" yaml:"fileContentsPredicate,omitempty"`
16-
// UseAbsoluteRoot bool `json:"useAbsoluteRoot" yaml:"useAbsoluteRoot" default:"false"`
17-
// }
18-
19-
// type CheckRepositoryFileUpdateInput struct {
20-
// CheckUpdateInput
21-
22-
// DirectorySearch bool `json:"directorySearch"`
23-
// Filepaths []string `json:"filePaths,omitempty"`
24-
// FileContentsPredicate *PredicateInput `json:"fileContentsPredicate,omitempty"`
25-
// UseAbsoluteRoot bool `json:"useAbsoluteRoot"`
26-
// }
27-
2810
func (client *Client) CreateCheckRepositoryFile(input CheckRepositoryFileCreateInput) (*Check, error) {
2911
var m struct {
3012
Payload CheckResponsePayload `graphql:"checkRepositoryFileCreate(input: $input)"`

Diff for: check_repo_grep.go

-16
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,6 @@ type RepositoryGrepCheckFragment struct {
66
FileContentsPredicate *Predicate `graphql:"fileContentsPredicate"`
77
}
88

9-
// type CheckRepositoryGrepCreateInput struct {
10-
// CheckCreateInput
11-
12-
// DirectorySearch bool `json:"directorySearch" yaml:"directorySearch" default:"false"`
13-
// Filepaths []string `json:"filePaths" yaml:"filePaths" default:"[\"**/hello.go\", \"src/**\"]"`
14-
// FileContentsPredicate *PredicateInput `json:"fileContentsPredicate,omitempty" yaml:"fileContentsPredicate,omitempty"`
15-
// }
16-
17-
// type CheckRepositoryGrepUpdateInput struct {
18-
// CheckUpdateInput
19-
20-
// DirectorySearch bool `json:"directorySearch"`
21-
// Filepaths []string `json:"filePaths,omitempty"`
22-
// FileContentsPredicate *PredicateInput `json:"fileContentsPredicate,omitempty"`
23-
// }
24-
259
func (client *Client) CreateCheckRepositoryGrep(input CheckRepositoryGrepCreateInput) (*Check, error) {
2610
var m struct {
2711
Payload CheckResponsePayload `graphql:"checkRepositoryGrepCreate(input: $input)"`

Diff for: check_repo_search.go

-14
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,6 @@ type RepositorySearchCheckFragment struct {
55
FileContentsPredicate Predicate `graphql:"fileContentsPredicate"`
66
}
77

8-
// type CheckRepositorySearchCreateInput struct {
9-
// CheckCreateInput
10-
11-
// FileExtensions []string `json:"fileExtensions,omitempty" yaml:"fileExtensions,omitempty" default:"[\"py\",\"js\",\"ts\"]"`
12-
// FileContentsPredicate PredicateInput `json:"fileContentsPredicate" yaml:"fileContentsPredicate"`
13-
// }
14-
15-
// type CheckRepositorySearchUpdateInput struct {
16-
// CheckUpdateInput
17-
18-
// FileExtensions []string `json:"fileExtensions,omitempty"`
19-
// FileContentsPredicate *PredicateInput `json:"fileContentsPredicate,omitempty"`
20-
// }
21-
228
func (client *Client) CreateCheckRepositorySearch(input CheckRepositorySearchCreateInput) (*Check, error) {
239
var m struct {
2410
Payload CheckResponsePayload `graphql:"checkRepositorySearchCreate(input: $input)"`

Diff for: check_service_config.go

-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
package opslevel
22

3-
// type CheckServiceConfigurationCreateInput struct {
4-
// CheckCreateInput
5-
// }
6-
7-
// type CheckServiceConfigurationUpdateInput struct {
8-
// CheckUpdateInput
9-
// }
10-
113
func (client *Client) CreateCheckServiceConfiguration(input CheckServiceConfigurationCreateInput) (*Check, error) {
124
var m struct {
135
Payload CheckResponsePayload `graphql:"checkServiceConfigurationCreate(input: $input)"`

0 commit comments

Comments
 (0)