Documentation ¶
Index ¶
- Constants
- type Aggregate
- type AggregateResult
- type AggregatedOptions
- type AggregationResult
- type AnalyzeResult
- type AnalyzeTextRequest
- type AnalyzeTextResponse
- type AnswerRequest
- type AnswerSection
- type AuthorBasedContent
- type AuthorBasedResponse
- type AuthorbasedQuiz
- type AuthorbasedQuizResponse
- type Biblos
- type CheckTextRequest
- type CheckTextResponse
- type ComprehensiveResponse
- type Conjugations
- type CreateTextRequest
- type CreationRequest
- type DatabaseHealth
- type Declension
- type DeclensionConfig
- type DeclensionElement
- type DeclensionTranslationResults
- type Dialogue
- type DialogueAnswer
- type DialogueContent
- type DialogueCorrection
- type DialogueQuiz
- type ESAuthor
- type ESBook
- type ElasticErrorMessage
- type ElasticSearchError
- type ErrorModel
- type ExtendedResponse
- type FoundRules
- type GrammarQuestion
- type GrammarQuestionOptions
- type GrammarQuizAdded
- type Health
- type Hit
- type Logos
- type MediaContent
- type MediaQuiz
- type Memory
- type Meros
- type MethodError
- type MethodMessages
- type MultipleChoiceContent
- type MultipleChoiceQuiz
- type NotFoundError
- type NotFoundMessage
- type Options
- type QuizAttempt
- type QuizResponse
- type Reference
- type Result
- type ResultModel
- type Rhema
- type Rule
- type Section
- type Segment
- type SolonCreationRequest
- type SolonResponse
- type Text
- type Theme
- type TokenResponse
- type Translations
- type Typo
- type ValidationError
- type ValidationMessages
- type Word
Constants ¶
View Source
const ( MEDIA string = "media" AUTHORBASED string = "authorbased" MULTICHOICE string = "multiplechoice" DIALOGUE string = "dialogue" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregateResult ¶ added in v0.1.10
type AggregateResult struct {
Aggregates []Aggregate `json:"aggregates"`
}
type AggregatedOptions ¶ added in v0.1.39
type AggregatedOptions struct {
Themes []Theme `json:"themes"`
}
type AggregationResult ¶ added in v0.1.20
type AggregationResult struct {
Authors []ESAuthor `json:"authors"`
}
type AnalyzeResult ¶ added in v0.1.20
type AnalyzeResult struct { // example: text/author=herodotos&book=histories&reference=1.1 ReferenceLink string `json:"referenceLink"` // example: Herodotos // required: true Author string `json:"author"` // example: Histories // required: true Book string `json:"book"` // example: 1.1 // required: true Reference string `json:"reference"` Text Rhema `json:"text"` }
type AnalyzeTextRequest ¶ added in v0.1.20
type AnalyzeTextRequest struct { // example: Ἀθηναῖος // required: true Rootword string `json:"rootword"` }
type AnalyzeTextResponse ¶ added in v0.1.20
type AnalyzeTextResponse struct { // example: Ἀθηναῖος // required: true Rootword string `json:"rootword"` // example: ["Ἀθηναῖος"] // required: true PartOfSpeech string `json:"partOfSpeech"` Conjugations []Conjugations `json:"conjugations"` Results []AnalyzeResult `json:"texts"` }
type AnswerRequest ¶ added in v0.1.10
type AnswerRequest struct { Theme string `json:"theme"` Set string `json:"set"` QuizType string `json:"quizType"` Segment string `json:"segment,omitempty"` Comprehensive bool `json:"comprehensive,omitempty"` Answer string `json:"answer"` Dialogue []DialogueContent `json:"dialogue,omitempty"` QuizWord string `json:"quizWord"` }
type AnswerSection ¶ added in v0.1.20
type AnswerSection struct { // example: a // required: false Section string `json:"section"` // example: 9.09 // required: true LevenshteinPercentage string `json:"levenshteinPercentage"` // example: Such a step would not be condemned either by the gods who received our oaths, // required: true QuizSentence string `json:"quizSentence"` // example: this is an example answer" // required: true AnswerSentence string `json:"answerSentence"` }
type AuthorBasedContent ¶ added in v0.1.9
type AuthorBasedContent struct { Greek string `json:"greek"` Translation string `json:"translation"` WordsInText []string `json:"wordsInText"` HasGrammarQuestions bool `json:"hasGrammarQuestions"` GrammarQuestions []GrammarQuestion `json:"grammarQuestions,omitempty"` }
type AuthorBasedResponse ¶ added in v0.1.33
type AuthorbasedQuiz ¶ added in v0.1.29
type AuthorbasedQuiz struct { QuizType string `json:"quizType"` Theme string `json:"theme"` Set int `json:"set"` Segment string `json:"segment,omitempty"` Reference string `json:"reference"` FullSentence string `json:"fullSentence"` Translation string `json:"translation"` GrammarQuestionOptions GrammarQuestionOptions `json:"grammarQuestionOptions"` Content []AuthorBasedContent `json:"content"` }
type AuthorbasedQuizResponse ¶ added in v0.1.31
type AuthorbasedQuizResponse struct { FullSentence string `json:"fullSentence"` Translation string `json:"translation"` Reference string `json:"reference"` Quiz QuizResponse `json:"quiz"` GrammarQuiz []GrammarQuizAdded `json:"grammarQuiz,omitempty"` }
type CheckTextRequest ¶ added in v0.1.20
type CheckTextRequest struct { Translations []Translations `json:"translations"` // example: Herodotos // required: true Author string `json:"author"` // example: Histories // required: true Book string `json:"book"` // example: 1.1 // required: true Reference string `json:"reference"` }
type CheckTextResponse ¶ added in v0.1.20
type CheckTextResponse struct { AverageLevenshteinPercentage string `json:"averageLevenshteinPercentage"` Sections []AnswerSection `json:"sections"` PossibleTypos []Typo `json:"possibleTypos"` }
type ComprehensiveResponse ¶ added in v0.1.10
type ComprehensiveResponse struct { Correct bool `json:"correct"` QuizWord string `json:"quizWord"` FoundInText AnalyzeTextResponse `json:"foundInText,omitempty"` SimilarWords []Meros `json:"similarWords,omitempty"` Progress struct { TimesCorrect int `json:"timesCorrect"` TimesIncorrect int `json:"timesIncorrect"` AverageAccuracy float64 `json:"averageAccuracy"` } `json:"progress,omitempty"` }
type Conjugations ¶ added in v0.1.25
type CreateTextRequest ¶ added in v0.1.20
type CreateTextRequest struct { // example: Herodotos // required: true Author string `json:"author"` // example: Histories // required: true Book string `json:"book"` // example: 1.1 // required: true Reference string `json:"reference"` // example: a // required: false Section string `json:"section"` }
type CreationRequest ¶ added in v0.1.10
type DatabaseHealth ¶
type DatabaseHealth struct { // example: true Healthy bool `json:"healthy"` // example: aristoteles ClusterName string `json:"clusterName,omitempty"` // example: aristoteles-es-worker-0 ServerName string `json:"serverName,omitempty"` // example: 8.8.0 ServerVersion string `json:"serverVersion,omitempty"` }
type Declension ¶
type Declension struct { Name string `json:"name"` Type string `json:"type,omitempty"` Dialect string `json:"dialect"` Declensions []DeclensionElement `json:"declensions"` }
type DeclensionConfig ¶
type DeclensionConfig struct {
Declensions []Declension
}
type DeclensionElement ¶
type DeclensionTranslationResults ¶
type DeclensionTranslationResults struct {
Results []Result `json:"results"`
}
func (*DeclensionTranslationResults) RemoveIndex ¶
func (r *DeclensionTranslationResults) RemoveIndex(index int)
type DialogueAnswer ¶ added in v0.1.10
type DialogueAnswer struct { Percentage float64 `json:"percentage"` Input []DialogueContent `json:"input"` Answer []DialogueContent `json:"answer"` InWrongPlace []DialogueCorrection `json:"wronglyPlaced"` }
type DialogueContent ¶ added in v0.1.8
type DialogueCorrection ¶ added in v0.1.10
type DialogueQuiz ¶ added in v0.1.8
type DialogueQuiz struct { QuizMetadata struct { Language string `json:"language"` } `json:"quizMetadata"` Theme string `json:"theme,omitempty"` QuizType string `json:"quizType"` Set int `json:"set,omitempty"` Segment string `json:"segment,omitempty"` Reference string `json:"reference,omitempty"` Dialogue Dialogue `json:"dialogue,omitempty"` Content []DialogueContent `json:"content"` }
type ElasticErrorMessage ¶
type ElasticErrorMessage struct {
ElasticError string `json:"elasticError"`
}
swagger:model
type ElasticSearchError ¶
type ElasticSearchError struct { ErrorModel Message ElasticErrorMessage `json:"errorModel"` }
swagger:model
func (*ElasticSearchError) Error ¶
func (m *ElasticSearchError) Error() string
type ErrorModel ¶
type ErrorModel struct { // required: true // example: 94374b4f-3dda-4ffb-b33b-2cb6ba092b84 UniqueCode string `json:"uniqueCode"` }
swagger:model ErrorModel is the base model used for handling errors
type ExtendedResponse ¶ added in v0.1.13
type ExtendedResponse struct {
Hits []Hit `json:"hits,omitempty"`
}
type FoundRules ¶
type FoundRules struct {
Rules []Rule `json:"rules"`
}
type GrammarQuestion ¶ added in v0.1.42
type GrammarQuestionOptions ¶ added in v0.1.42
type GrammarQuizAdded ¶ added in v0.1.44
type Health ¶
type Health struct { // example: true Healthy bool `json:"healthy"` // example: 2023-06-07 15:02:11.678766777 +0000 UTC m=+5090.268683461 Time string `json:"time"` Version string `json:"version,omitempty"` Database DatabaseHealth `json:"databaseHealth,omitempty"` Memory Memory `json:"memory,omitempty"` }
func UnmarshalHealth ¶
type Hit ¶ added in v0.1.13
type Hit struct { Hit Meros `json:"hit"` FoundInText *AnalyzeTextResponse `json:"foundInText,omitempty"` }
type MediaContent ¶ added in v0.1.9
type MediaQuiz ¶ added in v0.1.9
type MediaQuiz struct { QuizMetadata struct { Language string `json:"language"` } `json:"quizMetadata"` QuizType string `json:"quizType"` Set int `json:"set,omitempty"` Theme string `json:"theme,omitempty"` Segment string `json:"segment,omitempty"` Content []MediaContent `json:"content"` Progress struct { TimesCorrect int `json:"timesCorrect"` TimesIncorrect int `json:"timesIncorrect"` AverageAccuracy float64 `json:"averageAccuracy"` } `json:"progress,omitempty"` }
type Meros ¶
type Meros struct { // example: ὄνος // required: true Greek string `json:"greek"` // example: an ass // required: true English string `json:"english"` // example: ezel // required: false Dutch string `json:"dutch,omitempty"` // required: false LinkedWord string `json:"linkedWord,omitempty"` // required: false Original string `json:"original,omitempty"` }
func UnmarshalMeros ¶
type MethodError ¶
type MethodError struct { ErrorModel Messages []MethodMessages `json:"errorModel"` }
swagger:model
type MethodMessages ¶
type MethodMessages struct { // example: GET Methods string `json:"allowedMethods"` // example: Method DELETE not allowed at this endpoint Message string `json:"methodError"` }
MethodMessages messages used in method error swagger:model
type MultipleChoiceContent ¶ added in v0.1.29
type MultipleChoiceQuiz ¶ added in v0.1.29
type MultipleChoiceQuiz struct { QuizMetadata struct { Language string `json:"language"` } `json:"quizMetadata"` QuizType string `json:"quizType"` Theme string `json:"theme,omitempty"` Set int `json:"set,omitempty"` Content []MultipleChoiceContent `json:"content"` Progress struct { TimesCorrect int `json:"timesCorrect"` TimesIncorrect int `json:"timesIncorrect"` AverageAccuracy float64 `json:"averageAccuracy"` } `json:"progress,omitempty"` }
type NotFoundError ¶
type NotFoundError struct { ErrorModel Message NotFoundMessage `json:"errorModel"` }
swagger:model
func (*NotFoundError) Error ¶
func (m *NotFoundError) Error() string
type NotFoundMessage ¶
type NotFoundMessage struct { // example: query for obscura Type string `json:"type"` // example: produced 0 results Reason string `json:"reason"` }
swagger:model
type QuizAttempt ¶ added in v0.1.10
type QuizResponse ¶
type Result ¶
type Result struct { // example: ἔβαλλε // required: true Word string `json:"word"` // example: 3th sing - impf - ind - act // required: true Rule string `json:"rule"` // example: βαλλω // required: true RootWord string `json:"rootWord"` // example: [throw, to throw] // required: true Translation []string `json:"translations"` }
type ResultModel ¶
type ResultModel struct { // example: pong // required: true Result string `json:"result"` }
swagger:model
type SolonCreationRequest ¶
type SolonCreationRequest struct { // example: api // required: true Role string `json:"roles"` // example: [grammar dictionary] // required: true Access []string `json:"access"` // example: dionysios-544c584d7f-6sp6x // required: true PodName string `json:"podName"` // example: dionysios // required: true Username string `json:"username"` }
swagger:model
func UnmarshalSolonCreationRequest ¶
func UnmarshalSolonCreationRequest(data []byte) (SolonCreationRequest, error)
func (*SolonCreationRequest) Marshal ¶
func (r *SolonCreationRequest) Marshal() ([]byte, error)
type SolonResponse ¶
type SolonResponse struct { // example: true // required: true UserCreated bool `json:"userCreated"` // example: true // required: true SecretCreated bool `json:"secretCreated"` }
swagger:model
func (*SolonResponse) Marshal ¶
func (r *SolonResponse) Marshal() ([]byte, error)
type TokenResponse ¶
type TokenResponse struct { // example: s.1283745jdf83r3 // required: true Token string `json:"token"` }
swagger:model
func (*TokenResponse) Marshal ¶
func (r *TokenResponse) Marshal() ([]byte, error)
type Translations ¶ added in v0.1.20
type ValidationError ¶
type ValidationError struct { ErrorModel Messages []ValidationMessages `json:"errorModel"` }
swagger:model ValidationError validation errors occur when data is malformed
type ValidationMessages ¶
type ValidationMessages struct { // example: word Field string `json:"validationField"` // example: cannot be empty Message string `json:"validationMessage"` }
swagger:model ValidationMessages messages used in validation error
type Word ¶
type Word struct { // example: aristophanes // required: true Method string `json:"method"` // example: frogs // required: true Category string `json:"category"` // example: ὄνος // required: true Greek string `json:"greek"` // example: donkey // required: true Translation string `json:"translation"` // example: 1 // required: true Chapter int64 `json:"chapter"` }
swagger:model
func UnmarshalWord ¶
Click to show internal directories.
Click to hide internal directories.