votes

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPHandler

func HTTPHandler(repo *Repository) http.Handler

HTTPHandler provides a REST API handler for the votes data management.

Types

type Aggregate

type Aggregate struct {
	TalkName string    `json:"talk_name"`
	Data     []aggData `json:"data"`
}

type Label

type Label structure.Label

Label provides some context of what the presentation is about at some given time. It can be used as a marker pointing to a specific place in the presentation to correlate the presentation content with the votes.

type Repository

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

Repository keeps the collected data about votes and labels.

func NewRepository

func NewRepository() *Repository

func (*Repository) Aggregate

func (r *Repository) Aggregate(talkName string) (res Aggregate)

Aggregate returns the aggregated data for a specific talk that can be used to provide a summary of the poll during the presentation.

func (*Repository) Label

func (r *Repository) Label(l Label) error

func (*Repository) Vote

func (r *Repository) Vote(v Vote) error

type Vote

type Vote structure.Vote

Vote represents the perception of a presentation listener at some given time. The Value field keeps the measure of how much the listener agrees or disagrees with the speaker.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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