From fe59b4210a92c659e74f6adf01a7b7c3b7a0ed1f Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 24 Mar 2022 14:42:26 +0100 Subject: [PATCH] Remove models_gen.go --- .gitignore | 2 +- api/graph/model/models_gen.go | 308 ---------------------------------- 2 files changed, 1 insertion(+), 309 deletions(-) delete mode 100644 api/graph/model/models_gen.go diff --git a/.gitignore b/.gitignore index 81d115b..db2308d 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,4 @@ overrides/ build api/api api/graph/api/generated.go -api/loaders/*_gen.go +*_gen.go diff --git a/api/graph/model/models_gen.go b/api/graph/model/models_gen.go deleted file mode 100644 index 2ed1518..0000000 --- a/api/graph/model/models_gen.go +++ /dev/null @@ -1,308 +0,0 @@ -// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. - -package model - -import ( - "fmt" - "io" - "strconv" - "time" - - "git.sr.ht/~sircmpwn/core-go/model" -) - -type ACL interface { - IsACL() -} - -type ActivitySubscription interface { - IsActivitySubscription() -} - -type Entity interface { - IsEntity() -} - -type ACLInput struct { - Browse bool `json:"browse"` - Reply bool `json:"reply"` - Post bool `json:"post"` - Moderate bool `json:"moderate"` -} - -// A cursor for enumerating subscriptions -// -// If there are additional results available, the cursor object may be passed -// back into the same endpoint to retrieve another page. If the cursor is null, -// there are no remaining results to return. -type ActivitySubscriptionCursor struct { - Results []ActivitySubscription `json:"results"` - Cursor *model.Cursor `json:"cursor"` -} - -// A cursor for enumerating emails -// -// If there are additional results available, the cursor object may be passed -// back into the same endpoint to retrieve another page. If the cursor is null, -// there are no remaining results to return. -type EmailCursor struct { - Results []*Email `json:"results"` - Cursor *model.Cursor `json:"cursor"` -} - -// A cursor for enumerating ACL entries -// -// If there are additional results available, the cursor object may be passed -// back into the same endpoint to retrieve another page. If the cursor is null, -// there are no remaining results to return. -type MailingListACLCursor struct { - Results []*MailingListACL `json:"results"` - Cursor *model.Cursor `json:"cursor"` -} - -// A cursor for enumerating mailing lists -// -// If there are additional results available, the cursor object may be passed -// back into the same endpoint to retrieve another page. If the cursor is null, -// there are no remaining results to return. -type MailingListCursor struct { - Results []*MailingList `json:"results"` - Cursor *model.Cursor `json:"cursor"` -} - -// Information parsed from the subject line of a patch, such that the following: -// -// [PATCH myproject v2 3/4] Add foo to bar -// -// Will produce: -// -// index: 3 -// count: 4 -// version: 2 -// prefix: "myproject" -// subject: "Add foo to bar" -type Patch struct { - Index *int `json:"index"` - Count *int `json:"count"` - Version *int `json:"version"` - Prefix *string `json:"prefix"` - Subject *string `json:"subject"` -} - -// A cursor for enumerating patchsets -// -// If there are additional results available, the cursor object may be passed -// back into the same endpoint to retrieve another page. If the cursor is null, -// there are no remaining results to return. -type PatchsetCursor struct { - Results []*Patchset `json:"results"` - Cursor *model.Cursor `json:"cursor"` -} - -// A cursor for enumerating threads -// -// If there are additional results available, the cursor object may be passed -// back into the same endpoint to retrieve another page. If the cursor is null, -// there are no remaining results to return. -type ThreadCursor struct { - Results []*Thread `json:"results"` - Cursor *model.Cursor `json:"cursor"` -} - -type Version struct { - Major int `json:"major"` - Minor int `json:"minor"` - Patch int `json:"patch"` - // If this API version is scheduled for deprecation, this is the date on which - // it will stop working; or null if this API version is not scheduled for - // deprecation. - DeprecationDate *time.Time `json:"deprecationDate"` -} - -type AccessKind string - -const ( - AccessKindRo AccessKind = "RO" - AccessKindRw AccessKind = "RW" -) - -var AllAccessKind = []AccessKind{ - AccessKindRo, - AccessKindRw, -} - -func (e AccessKind) IsValid() bool { - switch e { - case AccessKindRo, AccessKindRw: - return true - } - return false -} - -func (e AccessKind) String() string { - return string(e) -} - -func (e *AccessKind) UnmarshalGQL(v interface{}) error { - str, ok := v.(string) - if !ok { - return fmt.Errorf("enums must be strings") - } - - *e = AccessKind(str) - if !e.IsValid() { - return fmt.Errorf("%s is not a valid AccessKind", str) - } - return nil -} - -func (e AccessKind) MarshalGQL(w io.Writer) { - fmt.Fprint(w, strconv.Quote(e.String())) -} - -type AccessScope string - -const ( - AccessScopeACLS AccessScope = "ACLS" - AccessScopeEmails AccessScope = "EMAILS" - AccessScopeLists AccessScope = "LISTS" - AccessScopePatches AccessScope = "PATCHES" - AccessScopeProfile AccessScope = "PROFILE" - AccessScopeSubscriptions AccessScope = "SUBSCRIPTIONS" -) - -var AllAccessScope = []AccessScope{ - AccessScopeACLS, - AccessScopeEmails, - AccessScopeLists, - AccessScopePatches, - AccessScopeProfile, - AccessScopeSubscriptions, -} - -func (e AccessScope) IsValid() bool { - switch e { - case AccessScopeACLS, AccessScopeEmails, AccessScopeLists, AccessScopePatches, AccessScopeProfile, AccessScopeSubscriptions: - return true - } - return false -} - -func (e AccessScope) String() string { - return string(e) -} - -func (e *AccessScope) UnmarshalGQL(v interface{}) error { - str, ok := v.(string) - if !ok { - return fmt.Errorf("enums must be strings") - } - - *e = AccessScope(str) - if !e.IsValid() { - return fmt.Errorf("%s is not a valid AccessScope", str) - } - return nil -} - -func (e AccessScope) MarshalGQL(w io.Writer) { - fmt.Fprint(w, strconv.Quote(e.String())) -} - -type PatchsetStatus string - -const ( - PatchsetStatusUnknown PatchsetStatus = "UNKNOWN" - PatchsetStatusProposed PatchsetStatus = "PROPOSED" - PatchsetStatusNeedsRevision PatchsetStatus = "NEEDS_REVISION" - PatchsetStatusSuperseded PatchsetStatus = "SUPERSEDED" - PatchsetStatusApproved PatchsetStatus = "APPROVED" - PatchsetStatusRejected PatchsetStatus = "REJECTED" - PatchsetStatusApplied PatchsetStatus = "APPLIED" -) - -var AllPatchsetStatus = []PatchsetStatus{ - PatchsetStatusUnknown, - PatchsetStatusProposed, - PatchsetStatusNeedsRevision, - PatchsetStatusSuperseded, - PatchsetStatusApproved, - PatchsetStatusRejected, - PatchsetStatusApplied, -} - -func (e PatchsetStatus) IsValid() bool { - switch e { - case PatchsetStatusUnknown, PatchsetStatusProposed, PatchsetStatusNeedsRevision, PatchsetStatusSuperseded, PatchsetStatusApproved, PatchsetStatusRejected, PatchsetStatusApplied: - return true - } - return false -} - -func (e PatchsetStatus) String() string { - return string(e) -} - -func (e *PatchsetStatus) UnmarshalGQL(v interface{}) error { - str, ok := v.(string) - if !ok { - return fmt.Errorf("enums must be strings") - } - - *e = PatchsetStatus(str) - if !e.IsValid() { - return fmt.Errorf("%s is not a valid PatchsetStatus", str) - } - return nil -} - -func (e PatchsetStatus) MarshalGQL(w io.Writer) { - fmt.Fprint(w, strconv.Quote(e.String())) -} - -type ToolIcon string - -const ( - ToolIconPending ToolIcon = "PENDING" - ToolIconWaiting ToolIcon = "WAITING" - ToolIconSuccess ToolIcon = "SUCCESS" - ToolIconFailed ToolIcon = "FAILED" - ToolIconCancelled ToolIcon = "CANCELLED" -) - -var AllToolIcon = []ToolIcon{ - ToolIconPending, - ToolIconWaiting, - ToolIconSuccess, - ToolIconFailed, - ToolIconCancelled, -} - -func (e ToolIcon) IsValid() bool { - switch e { - case ToolIconPending, ToolIconWaiting, ToolIconSuccess, ToolIconFailed, ToolIconCancelled: - return true - } - return false -} - -func (e ToolIcon) String() string { - return string(e) -} - -func (e *ToolIcon) UnmarshalGQL(v interface{}) error { - str, ok := v.(string) - if !ok { - return fmt.Errorf("enums must be strings") - } - - *e = ToolIcon(str) - if !e.IsValid() { - return fmt.Errorf("%s is not a valid ToolIcon", str) - } - return nil -} - -func (e ToolIcon) MarshalGQL(w io.Writer) { - fmt.Fprint(w, strconv.Quote(e.String())) -}