Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnswerReader ¶
type AnswerReader interface {
NextAnswer() Answer
}
AnswerReader interface returns real answer and error
type FileAnswerStore ¶
type FileAnswerStore struct {
// contains filtered or unexported fields
}
func NewFileAnswerStore ¶
func NewFileAnswerStore(f *os.File) *FileAnswerStore
Factory function which takes descriptor of file with answers and returns pointer to FileAnswerStore.
func (*FileAnswerStore) NextAnswer ¶
func (s *FileAnswerStore) NextAnswer() Answer
type QuizReader ¶
Quizer interface gets record from quiz data and returns question, correct answer and error
type SliceAnswerStore ¶
type SliceAnswerStore struct { Data []string // contains filtered or unexported fields }
func (*SliceAnswerStore) NextAnswer ¶
func (a *SliceAnswerStore) NextAnswer() Answer
type SliceDelayedAnswerStore ¶
type SliceDelayedAnswerStore struct { SliceAnswerStore Delay time.Duration }
func (*SliceDelayedAnswerStore) NextAnswer ¶
func (a *SliceDelayedAnswerStore) NextAnswer() Answer
type SliceQuizStore ¶
type SliceQuizStore struct { Data [][]string // contains filtered or unexported fields }
func NewSliceQuizFromCsv ¶
func NewSliceQuizFromCsv(fd *os.File) (*SliceQuizStore, error)
Factory function which get file descriptor and reads all records into SliceQuizStore
func (*SliceQuizStore) NextQuiz ¶
func (q *SliceQuizStore) NextQuiz() Quiz
func (*SliceQuizStore) Shuffle ¶
func (q *SliceQuizStore) Shuffle()
func (*SliceQuizStore) Total ¶
func (q *SliceQuizStore) Total() int
Click to show internal directories.
Click to hide internal directories.