300 lines
8.1 KiB
Go
300 lines
8.1 KiB
Go
// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
|
|
|
|
package model
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
"strconv"
|
|
)
|
|
|
|
// A pentascale of derivational morphologies
|
|
type DMPenta struct {
|
|
Spelling string `json:"spelling"`
|
|
Name *string `json:"name,omitempty"`
|
|
Extremes *Extremes `json:"extremes,omitempty"`
|
|
}
|
|
|
|
// A shenikan-english definition
|
|
type Definition struct {
|
|
Pos PartOfSpeech `json:"pos"`
|
|
Short string `json:"short"`
|
|
Long *string `json:"long,omitempty"`
|
|
}
|
|
|
|
// A shenikan derivation
|
|
type Derivation struct {
|
|
Root string `json:"root"`
|
|
Via []string `json:"via"`
|
|
}
|
|
|
|
// A shenikan derivational morphology
|
|
type DerivationalMorphology struct {
|
|
Spelling string `json:"spelling"`
|
|
Definitions []Definition `json:"definitions"`
|
|
}
|
|
|
|
// A shenikan dialect
|
|
type Dialect struct {
|
|
Name string `json:"name"`
|
|
Replacements []Replacement `json:"replacements"`
|
|
}
|
|
|
|
// A whole shenikan dictionary.
|
|
type Dictionary struct {
|
|
Glyphs []Glyph `json:"glyphs"`
|
|
Dialects []Dialect `json:"dialects"`
|
|
Dms []DerivationalMorphology `json:"dms"`
|
|
DmPentas []DMPenta `json:"dmPentas"`
|
|
Words []Word `json:"words"`
|
|
Pentas []Penta `json:"pentas"`
|
|
Icosas []Icosa `json:"icosas"`
|
|
}
|
|
|
|
// The extremes of an icosapentascale
|
|
type DoubleExtremes struct {
|
|
Ix *string `json:"ix,omitempty"`
|
|
Ux *string `json:"ux,omitempty"`
|
|
Xi *string `json:"xi,omitempty"`
|
|
Xu *string `json:"xu,omitempty"`
|
|
}
|
|
|
|
// The extremes of a pentascale
|
|
type Extremes struct {
|
|
I *string `json:"i,omitempty"`
|
|
U *string `json:"u,omitempty"`
|
|
}
|
|
|
|
// A glyph in a shenikan dictionary.
|
|
type Glyph struct {
|
|
Kind GlyphKind `json:"kind"`
|
|
Ortho string `json:"ortho"`
|
|
Attrs []GlyphAttribute `json:"attrs"`
|
|
}
|
|
|
|
// An icosapentascale of words
|
|
type Icosa struct {
|
|
Spelling string `json:"spelling"`
|
|
Name *string `json:"name,omitempty"`
|
|
Extremes *DoubleExtremes `json:"extremes,omitempty"`
|
|
}
|
|
|
|
// A pentascale of words
|
|
type Penta struct {
|
|
Spelling string `json:"spelling"`
|
|
Name *string `json:"name,omitempty"`
|
|
Extremes *Extremes `json:"extremes,omitempty"`
|
|
}
|
|
|
|
type Query struct {
|
|
}
|
|
|
|
// A consonant cluster replacement for a dialect
|
|
type Replacement struct {
|
|
Old string `json:"old"`
|
|
New string `json:"new"`
|
|
}
|
|
|
|
// A shenikan word
|
|
type Word struct {
|
|
Spelling string `json:"spelling"`
|
|
Definitions []Definition `json:"definitions"`
|
|
Derivations []Derivation `json:"derivations"`
|
|
}
|
|
|
|
// The determining attributes of a glyph.
|
|
type GlyphAttribute string
|
|
|
|
const (
|
|
// Marks an outer vowel. (valid for VOWEL/SYLLABLE glyphs)
|
|
GlyphAttributeOuter GlyphAttribute = "OUTER"
|
|
// Marks a slashed vowel. (valid for VOWEL/SYLLABLE glyphs)
|
|
GlyphAttributeSLAShed GlyphAttribute = "SLASHED"
|
|
// Marks an inner vowel. (valid for VOWEL/SYLLABLE glyphs)
|
|
GlyphAttributeInner GlyphAttribute = "INNER"
|
|
// Marks a left consonant cluster or punctuation. (valid for CLUSTER/VOWEL/PUNCTUATION glyphs)
|
|
GlyphAttributeLeft GlyphAttribute = "LEFT"
|
|
// Marks a center consonant cluster. (valid for CLUSTER/VOWEL glyphs)
|
|
GlyphAttributeCenter GlyphAttribute = "CENTER"
|
|
// Marks a right consonant cluster or punctuation. (valid for CLUSTER/VOWEL/PUNCTUATION glyphs)
|
|
GlyphAttributeRight GlyphAttribute = "RIGHT"
|
|
// Marks a top consonant cluster. (valid for CLUSTER/VOWEL glyphs)
|
|
GlyphAttributeTop GlyphAttribute = "TOP"
|
|
// Marks a middle consonant cluster. (valid for CLUSTER/VOWEL glyphs)
|
|
GlyphAttributeMiddle GlyphAttribute = "MIDDLE"
|
|
// Marks a bottom consonant cluster. (valid for CLUSTER/VOWEL glyphs)
|
|
GlyphAttributeBottom GlyphAttribute = "BOTTOM"
|
|
// Marks a tall consonant cluster. (valid for CLUSTER/VOWEL glyphs)
|
|
GlyphAttributeTall GlyphAttribute = "TALL"
|
|
// Marks a wide consonant cluster. (valid for CLUSTER/VOWEL glyphs)
|
|
GlyphAttributeWide GlyphAttribute = "WIDE"
|
|
// Marks a tall and wide consonant cluster. (valid for CLUSTER/VOWEL glyphs)
|
|
GlyphAttributeBoth GlyphAttribute = "BOTH"
|
|
// Marks a circular number. (valid for NUMERIC glyphs)
|
|
GlyphAttributeCircle GlyphAttribute = "CIRCLE"
|
|
// Marks a dash number. (valid for NUMERIC glyphs)
|
|
GlyphAttributeDash GlyphAttribute = "DASH"
|
|
// Marks a vee number. (valid for NUMERIC glyphs)
|
|
GlyphAttributeVee GlyphAttribute = "VEE"
|
|
// Marks a hump number. (valid for NUMERIC glyphs)
|
|
GlyphAttributeHump GlyphAttribute = "HUMP"
|
|
// Marks a dot number. (valid for NUMERIC glyphs)
|
|
GlyphAttributeDot GlyphAttribute = "DOT"
|
|
)
|
|
|
|
var AllGlyphAttribute = []GlyphAttribute{
|
|
GlyphAttributeOuter,
|
|
GlyphAttributeSLAShed,
|
|
GlyphAttributeInner,
|
|
GlyphAttributeLeft,
|
|
GlyphAttributeCenter,
|
|
GlyphAttributeRight,
|
|
GlyphAttributeTop,
|
|
GlyphAttributeMiddle,
|
|
GlyphAttributeBottom,
|
|
GlyphAttributeTall,
|
|
GlyphAttributeWide,
|
|
GlyphAttributeBoth,
|
|
GlyphAttributeCircle,
|
|
GlyphAttributeDash,
|
|
GlyphAttributeVee,
|
|
GlyphAttributeHump,
|
|
GlyphAttributeDot,
|
|
}
|
|
|
|
func (e GlyphAttribute) IsValid() bool {
|
|
switch e {
|
|
case GlyphAttributeOuter, GlyphAttributeSLAShed, GlyphAttributeInner, GlyphAttributeLeft, GlyphAttributeCenter, GlyphAttributeRight, GlyphAttributeTop, GlyphAttributeMiddle, GlyphAttributeBottom, GlyphAttributeTall, GlyphAttributeWide, GlyphAttributeBoth, GlyphAttributeCircle, GlyphAttributeDash, GlyphAttributeVee, GlyphAttributeHump, GlyphAttributeDot:
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (e GlyphAttribute) String() string {
|
|
return string(e)
|
|
}
|
|
|
|
func (e *GlyphAttribute) UnmarshalGQL(v any) error {
|
|
str, ok := v.(string)
|
|
if !ok {
|
|
return fmt.Errorf("enums must be strings")
|
|
}
|
|
|
|
*e = GlyphAttribute(str)
|
|
if !e.IsValid() {
|
|
return fmt.Errorf("%s is not a valid GlyphAttribute", str)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (e GlyphAttribute) MarshalGQL(w io.Writer) {
|
|
fmt.Fprint(w, strconv.Quote(e.String()))
|
|
}
|
|
|
|
// The kind of a glyph.
|
|
type GlyphKind string
|
|
|
|
const (
|
|
// A bare vowel cluster.
|
|
GlyphKindVowel GlyphKind = "VOWEL"
|
|
// A consonant cluster.
|
|
GlyphKindCluster GlyphKind = "CLUSTER"
|
|
// A punctuation mark.
|
|
GlyphKindPunctuation GlyphKind = "PUNCTUATION"
|
|
// A numeric or symbolic glyph.
|
|
GlyphKindNumeric GlyphKind = "NUMERIC"
|
|
// A complete syllable cluster.
|
|
GlyphKindSyllable GlyphKind = "SYLLABLE"
|
|
)
|
|
|
|
var AllGlyphKind = []GlyphKind{
|
|
GlyphKindVowel,
|
|
GlyphKindCluster,
|
|
GlyphKindPunctuation,
|
|
GlyphKindNumeric,
|
|
GlyphKindSyllable,
|
|
}
|
|
|
|
func (e GlyphKind) IsValid() bool {
|
|
switch e {
|
|
case GlyphKindVowel, GlyphKindCluster, GlyphKindPunctuation, GlyphKindNumeric, GlyphKindSyllable:
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (e GlyphKind) String() string {
|
|
return string(e)
|
|
}
|
|
|
|
func (e *GlyphKind) UnmarshalGQL(v any) error {
|
|
str, ok := v.(string)
|
|
if !ok {
|
|
return fmt.Errorf("enums must be strings")
|
|
}
|
|
|
|
*e = GlyphKind(str)
|
|
if !e.IsValid() {
|
|
return fmt.Errorf("%s is not a valid GlyphKind", str)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (e GlyphKind) MarshalGQL(w io.Writer) {
|
|
fmt.Fprint(w, strconv.Quote(e.String()))
|
|
}
|
|
|
|
// A part of speech
|
|
type PartOfSpeech string
|
|
|
|
const (
|
|
PartOfSpeechNoun PartOfSpeech = "NOUN"
|
|
PartOfSpeechPronoun PartOfSpeech = "PRONOUN"
|
|
PartOfSpeechVerb PartOfSpeech = "VERB"
|
|
PartOfSpeechAdjective PartOfSpeech = "ADJECTIVE"
|
|
PartOfSpeechAdverb PartOfSpeech = "ADVERB"
|
|
PartOfSpeechAdposition PartOfSpeech = "ADPOSITION"
|
|
PartOfSpeechConjunction PartOfSpeech = "CONJUNCTION"
|
|
PartOfSpeechSyntax PartOfSpeech = "SYNTAX"
|
|
)
|
|
|
|
var AllPartOfSpeech = []PartOfSpeech{
|
|
PartOfSpeechNoun,
|
|
PartOfSpeechPronoun,
|
|
PartOfSpeechVerb,
|
|
PartOfSpeechAdjective,
|
|
PartOfSpeechAdverb,
|
|
PartOfSpeechAdposition,
|
|
PartOfSpeechConjunction,
|
|
PartOfSpeechSyntax,
|
|
}
|
|
|
|
func (e PartOfSpeech) IsValid() bool {
|
|
switch e {
|
|
case PartOfSpeechNoun, PartOfSpeechPronoun, PartOfSpeechVerb, PartOfSpeechAdjective, PartOfSpeechAdverb, PartOfSpeechAdposition, PartOfSpeechConjunction, PartOfSpeechSyntax:
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (e PartOfSpeech) String() string {
|
|
return string(e)
|
|
}
|
|
|
|
func (e *PartOfSpeech) UnmarshalGQL(v any) error {
|
|
str, ok := v.(string)
|
|
if !ok {
|
|
return fmt.Errorf("enums must be strings")
|
|
}
|
|
|
|
*e = PartOfSpeech(str)
|
|
if !e.IsValid() {
|
|
return fmt.Errorf("%s is not a valid PartOfSpeech", str)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (e PartOfSpeech) MarshalGQL(w io.Writer) {
|
|
fmt.Fprint(w, strconv.Quote(e.String()))
|
|
}
|