Remove models_gen.go
This commit is contained in:
parent
f5a92e69c5
commit
32a94d2478
|
@ -15,5 +15,5 @@ overrides/
|
|||
.pgp
|
||||
build
|
||||
api/api
|
||||
api/loaders/*_gen.go
|
||||
*_gen.go
|
||||
api/graph/api/generated.go
|
||||
|
|
|
@ -1,164 +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 Entity interface {
|
||||
IsEntity()
|
||||
}
|
||||
|
||||
// A cursor for enumerating pastes
|
||||
//
|
||||
// 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 PasteCursor struct {
|
||||
Results []*Paste `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 (
|
||||
AccessScopeProfile AccessScope = "PROFILE"
|
||||
AccessScopePastes AccessScope = "PASTES"
|
||||
)
|
||||
|
||||
var AllAccessScope = []AccessScope{
|
||||
AccessScopeProfile,
|
||||
AccessScopePastes,
|
||||
}
|
||||
|
||||
func (e AccessScope) IsValid() bool {
|
||||
switch e {
|
||||
case AccessScopeProfile, AccessScopePastes:
|
||||
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 Visibility string
|
||||
|
||||
const (
|
||||
// Visible to everyone, listed on your profile
|
||||
VisibilityPublic Visibility = "PUBLIC"
|
||||
// Visible to everyone (if they know the URL), not listed on your profile
|
||||
VisibilityUnlisted Visibility = "UNLISTED"
|
||||
// Not visible to anyone except those explicitly added to the access list
|
||||
VisibilityPrivate Visibility = "PRIVATE"
|
||||
)
|
||||
|
||||
var AllVisibility = []Visibility{
|
||||
VisibilityPublic,
|
||||
VisibilityUnlisted,
|
||||
VisibilityPrivate,
|
||||
}
|
||||
|
||||
func (e Visibility) IsValid() bool {
|
||||
switch e {
|
||||
case VisibilityPublic, VisibilityUnlisted, VisibilityPrivate:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (e Visibility) String() string {
|
||||
return string(e)
|
||||
}
|
||||
|
||||
func (e *Visibility) UnmarshalGQL(v interface{}) error {
|
||||
str, ok := v.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("enums must be strings")
|
||||
}
|
||||
|
||||
*e = Visibility(str)
|
||||
if !e.IsValid() {
|
||||
return fmt.Errorf("%s is not a valid Visibility", str)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e Visibility) MarshalGQL(w io.Writer) {
|
||||
fmt.Fprint(w, strconv.Quote(e.String()))
|
||||
}
|
Loading…
Reference in New Issue