Documentation
¶
Index ¶
- Constants
- func AddCard(deck *Deck, card models.Flashcard) error
- func AddOrUpdateCard(deck *Deck, card models.Flashcard) error
- func CloseDB(ctx context.Context)
- func DeleteCard(deck *Deck, cardID string) error
- func DeleteDeck(deckName string) error
- func ExportDeckToCSV(deck *models.Deck) (string, error)
- func FindCardByID(deck *Deck, cardID string) *models.Flashcard
- func GenerateID() string
- func GetDB() *sql.DB
- func ImportCSVDeck(csvString string, deckName string) (*models.Deck, error)
- func InitDB() error
- func SaveDeck(deck *Deck) error
- func SetDBPath(path string)
- type Deck
- type Flashcard
Constants ¶
View Source
const ( CSVHeaderID = "id" CSVHeaderTitle = "title" CSVHeaderContent = "content" CSVHeaderLastReview = "last_review" CSVHeaderNextReview = "next_review" CSVHeaderReviewCount = "review_count" CSVHeaderEaseFactor = "ease_factor" )
Variables ¶
This section is empty.
Functions ¶
func DeleteCard ¶
func DeleteDeck ¶
func GenerateID ¶
func GenerateID() string
Types ¶
type Deck ¶
func LoadAllDecks ¶
Click to show internal directories.
Click to hide internal directories.