Documentation
¶
Index ¶
- func StartTUI(c *client.Client) (err error)
- func StartTUIReview(c *client.Client, deck string, limit int, preview bool) error
- func StartTUIWithBrowse(c *client.Client) error
- func StartTUIWithDeck(c *client.Client, deck string) error
- type AnswerResultMsg
- type CardsBrowseLoadedMsg
- type CardsLoadedMsg
- type DecksLoadedMsg
- type ErrorMsg
- type FlagSetMsg
- type Model
- type NoteCardsLoadedMsg
- type NoteDeletedMsg
- type NoteDetailMsg
- type NoteUpdatedMsg
- type NotesLoadedMsg
- type UndoMsg
- type ViewChangeMsg
- type ViewType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartTUI ¶
StartTUI launches the TUI application. It checks whether the output is a terminal and returns an error if not.
func StartTUIReview ¶
StartTUIReview launches the TUI directly into review mode for the given deck.
func StartTUIWithBrowse ¶
StartTUIWithBrowse launches the TUI directly into browse/note list mode.
Types ¶
type AnswerResultMsg ¶
AnswerResultMsg is sent after answering a card.
type CardsBrowseLoadedMsg ¶
CardsBrowseLoadedMsg is sent when cards for browse view have been fetched.
type CardsLoadedMsg ¶
CardsLoadedMsg is sent when card data has been fetched.
type DecksLoadedMsg ¶
DecksLoadedMsg is sent when deck list has been fetched.
type FlagSetMsg ¶
FlagSetMsg is sent after a card flag is set.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the main TUI model that manages state and delegates to sub-models.
type NoteCardsLoadedMsg ¶
NoteCardsLoadedMsg is sent when cards for a note have been fetched.
type NoteDeletedMsg ¶
type NoteDeletedMsg struct {
Err error
}
NoteDeletedMsg is sent after a note is deleted.
type NoteDetailMsg ¶
NoteDetailMsg is sent when a single note's full info has been fetched.
type NoteUpdatedMsg ¶
type NoteUpdatedMsg struct {
Err error
}
NoteUpdatedMsg is sent after a note's fields are updated.
type NotesLoadedMsg ¶
NotesLoadedMsg is sent when note data has been fetched.
type ViewChangeMsg ¶
ViewChangeMsg is sent to switch between views.