Documentation ¶
Index ¶
- func Migrations(opts ...migration.SuiteOption) *migration.Suite
- type Manager
- func (m Manager) AddQuizResult(ctx context.Context, qr types.QuizResult) error
- func (m Manager) AllQuizResults(ctx context.Context, userID uuid.UUID) (output []types.QuizResult, err error)
- func (m Manager) AllQuzzes(ctx context.Context, userID uuid.UUID) (output []*types.Quiz, err error)
- func (m Manager) CreateQuiz(ctx context.Context, q types.Quiz) error
- func (m Manager) GetQuiz(ctx context.Context, id uuid.UUID) (output types.Quiz, found bool, err error)
- func (m Manager) UpdateQuiz(ctx context.Context, q types.Quiz) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Migrations ¶
func Migrations(opts ...migration.SuiteOption) *migration.Suite
Migrations returns the migration suite to bootstrap the database.
Types ¶
type Manager ¶
type Manager struct {
dbutil.BaseManager
}
Manager implements database functions.
func New ¶
func New(conn *db.Connection, opts ...db.InvocationOption) *Manager
New returns a new model manager.
func (Manager) AddQuizResult ¶
AddQuizResult creates a new quiz result.
func (Manager) AllQuizResults ¶
func (m Manager) AllQuizResults(ctx context.Context, userID uuid.UUID) (output []types.QuizResult, err error)
AllQuizResults returns all the quiz results for a given user.
func (Manager) CreateQuiz ¶
CreateQuiz creates a quiz.
Click to show internal directories.
Click to hide internal directories.