Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotModified error = errors.New("temporary file not modified")
Functions ¶
func EditCardViaEditor ¶ added in v0.2.0
editCardViaEditor allows the user to edit a card by execing into their preferred editor. Any changes they make are made to the passed *models.Card. If the user exits without writing any changes, error is set to ErrNotModified.
Types ¶
type Card ¶
type Deck ¶
type Deck struct { Name string `json:"name"` Version int `json:"version"` Active bool `json:"active"` Cards []*Card `json:"cards"` }
A Deck is a collection of Cards that are all related.
type Review ¶
type Review struct { Version int `json:"version"` Result ReviewResult `json:"result"` Datetime time.Time `json:"datetime"` }
func NewReview ¶
func NewReview(result ReviewResult) Review
type ReviewResult ¶
type ReviewResult string
const ( Failed ReviewResult = "failed" Hard ReviewResult = "hard" Normal ReviewResult = "normal" Easy ReviewResult = "easy" )
type ReviewSlice ¶
type ReviewSlice []Review
func (ReviewSlice) Len ¶
func (reviews ReviewSlice) Len() int
func (ReviewSlice) Less ¶
func (reviews ReviewSlice) Less(i, j int) bool
func (ReviewSlice) Swap ¶
func (reviews ReviewSlice) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.