Documentation
¶
Index ¶
- func CloseDB()
- func Setup()
- type QuestionDAO
- type QuestionDAOImpl
- func (*QuestionDAOImpl) GetByID(id int64) (*models.Question, error)
- func (*QuestionDAOImpl) GetByOffsetAndLimit(offset, limit int64) ([]*models.Question, error)
- func (*QuestionDAOImpl) GetBySubCat(sub string) ([]*models.Question, error)
- func (*QuestionDAOImpl) MGetBySubCat(sub string, count int) ([]*models.Question, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type QuestionDAO ¶
type QuestionDAO interface { GetByID(id int64) (*models.Question, error) GetBySubCat(sub string) ([]*models.Question, error) MGetBySubCat(sub string, count int) ([]*models.Question, error) GetByOffsetAndLimit(offset, limit int64) ([]*models.Question, error) }
QuestionDAO ...
type QuestionDAOImpl ¶
type QuestionDAOImpl struct{}
QuestionDAOImpl ...
func (*QuestionDAOImpl) GetByID ¶
func (*QuestionDAOImpl) GetByID(id int64) (*models.Question, error)
GetByID get question by id
func (*QuestionDAOImpl) GetByOffsetAndLimit ¶
func (*QuestionDAOImpl) GetByOffsetAndLimit(offset, limit int64) ([]*models.Question, error)
GetByOffsetAndLimit get questions by offset and limit
func (*QuestionDAOImpl) GetBySubCat ¶
func (*QuestionDAOImpl) GetBySubCat(sub string) ([]*models.Question, error)
GetBySubCat get questions by sub category
func (*QuestionDAOImpl) MGetBySubCat ¶
MGetBySubCat get a batch of random questions by sub category
Click to show internal directories.
Click to hide internal directories.