Documentation ¶
Index ¶
- type QuestionSetRepo
- func (qr *QuestionSetRepo) DeleteQuestionSet(ctx context.Context, id string) error
- func (qsr *QuestionSetRepo) GetQuestionSet(ctx context.Context, id string) (*models.QuestionSet, error)
- func (qsr *QuestionSetRepo) ListQuestionSet(ctx context.Context) ([]*models.QuestionSet, error)
- func (qsr *QuestionSetRepo) SaveQuestionSet(ctx context.Context, r *models.QuestionSet) error
- type QuestionsRepo
- func (qr *QuestionsRepo) DeleteResponse(ctx context.Context, id string) error
- func (qr *QuestionsRepo) GetByID(ctx context.Context, id string) (*models.Response, error)
- func (qr *QuestionsRepo) ListResponses(ctx context.Context) ([]*models.Response, error)
- func (qr *QuestionsRepo) SaveResponse(ctx context.Context, r *models.Response) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QuestionSetRepo ¶
type QuestionSetRepo struct {
*mongo.Collection
}
QuestionSetRepo - MongoDB Collection
func NewQuestionSetRepo ¶
NewQuestionSetRepo - Connect to Database and return connection
func (*QuestionSetRepo) DeleteQuestionSet ¶
func (qr *QuestionSetRepo) DeleteQuestionSet(ctx context.Context, id string) error
DeleteQuestionSet - Delete a Set of Questions
func (*QuestionSetRepo) GetQuestionSet ¶
func (qsr *QuestionSetRepo) GetQuestionSet(ctx context.Context, id string) (*models.QuestionSet, error)
GetQuestionSet - Return a reponse based ID given
func (*QuestionSetRepo) ListQuestionSet ¶
func (qsr *QuestionSetRepo) ListQuestionSet(ctx context.Context) ([]*models.QuestionSet, error)
ListQuestionSet - Return a List of Questions
func (*QuestionSetRepo) SaveQuestionSet ¶
func (qsr *QuestionSetRepo) SaveQuestionSet(ctx context.Context, r *models.QuestionSet) error
SaveQuestionSet - Save Set of Questions to Database
type QuestionsRepo ¶
type QuestionsRepo struct {
*mongo.Collection
}
QuestionsRepo - MonogoDB Connection
func NewQuestionsRepo ¶
NewQuestionsRepo - Connect to Database and return connection
func (*QuestionsRepo) DeleteResponse ¶
func (qr *QuestionsRepo) DeleteResponse(ctx context.Context, id string) error
DeleteResponse - Delete a Response
func (*QuestionsRepo) ListResponses ¶
ListResponses - Return a List of Responses
func (*QuestionsRepo) SaveResponse ¶
SaveResponse - Save Reponse to database
Click to show internal directories.
Click to hide internal directories.