questionnaire

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package questionnaire provides everything related to a Questionnaire.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Questionnaire

type Questionnaire struct {
	common.Common `json:",inline" bson:",inline"`

	// Hash is a hash based on SHA-256. The goal is to avoid data tampering.
	Hash string `json:"hash" bson:"hash"`

	// Questions is a list of questions.
	Questions *safeorderedmap.SafeOrderedMap[question.Question] `json:"questions" bson:"questions" validate:"required,dive,required"`

	// Title of the questionnaire.
	Title string `json:"title" bson:"title" validate:"required"`
}

Questionnaire is a set of questions.

func New

func New(title string, questions ...question.Question) (*Questionnaire, error)

New creates a new questionnaire.

Jump to

Keyboard shortcuts

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