model

package
v0.0.0-...-4acccc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllCatType = []CatType{
	CatTypeHome,
	CatTypeStreet,
}

Functions

This section is empty.

Types

type Alligator

type Alligator struct {
	Class     Class  `json:"class"`
	Dangerous string `json:"dangerous"`
	Gender    Gender `json:"gender"`
	Name      string `json:"name"`
}

func (Alligator) GetClass

func (this Alligator) GetClass() Class

func (Alligator) GetGender

func (this Alligator) GetGender() Gender

func (Alligator) GetName

func (this Alligator) GetName() string

func (Alligator) IsAnimal

func (Alligator) IsAnimal()

func (Alligator) IsPet

func (Alligator) IsPet()

type Animal

type Animal interface {
	IsAnimal()
	GetClass() Class
	GetGender() Gender
}

type Cat

type Cat struct {
	Class  Class   `json:"class"`
	Gender Gender  `json:"gender"`
	Name   string  `json:"name"`
	Type   CatType `json:"type"`
}

func (Cat) GetClass

func (this Cat) GetClass() Class

func (Cat) GetGender

func (this Cat) GetGender() Gender

func (Cat) GetName

func (this Cat) GetName() string

func (Cat) IsAnimal

func (Cat) IsAnimal()

func (Cat) IsPet

func (Cat) IsPet()

type CatType

type CatType string
const (
	CatTypeHome   CatType = "HOME"
	CatTypeStreet CatType = "STREET"
)

func (CatType) IsValid

func (e CatType) IsValid() bool

func (CatType) MarshalGQL

func (e CatType) MarshalGQL(w io.Writer)

func (CatType) String

func (e CatType) String() string

func (*CatType) UnmarshalGQL

func (e *CatType) UnmarshalGQL(v interface{}) error

type Class

type Class string
const (
	ClassFish    Class = "FISH"
	ClassMammal  Class = "MAMMAL"
	ClassReptile Class = "REPTILE"
)

func (Class) IsValid

func (e Class) IsValid() bool

func (Class) MarshalGQL

func (e Class) MarshalGQL(w io.Writer)

func (Class) String

func (e Class) String() string

func (*Class) UnmarshalGQL

func (e *Class) UnmarshalGQL(v interface{}) error

type Details

type Details struct {
	Forename      string         `json:"forename"`
	Middlename    *string        `json:"middlename,omitempty"`
	Surname       string         `json:"surname"`
	HasChildren   bool           `json:"hasChildren"`
	MaritalStatus *MaritalStatus `json:"maritalStatus,omitempty"`
	Nationality   Nationality    `json:"nationality"`
	Pets          []Pet          `json:"pets,omitempty"`
}

type Dog

type Dog struct {
	Breed  DogBreed `json:"breed"`
	Class  Class    `json:"class"`
	Gender Gender   `json:"gender"`
	Name   string   `json:"name"`
}

func (Dog) GetClass

func (this Dog) GetClass() Class

func (Dog) GetGender

func (this Dog) GetGender() Gender

func (Dog) GetName

func (this Dog) GetName() string

func (Dog) IsAnimal

func (Dog) IsAnimal()

func (Dog) IsPet

func (Dog) IsPet()

type DogBreed

type DogBreed string
const (
	DogBreedGoldenRetriever  DogBreed = "GOLDEN_RETRIEVER"
	DogBreedPoodle           DogBreed = "POODLE"
	DogBreedRottweiler       DogBreed = "ROTTWEILER"
	DogBreedYorkshireTerrier DogBreed = "YORKSHIRE_TERRIER"
)

func (DogBreed) IsValid

func (e DogBreed) IsValid() bool

func (DogBreed) MarshalGQL

func (e DogBreed) MarshalGQL(w io.Writer)

func (DogBreed) String

func (e DogBreed) String() string

func (*DogBreed) UnmarshalGQL

func (e *DogBreed) UnmarshalGQL(v interface{}) error

type Employee

type Employee struct {
	ID      int      `json:"id"`
	Details *Details `json:"details,omitempty"`
}

func (Employee) IsEntity

func (Employee) IsEntity()

type Gender

type Gender string
const (
	GenderFemale  Gender = "FEMALE"
	GenderMale    Gender = "MALE"
	GenderUnknown Gender = "UNKNOWN"
)

func (Gender) IsValid

func (e Gender) IsValid() bool

func (Gender) MarshalGQL

func (e Gender) MarshalGQL(w io.Writer)

func (Gender) String

func (e Gender) String() string

func (*Gender) UnmarshalGQL

func (e *Gender) UnmarshalGQL(v interface{}) error

type MaritalStatus

type MaritalStatus string
const (
	MaritalStatusEngaged MaritalStatus = "ENGAGED"
	MaritalStatusMarried MaritalStatus = "MARRIED"
)

func (MaritalStatus) IsValid

func (e MaritalStatus) IsValid() bool

func (MaritalStatus) MarshalGQL

func (e MaritalStatus) MarshalGQL(w io.Writer)

func (MaritalStatus) String

func (e MaritalStatus) String() string

func (*MaritalStatus) UnmarshalGQL

func (e *MaritalStatus) UnmarshalGQL(v interface{}) error

type Mouse

type Mouse struct {
	Class  Class  `json:"class"`
	Gender Gender `json:"gender"`
	Name   string `json:"name"`
}

func (Mouse) GetClass

func (this Mouse) GetClass() Class

func (Mouse) GetGender

func (this Mouse) GetGender() Gender

func (Mouse) GetName

func (this Mouse) GetName() string

func (Mouse) IsAnimal

func (Mouse) IsAnimal()

func (Mouse) IsPet

func (Mouse) IsPet()

type Nationality

type Nationality string
const (
	NationalityAmerican  Nationality = "AMERICAN"
	NationalityDutch     Nationality = "DUTCH"
	NationalityEnglish   Nationality = "ENGLISH"
	NationalityGerman    Nationality = "GERMAN"
	NationalityIndian    Nationality = "INDIAN"
	NationalitySpanish   Nationality = "SPANISH"
	NationalityUkrainian Nationality = "UKRAINIAN"
)

func (Nationality) IsValid

func (e Nationality) IsValid() bool

func (Nationality) MarshalGQL

func (e Nationality) MarshalGQL(w io.Writer)

func (Nationality) String

func (e Nationality) String() string

func (*Nationality) UnmarshalGQL

func (e *Nationality) UnmarshalGQL(v interface{}) error

type NestedSearchInput

type NestedSearchInput struct {
	MaritalStatus *MaritalStatus `json:"maritalStatus,omitempty"`
	HasChildren   *bool          `json:"hasChildren,omitempty"`
}

type Pet

type Pet interface {
	IsAnimal()
	IsPet()
	GetClass() Class
	GetGender() Gender
	GetName() string
}

type Pony

type Pony struct {
	Class  Class  `json:"class"`
	Gender Gender `json:"gender"`
	Name   string `json:"name"`
}

func (Pony) GetClass

func (this Pony) GetClass() Class

func (Pony) GetGender

func (this Pony) GetGender() Gender

func (Pony) GetName

func (this Pony) GetName() string

func (Pony) IsAnimal

func (Pony) IsAnimal()

func (Pony) IsPet

func (Pony) IsPet()

type Query

type Query struct {
}

type SearchInput

type SearchInput struct {
	HasPets     *bool              `json:"hasPets,omitempty"`
	Nationality *Nationality       `json:"nationality,omitempty"`
	Nested      *NestedSearchInput `json:"nested,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL