generated

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: GPL-3.0, GPL-3.0-or-later Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type Alphabet

type Alphabet struct {
	Code       string       `json:"code"`
	Name       string       `json:"name"`
	Script     *Script      `json:"script"`
	Characters *string      `json:"characters"`
	Languages  []*Language  `json:"languages"`
	References []*Reference `json:"references"`
}

type ComplexityRoot

type ComplexityRoot struct {
	Alphabet struct {
		Characters func(childComplexity int) int
		Code       func(childComplexity int) int
		Languages  func(childComplexity int) int
		Name       func(childComplexity int) int
		References func(childComplexity int) int
		Script     func(childComplexity int) int
	}

	Expression struct {
		ID                   func(childComplexity int) int
		Languages            func(childComplexity int) int
		Lexeme               func(childComplexity int) int
		LiteralTranslation   func(childComplexity int) int
		Meaning              func(childComplexity int) int
		NounType             func(childComplexity int) int
		PartOfSpeech         func(childComplexity int) int
		PracticalTranslation func(childComplexity int) int
		References           func(childComplexity int) int
		RelatedExpressions   func(childComplexity int) int
		Tags                 func(childComplexity int) int
		Titles               func(childComplexity int) int
		Type                 func(childComplexity int) int
	}

	Language struct {
		Alphabets        func(childComplexity int) int
		Code             func(childComplexity int) int
		GlottologID      func(childComplexity int) int
		IsFamily         func(childComplexity int) int
		Lexifier         func(childComplexity int) int
		Names            func(childComplexity int) int
		Parent           func(childComplexity int) int
		References       func(childComplexity int) int
		RelatedLanguages func(childComplexity int) int
	}

	Query struct {
		Alphabets   func(childComplexity int) int
		Expressions func(childComplexity int) int
		Language    func(childComplexity int, code string) int
		Languages   func(childComplexity int) int
	}

	Reference struct {
		Mla  func(childComplexity int) int
		Type func(childComplexity int) int
	}

	Script struct {
		Code  func(childComplexity int) int
		Names func(childComplexity int) int
	}

	Story struct {
		Language func(childComplexity int) int
		Lines    func(childComplexity int) int
		Script   func(childComplexity int) int
		Type     func(childComplexity int) int
	}

	StoryLine struct {
		Content func(childComplexity int) int
		Story   func(childComplexity int) int
	}

	Tag struct {
		Name func(childComplexity int) int
	}

	Transliteration struct {
		TransliterationLangCode   func(childComplexity int) int
		TransliterationScriptCode func(childComplexity int) int
		Value                     func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type Expression

type Expression struct {
	ID                   string             `json:"id"`
	Type                 ExpressionType     `json:"type"`
	Titles               []*Transliteration `json:"titles"`
	Languages            []*Language        `json:"languages"`
	PartOfSpeech         *PartOfSpeech      `json:"partOfSpeech"`
	NounType             *NounType          `json:"nounType"`
	Lexeme               *Expression        `json:"lexeme"`
	LiteralTranslation   *string            `json:"literalTranslation"`
	PracticalTranslation *string            `json:"practicalTranslation"`
	Meaning              *string            `json:"meaning"`
	Tags                 []*Tag             `json:"tags"`
	RelatedExpressions   []*Expression      `json:"relatedExpressions"`
	References           []*Reference       `json:"references"`
}

type ExpressionType

type ExpressionType string
const (
	ExpressionTypeExpression ExpressionType = "Expression"
	ExpressionTypePhrase     ExpressionType = "Phrase"
	ExpressionTypeProverb    ExpressionType = "Proverb"
	ExpressionTypeWord       ExpressionType = "Word"
)

func (ExpressionType) IsValid

func (e ExpressionType) IsValid() bool

func (ExpressionType) MarshalGQL

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

func (ExpressionType) String

func (e ExpressionType) String() string

func (*ExpressionType) UnmarshalGQL

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

type Language

type Language struct {
	Code             string             `json:"code"`
	Names            []*Transliteration `json:"names"`
	Parent           *Language          `json:"parent"`
	Lexifier         *Language          `json:"lexifier"`
	RelatedLanguages []*Language        `json:"relatedLanguages"`
	GlottologID      *string            `json:"glottologId"`
	Alphabets        []*Alphabet        `json:"alphabets"`
	IsFamily         *bool              `json:"isFamily"`
	References       []*Reference       `json:"references"`
}

type NounType

type NounType string
const (
	NounTypeName   NounType = "Name"
	NounTypePlace  NounType = "Place"
	NounTypePerson NounType = "Person"
)

func (NounType) IsValid

func (e NounType) IsValid() bool

func (NounType) MarshalGQL

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

func (NounType) String

func (e NounType) String() string

func (*NounType) UnmarshalGQL

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

type PartOfSpeech

type PartOfSpeech string
const (
	PartOfSpeechAdjective    PartOfSpeech = "Adjective"
	PartOfSpeechAdverb       PartOfSpeech = "Adverb"
	PartOfSpeechConjunction  PartOfSpeech = "Conjunction"
	PartOfSpeechInterjection PartOfSpeech = "Interjection"
	PartOfSpeechNoun         PartOfSpeech = "Noun"
	PartOfSpeechPreposition  PartOfSpeech = "Preposition"
	PartOfSpeechPronoun      PartOfSpeech = "Pronoun"
	PartOfSpeechVerb         PartOfSpeech = "Verb"
	PartOfSpeechPrefix       PartOfSpeech = "Prefix"
	PartOfSpeechSuffix       PartOfSpeech = "Suffix"
)

func (PartOfSpeech) IsValid

func (e PartOfSpeech) IsValid() bool

func (PartOfSpeech) MarshalGQL

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

func (PartOfSpeech) String

func (e PartOfSpeech) String() string

func (*PartOfSpeech) UnmarshalGQL

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

type QueryResolver

type QueryResolver interface {
	Alphabets(ctx context.Context) ([]*Alphabet, error)
	Expressions(ctx context.Context) ([]*Expression, error)
	Languages(ctx context.Context) ([]*Language, error)
	Language(ctx context.Context, code string) (*Language, error)
}

type Reference

type Reference struct {
	Type ReferenceType `json:"type"`
	Mla  *string       `json:"mla"`
}

type ReferenceType

type ReferenceType string
const (
	ReferenceTypeArticle      ReferenceType = "Article"
	ReferenceTypeAudio        ReferenceType = "Audio"
	ReferenceTypeBook         ReferenceType = "Book"
	ReferenceTypeEncyclopedia ReferenceType = "Encyclopedia"
	ReferenceTypeFilm         ReferenceType = "Film"
	ReferenceTypeInterview    ReferenceType = "Interview"
	ReferenceTypePaper        ReferenceType = "Paper"
	ReferenceTypePerson       ReferenceType = "Person"
	ReferenceTypeReport       ReferenceType = "Report"
	ReferenceTypeSocialMedia  ReferenceType = "SocialMedia"
	ReferenceTypeSong         ReferenceType = "Song"
	ReferenceTypeVideo        ReferenceType = "Video"
	ReferenceTypeWebsite      ReferenceType = "Website"
	ReferenceTypeOther        ReferenceType = "Other"
)

func (ReferenceType) IsValid

func (e ReferenceType) IsValid() bool

func (ReferenceType) MarshalGQL

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

func (ReferenceType) String

func (e ReferenceType) String() string

func (*ReferenceType) UnmarshalGQL

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

type ResolverRoot

type ResolverRoot interface {
	Query() QueryResolver
}

type Script

type Script struct {
	Code  string             `json:"code"`
	Names []*Transliteration `json:"names"`
}

type Story

type Story struct {
	Type     StoryType    `json:"type"`
	Lines    []*StoryLine `json:"lines"`
	Language *Language    `json:"language"`
	Script   *Script      `json:"script"`
}

type StoryLine

type StoryLine struct {
	Story   *Story `json:"story"`
	Content string `json:"content"`
}

type StoryType

type StoryType string
const (
	StoryTypePoem  StoryType = "Poem"
	StoryTypeSong  StoryType = "Song"
	StoryTypeStory StoryType = "Story"
)

func (StoryType) IsValid

func (e StoryType) IsValid() bool

func (StoryType) MarshalGQL

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

func (StoryType) String

func (e StoryType) String() string

func (*StoryType) UnmarshalGQL

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

type Tag

type Tag struct {
	Name string `json:"name"`
}

type Transliteration

type Transliteration struct {
	Value                     string  `json:"value"`
	TransliterationLangCode   *string `json:"transliterationLangCode"`
	TransliterationScriptCode *string `json:"transliterationScriptCode"`
}

Jump to

Keyboard shortcuts

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