Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteWithListID ¶
func InsertVocabularies ¶
func InsertVocabularies(vocabularies []Vocabulary) error
Types ¶
type CheckTestRequest ¶
type CheckTestRequest struct { Vocabularies []Vocabulary `json:"vocabularies"` FirstValueField string `json:"firstValueField"` SecondValueField string `json:"secondValueField"` }
type GenerateTestRequest ¶
type TestResult ¶
type TestResult struct { Vocabs []UserDBVocabs `json:"vocabs"` Correct int8 `json:"correct"` }
type UserDBVocabs ¶
type Vocabulary ¶
type Vocabulary struct { ID primitive.ObjectID `bson:"_id, omitempty" json:"id"` ListID primitive.ObjectID `bson:"listID, omitempty" json:"listId"` Values []Values `bson:"values, omitempty" json:"values"` }
func GetRandomVocabularyByListIds ¶
func GetRandomVocabularyByListIds(ids []primitive.ObjectID, limit int8) ([]Vocabulary, error)
func GetVocabularyByIDs ¶
func GetVocabularyByIDs(ids []primitive.ObjectID) ([]Vocabulary, error)
func GetVocabularyByListID ¶
func GetVocabularyByListID(listID string) ([]Vocabulary, error)
func (Vocabulary) Delete ¶
func (vocabulary Vocabulary) Delete() error
func (*Vocabulary) GetValueByKey ¶
func (vocabulary *Vocabulary) GetValueByKey(key string) Values
func (*Vocabulary) InsertVocab ¶
func (vocabulary *Vocabulary) InsertVocab() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.