Documentation ¶
Index ¶
- Variables
- func NewQuestionService(repository repository.QuestionRepository) *questionService
- func NewSurveyService(repository repository.SurveyRepository, questionService QuestionService, ...) *surveyService
- func NewTraitService(repository repository.TraitRepository) *traitService
- type QuestionService
- type SurveyService
- type TraitService
Constants ¶
This section is empty.
Variables ¶
View Source
var ( QuestionIdEmptyError = errors.New("QUESTION_ID_EMPTY") QuestionDescriptionEmptyError = errors.New("QUESTION_DESCRIPTION_EMPTY") AtleastTwoOptionsRequiredError = errors.New("ATLEAST_TWO_OPTIONS_REQUIRED") OptionDescriptionEmptyError = errors.New("OPTION_DESCRIPTION_EMPTY") OptionScoreNegativeError = errors.New("OPTION_SCORE_MUST_BE_POSITIVE") QuestionNotFoundError = errors.New("QUESTION_NOT_FOUND") )
View Source
var ( SurveyQuestionIdEmpty = errors.New("SURVEY_QUESTION_ID_EMPTY") SurveyOptionIdEmpty = errors.New("SURVEY_OPTION_ID_EMPTY") SurveyQuestionIdNotFound = errors.New("SURVEY_QUESTION_ID_NOT_FOUND") SurveyOptionIdNotFound = errors.New("SURVEY_OPTION_ID_NOT_FOUND") SurveyMissingAnswers = errors.New("SURVEY_MISSING_ANSWERS") SurveyNotFound = errors.New("SURVEY_NOT_FOUND") SurveyResultExpired = errors.New("SURVEY_RESULT_EXPIRED") )
Functions ¶
func NewQuestionService ¶
func NewQuestionService(repository repository.QuestionRepository) *questionService
func NewSurveyService ¶
func NewSurveyService(repository repository.SurveyRepository, questionService QuestionService, traitService TraitService) *surveyService
func NewTraitService ¶
func NewTraitService(repository repository.TraitRepository) *traitService
Types ¶
type QuestionService ¶
type SurveyService ¶
type SurveyService interface { GetResults(id string) (domain.SurveyResponse, error) Finish(survey domain.Survey) (domain.SurveyResponse, error) }
Click to show internal directories.
Click to hide internal directories.