Documentation ¶
Index ¶
- type ClozeHandler
- type ColumnNames
- type ConsentHandler
- type EmptyHandler
- type IncludeMeta
- type InputValueHandler
- type MatrixHandler
- type MultipleChoiceHandler
- type ParsedResponse
- type QuestionTypeHandler
- type ResponseExporter
- type ResponseMeta
- type ResponseParser
- func (rp *ResponseParser) ParseResponse(rawResp *studytypes.SurveyResponse) (ParsedResponse, error)
- func (rp *ResponseParser) ResponseToFlatObj(parsedResponse ParsedResponse) (map[string]interface{}, error)
- func (rp *ResponseParser) ResponseToLongFormat(parsedResponse ParsedResponse) ([][]string, error)
- func (rp *ResponseParser) ResponseToStrList(parsedResponse ParsedResponse) ([]string, error)
- type ResponsiveTableHandler
- type SingleChoiceGroupHandler
- type SingleChoiceHandler
- type UnknownTypeHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClozeHandler ¶
type ClozeHandler struct{}
ClozeHandler implements the QuestionTypeHandler interface for cloze questions
func (*ClozeHandler) GetResponseColumnNames ¶
func (h *ClozeHandler) GetResponseColumnNames(question sd.SurveyQuestion, questionOptionSep string) []string
func (*ClozeHandler) ParseResponse ¶
func (h *ClozeHandler) ParseResponse(question sd.SurveyQuestion, response *studytypes.SurveyItemResponse, questionOptionSep string) map[string]interface{}
type ColumnNames ¶
type ConsentHandler ¶
type ConsentHandler struct{}
ConsentHandler implements the QuestionTypeHandler interface for consent questions
func (*ConsentHandler) GetResponseColumnNames ¶
func (h *ConsentHandler) GetResponseColumnNames(question sd.SurveyQuestion, questionOptionSep string) []string
func (*ConsentHandler) ParseResponse ¶
func (h *ConsentHandler) ParseResponse(question sd.SurveyQuestion, response *studytypes.SurveyItemResponse, questionOptionSep string) map[string]interface{}
type EmptyHandler ¶
type EmptyHandler struct{}
func (*EmptyHandler) GetResponseColumnNames ¶
func (h *EmptyHandler) GetResponseColumnNames(question sd.SurveyQuestion, questionOptionSep string) []string
func (*EmptyHandler) ParseResponse ¶
func (h *EmptyHandler) ParseResponse(question sd.SurveyQuestion, response *studytypes.SurveyItemResponse, questionOptionSep string) map[string]interface{}
type IncludeMeta ¶
type InputValueHandler ¶
type InputValueHandler struct{}
InputValueHandler implements the QuestionTypeHandler interface for input value questions
func (*InputValueHandler) GetResponseColumnNames ¶
func (h *InputValueHandler) GetResponseColumnNames(question sd.SurveyQuestion, questionOptionSep string) []string
func (*InputValueHandler) ParseResponse ¶
func (h *InputValueHandler) ParseResponse(question sd.SurveyQuestion, response *studytypes.SurveyItemResponse, questionOptionSep string) map[string]interface{}
type MatrixHandler ¶
type MatrixHandler struct{}
MatrixHandler implements the QuestionTypeHandler interface for matrix questions
func (*MatrixHandler) GetResponseColumnNames ¶
func (h *MatrixHandler) GetResponseColumnNames(question sd.SurveyQuestion, questionOptionSep string) []string
func (*MatrixHandler) ParseResponse ¶
func (h *MatrixHandler) ParseResponse(question sd.SurveyQuestion, response *studytypes.SurveyItemResponse, questionOptionSep string) map[string]interface{}
type MultipleChoiceHandler ¶
type MultipleChoiceHandler struct{}
MultipleChoiceHandler implements the QuestionTypeHandler interface for multiple choice questions
func (*MultipleChoiceHandler) GetResponseColumnNames ¶
func (h *MultipleChoiceHandler) GetResponseColumnNames(question sd.SurveyQuestion, questionOptionSep string) []string
func (*MultipleChoiceHandler) ParseResponse ¶
func (h *MultipleChoiceHandler) ParseResponse(question sd.SurveyQuestion, response *studytypes.SurveyItemResponse, questionOptionSep string) map[string]interface{}
type ParsedResponse ¶
type QuestionTypeHandler ¶
type QuestionTypeHandler interface { GetResponseColumnNames(question sd.SurveyQuestion, questionOptionSep string) []string ParseResponse(question sd.SurveyQuestion, response *studytypes.SurveyItemResponse, questionOptionSep string) map[string]interface{} }
type ResponseExporter ¶
type ResponseExporter struct {
// contains filtered or unexported fields
}
func NewResponseExporter ¶
func NewResponseExporter( parser *ResponseParser, writer io.Writer, format string, ) (*ResponseExporter, error)
func (*ResponseExporter) Finish ¶
func (re *ResponseExporter) Finish() error
func (*ResponseExporter) WriteResponse ¶
func (re *ResponseExporter) WriteResponse( rawResp *studytypes.SurveyResponse, ) error
type ResponseMeta ¶
type ResponseParser ¶
type ResponseParser struct {
// contains filtered or unexported fields
}
func NewResponseParser ¶
func NewResponseParser( surveyKey string, surveyVersions []studydefinition.SurveyVersionPreview, removeRootKey bool, includeMeta *IncludeMeta, questionOptionSep string, extraContextColumns *[]string, ) (*ResponseParser, error)
func (*ResponseParser) ParseResponse ¶
func (rp *ResponseParser) ParseResponse( rawResp *studytypes.SurveyResponse, ) (ParsedResponse, error)
func (*ResponseParser) ResponseToFlatObj ¶
func (rp *ResponseParser) ResponseToFlatObj( parsedResponse ParsedResponse, ) (map[string]interface{}, error)
func (*ResponseParser) ResponseToLongFormat ¶
func (rp *ResponseParser) ResponseToLongFormat( parsedResponse ParsedResponse, ) ([][]string, error)
func (*ResponseParser) ResponseToStrList ¶
func (rp *ResponseParser) ResponseToStrList( parsedResponse ParsedResponse, ) ([]string, error)
type ResponsiveTableHandler ¶
type ResponsiveTableHandler struct{}
ResponsiveTableHandler implements the QuestionTypeHandler interface for responsive table questions
func (*ResponsiveTableHandler) GetResponseColumnNames ¶
func (h *ResponsiveTableHandler) GetResponseColumnNames(question sd.SurveyQuestion, questionOptionSep string) []string
func (*ResponsiveTableHandler) ParseResponse ¶
func (h *ResponsiveTableHandler) ParseResponse(question sd.SurveyQuestion, response *studytypes.SurveyItemResponse, questionOptionSep string) map[string]interface{}
type SingleChoiceGroupHandler ¶
type SingleChoiceGroupHandler struct{}
func (*SingleChoiceGroupHandler) GetResponseColumnNames ¶
func (h *SingleChoiceGroupHandler) GetResponseColumnNames(question sd.SurveyQuestion, questionOptionSep string) []string
func (*SingleChoiceGroupHandler) ParseResponse ¶
func (h *SingleChoiceGroupHandler) ParseResponse(question sd.SurveyQuestion, response *studytypes.SurveyItemResponse, questionOptionSep string) map[string]interface{}
type SingleChoiceHandler ¶
type SingleChoiceHandler struct{}
SingleChoiceHandler implements the QuestionTypeHandler interface for single choice questions
func (*SingleChoiceHandler) GetResponseColumnNames ¶
func (h *SingleChoiceHandler) GetResponseColumnNames(question sd.SurveyQuestion, questionOptionSep string) []string
func (*SingleChoiceHandler) ParseResponse ¶
func (h *SingleChoiceHandler) ParseResponse(question sd.SurveyQuestion, response *studytypes.SurveyItemResponse, questionOptionSep string) map[string]interface{}
type UnknownTypeHandler ¶
type UnknownTypeHandler struct{}
UnknownTypeHandler implements the QuestionTypeHandler interface for unknown question types
func (*UnknownTypeHandler) GetResponseColumnNames ¶
func (h *UnknownTypeHandler) GetResponseColumnNames(question sd.SurveyQuestion, questionOptionSep string) []string
func (*UnknownTypeHandler) ParseResponse ¶
func (h *UnknownTypeHandler) ParseResponse(question sd.SurveyQuestion, response *studytypes.SurveyItemResponse, questionOptionSep string) map[string]interface{}