Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayOfStrings ¶
type ArrayOfStrings []string
Define a custom data type for array of strings
func (ArrayOfStrings) GormDBDataType ¶
func (*ArrayOfStrings) Scan ¶
func (aos *ArrayOfStrings) Scan(value interface{}) error
type Card ¶
type Card struct {
/* ---------------------------------- index --------------------------------- */
Name string `gorm:"primaryKey"`
Language protomodels.Language `gorm:"primaryKey"`
Labels ArrayOfStrings `gorm:"type:text;"`
Explanations ArrayOfStrings `gorm:"type:text;"`
ExampleSentences ArrayOfStrings `gorm:"type:text;"`
Familiarity int32 `json:"omitempty"`
ReviewDate time.UnixTime
}
func NewCard ¶
func NewCard(c protomodels.Card) Card
func (Card) ToProtoModel ¶
func (c Card) ToProtoModel() protomodels.Card
type Log ¶
type Log struct {
Date string `gorm:"primaryKey"`
ReviewCards int32
NewCards int32
Streak int32
StreakUpdated bool
}
func NewDefaultLog ¶
func NewLog ¶
func NewLog(l protomodels.Log) Log
func (Log) ToProtoModel ¶
func (l Log) ToProtoModel() protomodels.Log
func (Log) WithNewCard ¶
func (Log) WithReviewedCard ¶
type RelatedCards ¶
type RelatedCards struct {
/* ---------------------------------- index --------------------------------- */
Name string `gorm:"primaryKey"`
Language protomodels.Language `gorm:"primaryKey"`
Synonyms ArrayOfStrings `gorm:"type:text;"`
Antonyms ArrayOfStrings `gorm:"type:text;"`
Origin string
Derivatives ArrayOfStrings `gorm:"type:text;"`
InOtherLanguages ArrayOfStrings `gorm:"type:text;"`
Others ArrayOfStrings `gorm:"type:text;"`
}
func NewRelatedCards ¶
func NewRelatedCards(c protomodels.RelatedCards) RelatedCards
func (RelatedCards) ToProtoModel ¶
func (rc RelatedCards) ToProtoModel() protomodels.RelatedCards
Click to show internal directories.
Click to hide internal directories.