Documentation ¶
Index ¶
- type AddQuestionAction
- type AddQuestionState
- type EditQuestionState
- type EditQuizAction
- type EditQuizState
- func (state *EditQuizState) DeleteQuestion(quiz *quiz.Quiz, event *tcell.EventKey, table *tview.Table) *tcell.EventKey
- func (state *EditQuizState) Run() IState
- func (state *EditQuizState) RunTable(app *tview.Application, table *tview.Table, questions []quiz.IQuestion) (quiz.IQuestion, EditQuizAction, error)
- func (state *EditQuizState) RunWindow(app *tview.Application, table *tview.Table, footer *tview.TextView, ...) (quiz.IQuestion, EditQuizAction, error)
- type ExitState
- type IState
- type InitAction
- type InitState
- type JoinQuizState
- type LoggedInState
- type LoginState
- type ManageQuizzesAction
- type ManageQuizzesState
- func (state *ManageQuizzesState) DeleteQuiz(quizzes []*quiz.Quiz, event *tcell.EventKey, table *tview.Table) (*tcell.EventKey, []*quiz.Quiz)
- func (state *ManageQuizzesState) Run() IState
- func (state *ManageQuizzesState) RunTable(app *tview.Application, table *tview.Table, quizzes []*quiz.Quiz) (*quiz.Quiz, ManageQuizzesAction, error)
- func (state *ManageQuizzesState) RunWindow(app *tview.Application, table *tview.Table, footer *tview.TextView, ...) (*quiz.Quiz, ManageQuizzesAction, error)
- type NewQuizState
- type RegisterState
- type RunQuizState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddQuestionAction ¶
type AddQuestionAction string
const ( AddQuestionToggle AddQuestionAction = "True/False" AddQuestionMultipleChoice AddQuestionAction = "Multiple Choice" )
type AddQuestionState ¶
type AddQuestionState struct { IState // contains filtered or unexported fields }
func (*AddQuestionState) Run ¶
func (state *AddQuestionState) Run() IState
type EditQuestionState ¶
type EditQuestionState struct { IState // contains filtered or unexported fields }
func (*EditQuestionState) Run ¶
func (state *EditQuestionState) Run() IState
type EditQuizAction ¶
type EditQuizAction int
const ( EditQuizBack EditQuizAction = 0 EditQuizAddQuestion EditQuizAction = 1 EditQuizEditQuestion EditQuizAction = 2 )
type EditQuizState ¶
type EditQuizState struct { IState // contains filtered or unexported fields }
func (*EditQuizState) DeleteQuestion ¶
func (state *EditQuizState) DeleteQuestion(quiz *quiz.Quiz, event *tcell.EventKey, table *tview.Table) *tcell.EventKey
func (*EditQuizState) Run ¶
func (state *EditQuizState) Run() IState
func (*EditQuizState) RunTable ¶
func (state *EditQuizState) RunTable(app *tview.Application, table *tview.Table, questions []quiz.IQuestion) (quiz.IQuestion, EditQuizAction, error)
func (*EditQuizState) RunWindow ¶
func (state *EditQuizState) RunWindow(app *tview.Application, table *tview.Table, footer *tview.TextView, questions []quiz.IQuestion) (quiz.IQuestion, EditQuizAction, error)
type InitAction ¶
type InitAction string
const ( InitLogin InitAction = "Login" InitRegister InitAction = "Register" InitJoin InitAction = "Join Quiz" InitExit InitAction = "Exit" )
type JoinQuizState ¶
type JoinQuizState struct {
IState
}
func (*JoinQuizState) Run ¶
func (state *JoinQuizState) Run() IState
type LoggedInState ¶
type LoggedInState struct {
// contains filtered or unexported fields
}
func (*LoggedInState) Run ¶
func (state *LoggedInState) Run() IState
type LoginState ¶
type LoginState struct{}
func (*LoginState) Run ¶
func (state *LoginState) Run() IState
type ManageQuizzesAction ¶
type ManageQuizzesAction int
const ( ManageQuizzesNewQuiz ManageQuizzesAction = 0 ManageQuizzesEditQuiz ManageQuizzesAction = 1 ManageQuizzesBack ManageQuizzesAction = 2 )
type ManageQuizzesState ¶
type ManageQuizzesState struct {
// contains filtered or unexported fields
}
func NewManageQuizzesState ¶
func NewManageQuizzesState(user user.IUser) *ManageQuizzesState
func (*ManageQuizzesState) DeleteQuiz ¶
func (*ManageQuizzesState) Run ¶
func (state *ManageQuizzesState) Run() IState
func (*ManageQuizzesState) RunTable ¶
func (state *ManageQuizzesState) RunTable(app *tview.Application, table *tview.Table, quizzes []*quiz.Quiz) (*quiz.Quiz, ManageQuizzesAction, error)
func (*ManageQuizzesState) RunWindow ¶
func (state *ManageQuizzesState) RunWindow(app *tview.Application, table *tview.Table, footer *tview.TextView, quizzes []*quiz.Quiz) (*quiz.Quiz, ManageQuizzesAction, error)
type NewQuizState ¶
type NewQuizState struct {
// contains filtered or unexported fields
}
func (*NewQuizState) Run ¶
func (state *NewQuizState) Run() IState
type RegisterState ¶
type RegisterState struct{}
func (*RegisterState) Run ¶
func (state *RegisterState) Run() IState
type RunQuizState ¶
type RunQuizState struct {
// contains filtered or unexported fields
}
func (*RunQuizState) Run ¶
func (state *RunQuizState) Run() IState
Click to show internal directories.
Click to hide internal directories.