Documentation ¶
Index ¶
- Variables
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- type Alphabet
- type ComplexityRoot
- type Config
- type DirectiveRoot
- type Expression
- type ExpressionType
- type Language
- type NounType
- type PartOfSpeech
- type QueryResolver
- type Reference
- type ReferenceType
- type ResolverRoot
- type Script
- type Story
- type StoryLine
- type StoryType
- type Tag
- type Transliteration
Constants ¶
This section is empty.
Variables ¶
View Source
var AllExpressionType = []ExpressionType{ ExpressionTypeExpression, ExpressionTypePhrase, ExpressionTypeProverb, ExpressionTypeWord, }
View Source
var AllNounType = []NounType{ NounTypeName, NounTypePlace, NounTypePerson, }
View Source
var AllPartOfSpeech = []PartOfSpeech{ PartOfSpeechAdjective, PartOfSpeechAdverb, PartOfSpeechConjunction, PartOfSpeechInterjection, PartOfSpeechNoun, PartOfSpeechPreposition, PartOfSpeechPronoun, PartOfSpeechVerb, PartOfSpeechPrefix, PartOfSpeechSuffix, }
View Source
var AllReferenceType = []ReferenceType{ ReferenceTypeArticle, ReferenceTypeAudio, ReferenceTypeBook, ReferenceTypeEncyclopedia, ReferenceTypeFilm, ReferenceTypeInterview, ReferenceTypePaper, ReferenceTypePerson, ReferenceTypeReport, ReferenceTypeSocialMedia, ReferenceTypeSong, ReferenceTypeVideo, ReferenceTypeWebsite, ReferenceTypeOther, }
View Source
var AllStoryType = []StoryType{ StoryTypePoem, StoryTypeSong, StoryTypeStory, }
Functions ¶
func NewExecutableSchema ¶
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
Types ¶
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 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 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 StoryType ¶
type StoryType string
func (StoryType) MarshalGQL ¶
func (*StoryType) UnmarshalGQL ¶
type Transliteration ¶
Click to show internal directories.
Click to hide internal directories.