repository

package
v0.0.0-...-70070ff Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ISurveyRepository

type ISurveyRepository interface {
	CreateSurvey(ctx context.Context, survey *models.Survey) error
	CreateQuestion(ctx context.Context, question *models.Question) error
	CreateChoice(ctx context.Context, choice *models.Choice) error
	UpdateChoice(ctx context.Context, choice *models.Choice) error
	GetChoiceByTextAndQuestion(ctx context.Context, text string, questionID uint) (*models.Choice, error)
}

type SurveyRepository

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

func NewSurveyRepository

func NewSurveyRepository(db db.DbService, logger logging.Logger) *SurveyRepository

func (*SurveyRepository) CreateChoice

func (r *SurveyRepository) CreateChoice(ctx context.Context, choice *models.Choice) error

func (*SurveyRepository) CreateQuestion

func (r *SurveyRepository) CreateQuestion(ctx context.Context, question *models.Question) error

func (*SurveyRepository) CreateSurvey

func (r *SurveyRepository) CreateSurvey(ctx context.Context, survey *models.Survey) error

func (*SurveyRepository) GetChoiceByTextAndQuestion

func (r *SurveyRepository) GetChoiceByTextAndQuestion(ctx context.Context, text string, questionID uint) (*models.Choice, error)

func (*SurveyRepository) UpdateChoice

func (r *SurveyRepository) UpdateChoice(ctx context.Context, choice *models.Choice) error

Jump to

Keyboard shortcuts

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