results

package
v0.0.0-...-2bc59a2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2018 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TotalResults = NewResults()

TotalResults holds the history of all results.

Functions

func UpdateResults

func UpdateResults(c echo.Context) error

UpdateResults updates all the results in memory and returns the required information for the user.

Types

type Result

type Result struct {
	User           *quiz.User      `json:",inline"`
	Questions      []quiz.Question `json:"questions"`
	Answers        []string        `json:"answers"`
	Percentage     string          `json:"percentage"`
	CorrectAnswers string          `json:"correct_answers"`
}

Result holds the information for each result pack.

type Results

type Results struct {
	Results []Result `json:"results"`
}

Results holds the list of all results.

func NewResults

func NewResults() *Results

NewResults creates an empty Result struct.

Jump to

Keyboard shortcuts

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