question

package
v0.0.0-...-cd133ac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QuestionInterface

type QuestionInterface interface {
	Create(newQuestion entities.Question) (entities.Question, error)
	GetRandom(userId uint64, categoryId *uint64) ([]entities.GetCommonQuestionsResponse, error)
	GetQuestionsByUserId(userId uint64, offset int, limit int) ([]entities.GetCommonQuestionsResponse, error)
}

type QuestionRepository

type QuestionRepository struct {
	// contains filtered or unexported fields
}

func NewQuestionsRepo

func NewQuestionsRepo(db *gorm.DB) *QuestionRepository

func (*QuestionRepository) Create

func (qt *QuestionRepository) Create(newQuestion entities.Question) (entities.Question, error)

func (*QuestionRepository) GetQuestionsByUserId

func (qt *QuestionRepository) GetQuestionsByUserId(userId uint64, offset int, limit int) ([]entities.GetCommonQuestionsResponse, error)

func (*QuestionRepository) GetRandom

func (qt *QuestionRepository) GetRandom(userId uint64, categoryId *uint64) ([]entities.GetCommonQuestionsResponse, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL